LUFP7 Telemecanique User’s manual Gateway Profibus-DP / Modbus RTU
LUFP9 Gateway Profibus-DP / Modbus RTU Page 4 3
In spite of all the care taken over the writing of this document, Schneider Electric SA does not give any guarantees in relation to the information contained in it, and may not be held liable for any errors, nor for any damage which might result from its use or its application. The characteristics and operation of the products and additives presented in this document may change at any time. The description is in no way contractually binding.
Table of Contents 1. Introduction............................................................6 1.1. Introduction to the User Guide ............................................... 6 1.2. Introduction to the LUFP7 Gateway ....................................... 7 1.3. Terminology............................................................................ 7 1.4. Notational Conventions .......................................................... 8 1.5. Additional Documentation ....................................
1. Introduction 1.1. Introduction to the User Guide Chapter 1 Introduction (page 6) describes the gateway, the user guide that comes with it and the terms used in it. Chapter 2 Hardware Implementation of the LUFP7 Gateway (page 13) gives an introduction to the gateway and describes all the items used when setting it up, both inside (thumb wheels) and outside (cables and connectors) the gateway. Chapter 3 Signalling (page 23) describes the six LEDs on the front of the gateway.
1. Introduction 1.2. Introduction to the LUFP7 Gateway The LUFP7 gateway allows a master located on a Profibus-DP network to enter into a dialogue with the slaves on a Modbus RTU network. This is a generic protocol converter operating in a way which is transparent to the user. This gateway allows you to interface many products marketed by Schneider Electric with a Profibus-DP network. These include TeSys U motor starters, Altivar drivers and Altistart soft start- soft stop units. 1.3.
1. Introduction 1.4. Notational Conventions 16#••••............... Value expressed in hexadecimal, which is equivalent to the H••••, ••••h and 0x•••• notations, sometimes used in other documents. N.B. The AbcConf softwre uses the 0x•••• notation. e.g. 16#0100 = 0x0100 = 256. 02#•••• ••••......... Value expressed in binary. The number of ‘•’ digits depends on the size of the item of data represented. Each nibble (group of 4 bits) is separated from the other nibbles by a space.
1. Introduction 1.5. Additional Documentation In the case of Modbus slaves, the features, services and adjustment of the Modbus communications are not dealt with in this document. 1.6. Introduction to the Communication “System” Architecture Profibus-DP Master Total of 16 motor starters (TeSys U model) Upstream network (Profibus-DP) Downstream network no.1 (Modbus) Downstream network no.2 (Modbus) ATS48 VW33-A48 ATS46 VW3-G46301 Downstream network no.
1. Introduction Each LUFP7 Profibus-DP / Modbus RTU gateway allows one of the PLCs on the Profibus-DP network to command, control and configure up to 8 Modbus slaves. Other Profibus-DP masters on that same network can only control them. If there are more than 8 Modbus slaves, you will need to use an appropriate number of LUFP7 gateways.
1. Introduction Ö Each LUFP7 gateway is shipped pre-configured so as to make it easier to operate and the factory settings can be used as a basis for a configuration which will best meet the user’s expectations. The typical operations applicable to this default configuration are described in chapter 6 Configuring the Gateway, page 44. The Profibus-DP network is totally separate from the Modbus network.
1.
2. Hardware Implementation of the LUFP7 Gateway 2.1. On Receipt After opening the packaging, check that the following element is there: • One LUFP7 Profibus-DP / Modbus RTU gateway. 2.2. Introduction to the LUFP7 Gateway The cables and other accessories for connecting to Profibus-DP and Modbus networks need to be ordered separately. f g Legend: h c d Configuration 14 e Modbus RTU c Detachable power connector for the 24V ±10%).
2. Hardware Implementation of the LUFP7 Gateway 2.3. Mounting the Gateway on a DIN Rail Mounting the gateway Removing the gateway 1 1 2 2 Start by fitting the rear base of the gateway to the upper part of the rail, pushing downwards (1) to compress the gateway’s spring. Then push the gateway against the DIN rail (2) until the base of the gateway box fits onto the rail. Start by pushing the gateway downwards (1) to compress the gateway’s spring.
2. Hardware Implementation of the LUFP7 Gateway 2.5. Connecting the Gateway to the Modbus Network Three typical examples of Modbus connection for the gateway and its slaves are shown below. There are many other possible Modbus connections, but they are not covered in this document. 2.5.1. Examples of Modbus Connection Topologies • “Star” topology: This topology uses LU9GC03 Modbus hubs, which have 8 female RJ45 connectors.
2. Hardware Implementation of the LUFP7 Gateway • “Bus” topology with VW3 A8 306 TF3 drop boxes: This topology uses VW3 A8 306 TF3 drop boxes to connect each of the Modbus slaves to the main section of the Modbus network. Each box should be placed in the immediate vicinity of the Modbus slave it is associated with. The cable for the main section of the Modbus network must have male RJ45 connectors (like the VW3 A8 306 R•• cable used for the “star” topology).
2. Hardware Implementation of the LUFP7 Gateway • “Bus” topology with tap boxes: This topology is similar to the previous one, except that it uses TSXSCA62 subscriber connectors and/or TSXCA50 subscriber connectors. We recommend using a VW3 A68 306 connection cable and the TSXCSA•00 Modbus cables. Connect the RJ45 connector on the VW3 A68 306 cable to the Modbus connector on the LUFP7 gateway. The connections are shown below: VW3 A68 306 TSXSCA62 Modbus LUFP7 Gateway TSXCSA•00 2.5.2.
2. Hardware Implementation of the LUFP7 Gateway 2.5.3.
2. Hardware Implementation of the LUFP7 Gateway 2) Cables: VW3 A8 306 R•• Modbus cable................................... Shielded cable with a male RJ45 connector at each (“star” topology / “bus” topology with tap boxes) end. VW3 A68 306 Modbus cable ....................................... Shielded cable with a male RJ45 connector and a (“bus” topology with tap boxes) male 15 point SUB-D connector. It is used to connect a Modbus subscriber (slave or master) to a TSXSCA62 or TSXCA50 box.
2. Hardware Implementation of the LUFP7 Gateway 2.6.2. Wiring Recommendations for the Profibus-DP Network • Use a shielded cable with a twisted pair of copper conductors, preferably a type A Profibus-DP cable. • Connect the reference potentials to one another, • You may choose the transmission rate, within limits ranging from 9.6 kbit/s to 12 Mbit/s. The choice is made at network startup and applies to all network subscribers.
2. Hardware Implementation of the LUFP7 Gateway To connect stations to the Profibus-DP network more easily, several accessories are offered in the Schneider Electric catalogue: – Single twisted pair type A Profibus-DP cable (100 m long): TSX PB SCA100. If you use a different cable, please check that its electric characteristics are as close as possible to those of type A cables (see chapter 7.2 Communication Characteristics, page 86). 490 NAD 911 04 (or 03) connector – Line connector: 490 NAD 911 04.
2. Hardware Implementation of the LUFP7 Gateway 2.7. Configuring the Profibus-DP Communication Features This configuration should be carried out when the gateway is powered off. This task is limited to configuring the gateway's Profibus address, as the communication speed on the Profibus network (9.6 kbits/s to 12 Mbits/s) is automatically detected by the gateway. The two coding wheels used for configuring the gateway’s address are hidden behind the gateway cover g (see illustration in chapter 2.
3.
4. Software Implementation of the Gateway 4.1. Introduction This chapter gives an introduction to a quick implementation of the LUFP7 gateway, using its default configuration. All LUFP7 gateways ship pre-configured. This pre-configuration means that the user does not have to configure the LUFP7 gateway using AbcConf. This configuration is described in order to allow the gateway to be used with a configuration tool for Profibus-DP master PLCs. As an example this implementation will use Sycon (version ≥ V2.5.
4. Software Implementation of the Gateway 4.1.2. Configuring the Motor Starters Each motor starter should be configured as follows: Protocol: Modbus address Bitrate Data bits Modbus RTU slave 1 to 8 19,200 bits/s 8 Start bits Parity Parity bit Stop bits 1 None 0 1 When using a TeSys U motor starter with a Modbus communication module (LULC031 module), the configuration parameters for the RS485 connection are automatically detected, only the Modbus address of the motor starter needs to be configured. 4.
4. Software Implementation of the Gateway 4.2. Gateway Configuration under PL7 PRO and SyCon The Profibus-DP master must be configured so that it has access to all of the data described in chapters 10.2.1 Input Data Memory Area, page 95, and 10.2.2 Output Data Memory Area, page 96. The following chapters describe the steps in PL7 PRO (version ≥ V3.0) and SyCon (version ≥ V2.5.0.0) which you will need to go through so that the gateway is correctly recognised by the Profibus-DP master PLC.
4. Software Implementation of the Gateway 4.2.2. Creating a Profibus-DP Network under SyCon Select the “New” option from the “File” menu to create a new configuration, by selecting the “PROFIBUS” network. This option creates an empty network segment in the SyCon main window. In this guide, we shall immediately save this configuration and name it “LUFP7 - Tutorial Example.pb”. 4.2.3.
4. Software Implementation of the Gateway Double-click on the line that corresponds to the Profibus-DP master to open the “Master Configuration” window. In the “DP Support” frame, verify that the "Auto addressing" box has been checked. Lastly, select the Profibus-DP master and run the “Bus Parameter…” option from the “Settings” menu to configure the Profibus-DP network baud rate.
4. Software Implementation of the Gateway 4.2.5. Selecting and Adding the Gateway to the Profibus-DP Network Run the “Slave…” option from the “Insert” menu (or click on the looks like a button). Move the mouse pointer (which now ) to the position where you want to add the LUFP7 gateway, then left-click. In the window that appears, select the “LUFP7” slave, then click the “Add >>” button. If need be, edit its address and name. Gateway address configuration is detailed in chapter 2.7.
4. Software Implementation of the Gateway • In the “Assigned master” frame, check that the Profibus-DP master previously configured is selected. If not, select it. N.B. Only the "Assigned master" can control the DP slave to which it has been allocated during the configuration phase. Other DPM1 masters can only read its I/O values. • In the "General" frame, verify that the two boxes "Activate device in actual configuration" and "Enable watchdog control" are both checked. If not, please check both.
4. Software Implementation of the Gateway 4.2.7. Saving and Exporting the Profibus-DP Network Configuration Save the configuration by giving it a name (“Save” or “Save As…” option from the “File” menu). The configuration of the Profibus-DP network is then saved in a “.pb” file. In order to export this configuration for PL7 PRO, follow these steps: • Select the line that corresponds to the Profibus-DP master (TSX PBY 100). • Run the “Export ► ASCII” option from the “File” menu.
4. Software Implementation of the Gateway 4.2.9. Configuring the Gateway I/O under PL7 PRO Using the information located in the selected “.cnf” file, PL7 PRO establishes a direct relation between the data for each Profibus-DP slave and its equivalent I/O. To view the LUFP7 gateway I/O, click on the line of the address 2 station in the "PROFIBUS-DP slave configuration" frame.
4. Software Implementation of the Gateway The correspondence between the content of the gateway's input memory (see chapter 10.2.1 Input Data Memory Area, page 95) and the PLC inputs “%IW4.0” to “%IW4.0.15” is given in the following table: Service PLC input Managing the downstream Modbus network %IW4.0.00 %IW4.0.10 %IW4.0.20 %IW4.0.30 %IW4.0.40 %IW4.0.50 %IW4.0.60 %IW4.0.70 %IW4.0.80 %IW4.0.90 %IW4.0.10 %IW4.0.11 %IW4.0.12 %IW4.0.13 %IW4.0.
4. Software Implementation of the Gateway 4.2.10. Description of Services Assigned to Gateway Inputs/Outputs Managing the downstream Modbus network: Refer to chapter 5.3 Diagnostic Only, page 41, for a detailed description of that service, and to chapter 11.2 LUFP7 Gateway Initialization and Diagnostics, page 98, for an advanced sample use. In the case of the gateway’s default configuration, under AbcConf, the “Control/Status Byte” field of the “ABC” element is equal to “Enabled but no startup lock.
4. Software Implementation of the Gateway 4.2.11. Validating and Saving the Configuration of the TSX BP 100 Coupler Î Validate the various operations conducted under PL7 PRO using the Î Close the configuration window of the TSX PBY 100 coupler. Î In the PLC's hardware configuration window, click on the Î Save the PL7 PRO application by giving it a name. button. button again. 4.2.12.
4. Software Implementation of the Gateway 4.2.13. Using and Monitoring the TSX PBY 100 Coupler Configuration After validating all the changes previously made, you may check the configuration of the TSX PBY 100 coupler, the Profibus-DP network, and the LUFP7 gateway by downloading the PL7 PRO application to the PLC and conducting a monitoring operation using the TSX PBY 100 coupler debug screen.
5. Gateway Initialization and Diagnostics Each of the three sub-chapters 5.2, 5.3 and 5.3.2 describes the principle used to initialize and carry out diagnostics on the gateway using each of the three options offered by the gateway. These options can be configured via AbcConf, by changing the assignment of the “Control/Status Byte” field for the “ABC” element (see chapter 6.12.2 “ABC” Element, page 82). The links between these sub-chapters and these options are as follows: “Control/Status Byte” field........
5.2.1. Profibus-DP Master Control Word The output word located at addresses 16#0200 (MSB) and 16#0201 (LSB) in the gateway’s output memory constitutes the Profibus-DP master command word. Its structure is described below: Bits 15 Description FB_HS_CONFIRM: Acknowledgement bit of a gateway diagnostic The Profibus-DP master must compare the value of the FB_HS_CONFIRM bit to the value of the ABC_HS_SEND bit (bit 15 in the gateway’s status word).
5. Gateway Initialization and Diagnostics Bits 14 13 0-12 Description FB_HS_SEND: New command from the Profibus-DP master Before changing the value of FB_DU, the Profibus-DP master must compare the values of FB_HS_SEND and ABC_HS_CONFIRM (bit 14 of the gateway’s status word). If these two values are different, this means that the gateway has not yet acknowledged the previous Profibus-DP master command.
5. Gateway Initialization and Diagnostics 5.2.2. Gateway Status Word The input word located at addresses 16#0000 (MSB) and 16#0001 (LSB) in the gateway’s input memory constitutes the gateway’s status word. Its structure is described below: Bits 15 14 13 12 8-11 0-07 Description ABC_HS_SEND: New gateway diagnostic (See description of bit 15 of the Profibus-DP master command word, FB_HS_CONFIRM.
5. Gateway Initialization and Diagnostics The values of the EC and ED fields are described in the table below: EC 2#0000 2#0001 2#0010 2#0011 2#0100 Description of the error Re-transmissions on the Modbus network A Modbus slave is missing Several Modbus slaves are missing Excessive data in a Modbus response Unknown Modbus error ED Number of retransmissions (1) Address of the missing Modbus slave — Notes Total number of re-transmissions carried out on the sub-network, for all slaves.
5. Gateway Initialization and Diagnostics Bits 13 12 8-11 0-07 Description ABC_DU: Modbus exchanges activated The gateway activates this bit to tell the Profibus-DP master that the Modbus data located in its input memory area have all been updated at least once since the last activation of FB_DU (“ABC_DU” means “ABC – Data Updated”). These Modbus input data include every data in responses from all Modbus slaves, for both periodic commands and aperiodic commands.
5. Gateway Initialization and Diagnostics 5.3.2. Profibus-DP Master Control Word The output word located at addresses 16#0200 (MSB) and 16#0201 (LSB) in the gateway’s output memory constitutes the Profibus-DP master command word. Its structure is described below: Bits 15 0-14 Description FB_HS_CONFIRM: Acknowledgement bit of a gateway diagnostic The Profibus-DP master must compare the value of the FB_HS_CONFIRM bit to the value of the ABC_HS_SEND bit (bit 15 in the gateway’s status word).
6. Configuring the Gateway Each part of this chapter describes a separate step allowing the user to personalize the gateway configuration, according to his own particular needs. Each part gives an introduction to a basic operation isolating it from the rest of the configuration and describing the operations to be carried out using AbcConf (mainly) and SyCon (where necessary), and their implications for the gateway’s general behaviour.
6. Configuring the Gateway 6.1.1.
6. Configuring the Gateway 6.2. Installing AbcConf The minimum system requirements for AbcConf are as follows: • • • • • Processor .......................................Pentium 133 MHz Free hard disk space......................10 Mb RAM................................................08 Mb Operating system ...........................MS Windows 95 / 98 / ME / NT / 2000 Browser ..........................................MS Internet Explorer 4.
6. Configuring the Gateway 6.4. Transferring a Configuration to the Gateway When using AbcConf, you can transfer the configuration you are editing to the gateway at any time. Choose “Download configuration to ABC-LUFP” from the “File” menu or click on the button, in the AbcConf toolbar. AbcConf initializes a check test of the gateway type.
6. Configuring the Gateway The upper part of this window allows you to choose a Modbus command, to edit its contents, then to send it to the Modbus network (“Command” menu). The response will then be displayed in this same part. Please see chapter 2.10 Node monitor in the AbcConf user manual, entitled AnyBus Communicator – User for further information about how to use this window. This manual can be found on the CD LU9CD1 : “ABC_User_Manual.pdf”.
6. Configuring the Gateway 6.6. Deleting a Modbus Slave This step allows you, for instance, to free up a location on the downstream Modbus network, known as the “SubNetwork” in AbcConf, in order to replace one Modbus slave with another. In fact the gateway’s default configuration already allows it to communicate with eight TeSys U motor starters, whereas the maximum number of Modbus slaves with which it can communicate is limited to eight.
6. Configuring the Gateway However, these operations are not necessary when deleting a single slave. Conversely, they become almost essential when most of the Modbus slaves are deleted, because these deletions divide up the gateway’s memory. Please see chapter 6.11 Adding and Setting Up a Modbus Command, page 68, which describes all of the changes you can make to the configuration of each of the Modbus commands. 6.7.
6. Configuring the Gateway Importing/exporting a Modbus slave configuration: AbcConf offers the possibility of independently saving and loading the configuration of a node on the downstream “Sub-Network”. For instance, this will allow you to build a library of Modbus slave templates, so that you can use them in any configuration. To save the configuration of a Modbus slave, select the node it corresponds to, then choose “Save Node” from the menu whose name corresponds to the name of the selected node.
6. Configuring the Gateway 6.8. Changing the Periodic Data Exchanged with a Modbus Slave This operation consists of replacing, adding or deleting periodic data exchanged with one of the Modbus slaves. With each of these operations, we shall take the default configuration of the LUFP7 gateway as an example, that is to say that any changes previously made will have been cancelled at the start of each operation. In addition, the operations to be carried out are shown as part of a targeted example.
6. Configuring the Gateway 6.8.2. Replacing an Output Periodic Data Element E.g. “TeSys U n°6” motor starter. We are trying to replace the control of the “Command Register” (address 704 = 16#02C0) with the control of the “2nd Command Register” (address 705 = 16#02C1). The operation consists of changing the value of the “Starting Address” in the “Query” and in the “Response” for the “Preset Multiple Registers” command (Modbus command for writing values of a number of registers).
6. Configuring the Gateway 6.8.3. Increasing the Amount of Periodic Input Data E.g. “TeSys U n°2” motor starter. We are trying to complete the monitoring of this motor starter starting from the currently monitored register, that is to say “TeSys U Status Register” (address 455 = 16#01C7), and going as far as the “Reserved: 2nd Warning Register” (address 462 = 16#01CE). The number of registers monitored is therefore increased from 1 to 8. In this case, there are quite a lot of operations to be carried out.
6. Configuring the Gateway 3) Changing the location of the Modbus data received in the gateway’s memory: As the number of bytes read (see previous step) has increased from 2 to 16, the Modbus data received must be placed at a different location in the gateway’s memory, and the size of the memory occupied must also be adjusted appropriately. If you are not certain how much of the gateway’s memory is currently occupied, select “Sub-Network” and choose “Monitor” from the “Sub-Network” menu.
6. Configuring the Gateway To check that these changes have been entered into the configuration, choose “Monitor” from the “SubNetwork” menu again: In point 6), you shall make sure that the total input and ouput sizes of the configured modules are the same as the exchange sizes displayed in the “Sub-network Monitor.” In the current example, “In Area 48 bytes” and “Out Area 32 bytes” imply that the modules combined under SysCon must have a total of 24 IW and 16 OW.
6. Configuring the Gateway Under SyCon, all the configured modules start from an even address (word-aligned). When you change a configuration that includes a one-byte module, you must remove it (“Remove module” button or double-click on the module in the list of configured modules, see page 65) before adding “IN/OUT”, “INPUT” and “OUTPUT” modules to the list of configured modules. This type of module should therefore only be at the end of the list. N.B.
6. Configuring the Gateway Service PLC input Managing the downstream Modbus network %IW4.0.00 %IW4.0.10 %IW4.0.20 %IW4.0.30 %IW4.0.40 %IW4.0.50 %IW4.0.60 %IW4.0.70 %IW4.0.80 %IW4.0.
6. Configuring the Gateway 2) Changing the number of data bytes in the Modbus query: The number of bytes written into the memory of the “TeSys U n°4” motor starter memory increases from 2 to 4, as the number of registers controlled has increased from 1 to 2. Select the “Byte count” element from the “Query” and change its value as shown below. AbcConf will automatically convert any value entered in decimal to hexadecimal.
6. Configuring the Gateway To see which memory locations are occupied by data from the command you are interested in, all you have to do is uncheck the box corresponding to the “Preset Multiple Registers” command from the “TeSys U n°4” node, as shown above. We can see that the Modbus data transmitted with the query corresponding to this command occupy 2 bytes located from address 16#0208. Memory locations 16#0200 and 16#0201 are reserved (see chapter 5 Gateway Initialization and Diagnostics, page 37).
6. Configuring the Gateway To check that these changes have been entered into the configuration, choose “Monitor” from the “SubNetwork” menu again: In point 6), you shall make sure that the total input and ouput sizes of the configured modules are the same as the exchange sizes displayed in the “Sub-network Monitor.” In the current example, “In Area 32 bytes” and “Out Area 36 bytes” imply that the modules combined under SysCon must have a total of 16 IW and 18 OW.
6. Configuring the Gateway In this case, all you have to do is add an “INPUT: 4 Byte (2 word)” module after the module configured for the gateway, as the number of input bytes in the default configuration is even (word-aligned). Under SyCon, all the configured modules start from an even address (word-aligned).
6. Configuring the Gateway Service PLC output Managing the downstream Modbus network %QW4.0.00 %QW4.0.10 %QW4.0.20 %QW4.0.30 %QW4.0.40 %QW4.0.50 %QW4.0.60 %QW4.0.70 %QW4.0.80 Periodic communications — Controlling TeSys U motor starters Aperiodic communications — Reading the value of a motor starter parameter (QUERY) Aperiodic communications — Writing the value of a motor starter parameter (QUERY) Aperiodic communications (“Trigger bytes” for the queries) %QW4.0.90 Periodic communications — %QW4.0.
6. Configuring the Gateway 2) Deleting the read command for a parameter: Select the personalized “Transactions 1” command and delete it with the “Del” key (or “Delete” from the menu whose name corresponds to the name of the selected node). A request for confirmation appears, asking you whether or not to proceed deleting the “Transactions 1” command. In this case confirm with the “Yes” button.
6. Configuring the Gateway You will note that the “TeSys U n°1” section now only has the two Modbus commands common to the eight TeSys U motor starters, and that the memory locations which corresponded to the two personalised commands are now free. N.B. The free memory location at address 16#0012 in the gateway’s memory is no longer part of the gateway’s inputs, because there is no input data used beyond this address.
6. Configuring the Gateway Then you should save and export the configuration of the Profibus-DP network, as described in chapter 4.2.7 Saving and Exporting the Profibus-DP Network Configuration, page 31. 8) Configuring the inputs and outputs of the Profibus-DP master PLC: under PL7 PRO, import the new configuration of the Profibus-DP network (see chapter 4.2.8 Importing the Configuration of the Profibus-DP Network under PL7 PRO and following chapters, from page 31). Only words %IW4.0 to %IW4.0.8 and %QW4.
6. Configuring the Gateway 6.10. Changing a Modbus Slave Configuration Configuring a Modbus slave itself remains very simple because it only involves the name and the Modbus address of the node to which it corresponds. On the contrary, configuring Modbus commands is much more complete and is the subject of a separate object of its own (see chapter 6.11 Adding and Setting Up a Modbus Command, page 68). You will need to change the configuration of a Modbus slave when you add a new Modbus unit (see chapter 6.
6. Configuring the Gateway 6.11. Adding and Setting Up a Modbus Command 6.11.1. With the TeSys U Motor Starters With TeSys U motor starters, the main use of adding a Modbus command consists of allowing you to control or monitor additional registers, without having to change the elements in the default configuration. So, the operation of the periodic and aperiodic communication services remains the same as for the default configuration, unlike the operations described in the various parts of chapter 6.
6. Configuring the Gateway Name of the Modbus command Modbus query ! Frame " Slave no. Function no. No. of the 1st word (MSB / LSB) Number of words (MSB / LSB) Number of bytes …Values of the words (MSB/LSB)… CRC16 (LSB / MSB) Modbus response ! Frame " Slave no. Function no. No. of the 1st word (MSB / LSB) Number of words (MSB / LSB) CRC16 (LSB / MSB) Name of the Modbus command Modbus query ! Frame " Slave no. Function no. No.
6. Configuring the Gateway 6.11.2. With a Generic Modbus Slave Unlike the previous chapter, here we will be looking at adding and setting up a Modbus command which is different from those configured by default with the LUFP7 gateway. We will benefit from this occasion to exhaustively describe the fields allowing you to set up the management of communications for a command of this sort.
6. Configuring the Gateway Name of the Modbus slave Name of the Modbus command Modbus query ! Frame " Slave no. Function no. Word no. (MSB / LSB) Value of the word (MSB / LSB) CRC16 (LSB / MSB) Modbus response ! Frame " Slave no. Function no. Word no. (MSB / LSB) Value of the word (MSB / LSB) CRC16 (LSB / MSB) These elements can be configured using AbcConf. There is a description of them in the following chapters. We will then return to the example of the ATS48 to illustrate how to use these elements. 6.
6. Configuring the Gateway 6.11.2.2. Configuring the Query Select the “Query” element from the Modbus command. The various elements of the configuration of the query for this command are shown opposite. The values displayed correspond to the default values for any new command. These elements allow you to configure how the whole command is managed, including how degraded modes are managed (number of re-transmissions, for example). Each of these elements is described, in order, in the table below.
6. Configuring the Gateway Configuration element Retries Timeout time (10ms) Trigger byte address Description This element indicates the number of re-transmissions carried out by the gateway if there is no response from the Modbus slave to a query, or if the response is incorrect. This retransmission process ceases as soon as the gateway gets a correct response within a given time.
6. Configuring the Gateway Configuration element Update mode Update time (10ms) Description This element is used to specify the transmission mode for the query on the Modbus network. It takes one of the following four values: - Cyclically................................. Default communication mode. The query is transmitted periodically on the Modbus network (see “Update time”). - On data change ......................
6. Configuring the Gateway 6.11.2.3. Configuring the Response Next select the “Response” element from the Modbus command. The various elements of the configuration of the response for this command are shown opposite. The values displayed correspond to the default values for any new command. These elements allow you to configure a single aspect of managing the command, described below. Each of them is described, in order, in the table below.
6. Configuring the Gateway Configuration element Trigger byte address (contd.) Description The Profibus-DP master PLC will be able to detect the receipt of a response from a Modbus slave by comparing the previous value and the current value of the associated counter (address 16#001E or 16#001F).
6. Configuring the Gateway Field in the frame Slave Address Size in the frame 1 byte Function 1 byte Register 2 bytes Preset Data 78 2 bytes or more for a block of data Description This field cannot be changed by the user and its value is greyed out to inform him of the fact. AbcConf updates the value of this field automatically using the address of the Modbus slave corresponding to the current node. N.B.: This field is common to queries for all Modbus commands. E.g.
6. Configuring the Gateway Field in the frame Preset Data (contd…) Size in the frame Checksum 2 bytes Description Byte swap: Specifies whether the output data bytes to be transmitted to the Modbus slave must be swapped before being placed in the Modbus frame or not. The three possible values are as follows: - No swapping ....... Default configuration. The data is sent in the same order as they appear in the gateway’s memory.
6. Configuring the Gateway If the value of a field from the response of a Modbus slave is different from that configured via AbcConf, the response will be rejected by the gateway. It will then proceed to a re-transmission of the query, provided that at least one re-transmission has been configured for this command (see chapter 6.11.2.2 Configuring the Query, page 72).
6. Configuring the Gateway 6.11.3. Adding a Special Modbus Command Apart from the standard Modbus commands covered in the previous chapter, it is possible to create two types of special Modbus commands: Modbus commands using the same template as standard commands and Modbus commands whose nature and frame content can be completely changed by the user. 6.11.3.1. Modbus Commands Based on Standard Commands You create a command of this type from the “Select Command” window (see chapter 6.11.
6. Configuring the Gateway Constants in Byte, Word or DWord format allow you to relieve the Profibus-DP master by placing the values of these constants in Modbus query frames (constants in “Query” elements) or by comparing them to the values located in the Modbus responses (constants in “Response” elements). These comparisons are used to accept (identical values) or reject (different values) the Modbus responses in the same way as for standard Modbus commands.
6. Configuring the Gateway The only command accessible from the “Fieldbus” menu is “About Fieldbus…”. In “on-line” mode (see chapter 6.12.2 “ABC” Element, page 82), the window shown opposite will be displayed. In “off-line” mode the word “Unknown” will replace “Profibus-DP” to show that the type of upstream network cannot be identified. 6.12.2. “ABC” Element The two commands accessible from the “ABC” menu are “About ABC…” and “Disconnect” (or “Connect” if you are in “off-line” mode).
6. Configuring the Gateway Apart from the “Control/Status Byte” and “Module Reset” options, the configuration of the LUFP7 gateway’s “ABC” element should not be changed. Out of the four options shown below, the last two should therefore retain the values shown: “Serial” and “Master Mode”.
6. Configuring the Gateway - “Sub-Network Status…”: In “on-line” mode (see chapter 6.12.2 “ABC” Element, page 82), this command displays a window summarizing the values of the gateway’s error counters. These counters are also used by the gateway to update the value of its status word (see chapter 5.2.2 Gateway Status Word, page 40). The “Update” button allows you to refresh the values of these counters.
6. Configuring the Gateway 6.13. Adding a Broadcaster Node A broadcaster node does not correspond to any Modbus slave in particular, as it applies to all Modbus slaves. All the commands which will be configured for this node will be transmitted with the “Slave Address” field set to 16#00. This means that all of the slaves will run the command, but that none of them will respond to it. To add a broadcaster node, select “Sub-Network”, then choose “Add Broadcaster” from the “Sub-Network” menu.
7. Appendix A: Technical Characteristics 7.1. Environment Dimensions (excluding connectors) External appearance Torque Power supply Maximum relative humidity Ambient air temperature around the device, in a dry environment UL EC Electromagnetic compatibility (EMC): Transmission Electromagnetic compatibility (EMC): Immunity Height: 120 mm Width: 27 mm Depth: 75 mm Plastic case with device for fixing to a DIN rail. PSU connector: between 5 and 7 lbs.-in.
7. Appendix A: Technical Characteristics Profibus-DP characteristics (cont'd) • Maximum number of stations: 32 stations per segment, repeater included; up to 126 stations with all three repeaters (repeaters included). Address 126 is reserved and should therefore not be used for exchanging data. • Possible types of stations: there are three types of Profibus-DP stations: - Class 1 DP master (DPM1): PLC, PC, etc. exchanging information with DP slaves.
7. Appendix A: Technical Characteristics Profibus-DP LUFP7 gateway specifics (cont'd) Modbus RTU characteristics Specific Modbus RTU features of the LUFP7 gateway Structure of the LUFP7 gateway’s memory: Inputs • Profibus-DP address configured using 2 coding wheels (address between 1 and 99); address 0 is not allowed. • Profibus-DP diagnostics service: Yes (standard 6-byte diagnostic). • "Resetting to zero" operating mode (input reading and output resetting to zero) not supported.
7. Appendix A: Technical Characteristics Structure of the LUFP7 gateway’s memory: Outputs • 2 bytes for the activation or inhibition of the downstream network by the gateway (see chapter 5 Gateway Initialization and Diagnostics, page 37). • 242 bytes accessible by the Profibus-DP master in the form of output data (see chapter chapitre 10.2.2 Output Data Memory Area, page 96, for default use of these output data).
8. Appendix B: LUFP7 Gateway GSD File The LUFP7 gateway GSD file contains all the information and settings for configuring the gateway under Profibus-DP. This file, “Tele071F.gsd”, is used by SyCon to generate information that will eventually be used by the DPM1 master PLC during setup phases. Refer to chapter 4.2.4 Setting up the Gateway Description Files, page 28, to review the procedure for importing the GSD file under SyCon. 8.1.
8. Appendix B: LUFP7 Gateway GSD File ; Supported baudrates 9.6_supp = 1 19.2_supp = 1 45.45_supp = 1 93.75_supp = 1 187.5_supp = 1 500_supp = 1 1.5M_supp = 1 3M_supp = 1 6M_supp = 1 12M_supp = 1 ; Maximum responder MaxTsdr_9.6 MaxTsdr_19.2 MaxTsdr_45.45 MaxTsdr_93.75 MaxTsdr_187.5 MaxTsdr_500 MaxTsdr_1.5M MaxTsdr_3M MaxTsdr_6M MaxTsdr_12M Communication rates supported by the LUFP7 gateway. All rates should be mentioned in this section. The gateway supports all the baud rates of the Profibus-DP networks.
8.
9.
10. Appendix C: Default Configuration The configuration described below corresponds to the LUFP7 gateway’s default configuration. This chapter mainly gives the user information about the performances obtained on the downstream Modbus network. It allows the user to decide whether, for example, he should change the period for cyclical exchanges with one or more of the TeSys U motor starters (see chapter 6 Configuring the Gateway, page 44). 10.1.
10. Appendix C: Default Configuration 10.2. Content of the Gateway’s DPRAM Memory The LUFP7 gateway’s DPRAM memory contains all of the data exchanged between the gateway and the 8 TeSys U motor starters, as well as two special registers only exchanged between the gateway and the Profibus-DP master (words used for managing the downstream Modbus network).
10. Appendix C: Default Configuration 10.2.2. Output Data Memory Area The gateway has 244 output bytes. Only the first 32 bytes are used. One should therefore configure only one 32byte input/output module using a Profibus-DP configuration device such as SyCon.
11. Appendix D: Sample Use under PL7 PRO A practical example can be found on the CD LU9CD1. It is composed of four files. • The first file, “LUFP7_Tutorial_EN.pb”, is a SyCon file for a Profibus-DP network. It therefore represents the configuration of the Profibus-DP network, as it is described in the previous chapters. This file is useful only if you wish to change the configuration. • The second file, “LUFP7EN.cnf”, is the configuration file exported in ASCII format from SyCon.
11. Appendix D: Sample Use under PL7 PRO This description remains concise, because it is only meant to describe the overall operation of the program and the way to use the related screen. If you need further detail, don't hesitate and review the actual content of the example under PL7 PRO. The source code is commented by and large to help you understand how this works. Each "program" file starts with a short description of the way it operates, and each line includes a comment.
11. Appendix D: Sample Use under PL7 PRO • Comprehensive display of LUFP7 gateway diagnostics, via a thorough interpretation of the gateway status word (see chapter 5.2.2 Gateway Status Word, page 40). This interpretation is made in the program “Handshake_lufp7”. A button appears as soon as a new diagnostic is made available by the gateway for the Profibus-DP master. Pressing that button takes the new value of the gateway status word into account and acknowledges the new diagnostic.
11. Appendix D: Sample Use under PL7 PRO 11.3. Controlling and Supervising the 8 TeSys U Motor Starters The “Supervision Control” operating screen (see picture below) is meant to monitor the status of the 8 TeSys U motor starters, numbered from 1 to 8. It is also meant to control them individually using several buttons. Registers 455 and 704 of each of the 8 TeSys U motor starters are used to conduct this control and supervision: 455 – TeSys U status register (IEC61915) Bit 0 ..........
11. Appendix D: Sample Use under PL7 PRO The “Sr0” sub-program is called once per motor starter from the “Cmd_mon” program. Each of these calls should be made with a different value in the word %MW0 (between 0 and 7) as it is used to index the status word and the command word of the same motor starter.
11. Appendix D: Sample Use under PL7 PRO • The second frame, “Parameter Address,” allows you to set the address of the parameter to read/write. When the “SEND command” button is being pushed, the value currently set in this frame is copied into the “Read parameter address” field of the reading command (%QW4.0.10) or into the “Written parameter address” field of the writing command (%QW4.0.13). • The third frame, “Value for WRITING,” will only be used if the “Parameter Writing” command is to be issued.
11. Appendix D: Sample Use under PL7 PRO The “Pkw_service” program includes the ST instructions that use the settings and values from the first frames of the previously described “PKW Service” operation screen. These instructions are mainly designed to update the PLC outputs that relate to the commands of the aperiodic parameter reading/writing service (%QW4.0.9 to %QW4.0.11 for the read command, %QW4.0.12 to %QW4.0.14 for the write command, and %QW4.0.15 for the counters associated to these two commands).
12. Appendix E: Profibus-DP Data and Diagnostics The various elements presented here are detailed in the documentation of the Profibus-DP master you will have to use. In the case of the TSX PBY 100 coupler of the Premium automatic controls, for example, these elements are detailed in the Implementation Manual – TSX PBY 100 – PROFIBUS-DP (ref.: TSX DM PBY 100E), and in the PL7 PRO on line help (help path: Communication Æ Profibus-DP).
12. Appendix E: Profibus-DP Data and Diagnostics 12.2. Gateway Configuration Data These data are transmitted to the Profibus-DP master upon gateway initialization exchanges. These exchanges enable the Profibus-DP master to set up, configure, and diagnose each of the slaves. The TSX PBY 100 coupler conducts these setup exchanges, but they are not documented in its Implementation Manual.
12.
12.
13. Appendix F: Modbus Commands Only the Modbus commands shown in the right-hand table are supported by the gateway. The structure of the query and response frames for each of these commands is then described in the following chapters.
13. Appendix F: Modbus Commands Chapter 6.11 Adding and Setting Up a Modbus Command, page 68, also shows a few examples of correspondences between the elements displayed in AbcConf and the corresponding Modbus frame fields. See also: Chapter 6.11.2 With a Generic Modbus Slave, page 70, and chapter 6.11.3 Adding a Special Modbus Command, page 80, if the implementation of one of these commands would be incompatible with its implementation in the gateway, for example.
13. Appendix F: Modbus Commands 13.3.
13. Appendix F: Modbus Commands Code 16#01 16#02 16#03 16#04 16#05 (1) 16#06 (1) 16#07 (1) 16#08 (1) Name of the Description of the exception exception ILLEGAL FUNCTION The query’s “Function” command code is not implemented in the Modbus slave software, or it is unable to process it for the moment. ILLEGAL DATA The combination of the query’s “Starting Address” and “No.
14. Appendix F : Concept and Quantum PLC The default data type of Concept with a Quantum PLC is "BOOL". As shown in the first drawing hereafter, "BOOL" should not be used for the data storage of the LUFP7. The bytes (MSB/LSB) and bits are twisted with data type "BOOL". The data type for the LUFP7 gateway at Concept should be changed to "INT16" or "UINT16". In this case the data storage of the gateway and the PLC is identical.
14. Appendix F : Concept and Quantum PLC Page left intentionally blank.
User’s Manual LUFP7 V1.