Gateway Prosoft Modbus To Profibus DP
Gateway Prosoft Modbus To Profibus DP
Gateway Prosoft Modbus To Profibus DP
USER MANUAL
How to Contact Us
ProSoft Technology 5201 Truxtun Ave., 3rd Floor Bakersfield, CA 93309 +1 (661) 716-5100 +1 (661) 716-5101 (Fax) www.prosoft-technology.com support@prosoft-technology.com Copyright 2011 ProSoft Technology, Inc., all rights reserved. 5204SE-MNET-PDPMV1 User Manual January 28, 2011 ProSoft Technology , ProLinx , inRAx , ProTalk , and RadioLinx are Registered Trademarks of ProSoft Technology, Inc. All other brand or product names are or may be trademarks of, and are used to identify products and services of, their respective owners.
WARNING - EXPLOSION HAZARD - SUBSTITUTION OF COMPONENTS MAY IMPAIR SUITABILITY FOR CLASS I, DIV. 2; WARNING - EXPLOSION HAZARD - WHEN IN HAZARDOUS LOCATIONS, TURN OFF POWER BEFORE REPLACING OR WIRING MODULES WARNING - EXPLOSION HAZARD - DO NOT DISCONNECT EQUIPMENT UNLESS POWER HAS BEEN SWITCHED OFF OR THE AREA IS KNOWN TO BE NON-HAZARDOUS. THIS DEVICE SHALL BE POWERED BY CLASS 2 OUTPUTS ONLY.
Markings
Label Markings
<cULus> E183151 Class I Div 2 Groups A,B,C,D T6 -30C <= Ta <= 60C <Ex> II 3 G EEx nA IIC T6 -20C <= Ta <= 50C II Equipment intended for above ground use (not for use in mines). 3 Category 3 equipment, investigated for normal operation only. G Equipment protected against explosive gasses.
E183151
Contents
Your Feedback Please ........................................................................................................................ 2 How to Contact Us .............................................................................................................................. 2 ProSoft Technology Product Documentation .................................................................................... 2 Important Installation Instructions ....................................................................................................... 3 ProLinx Products Warnings ............................................................................................................... 3 Markings .............................................................................................................................................. 4
1
1.1 1.2 1.3
Scope
9
Learning Objectives ................................................................................................... 9 Prerequisites ............................................................................................................. 9 System Requirements ............................................................................................. 10
2
2.1 2.2 2.3 2.4 2.5
Functional Overview
11
General Overview.................................................................................................... 11 Architecture ............................................................................................................. 12 Data Flow Through the Gateway ............................................................................ 13 PROFIBUS DP Pass-Through Data Flow ............................................................... 15 Cyclic Polling and Acyclic Messaging Control Logic ............................................... 17
3
3.1 3.2
Procedures
21
3.2.1 3.2.2 3.2.3 3.3 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.4 3.4.1 3.4.2 3.4.3 3.5 3.5.1 3.5.2 3.5.3 3.5.4 3.5.5 3.5.6 3.5.7
ProLinx Reference Guide ........................................................................................ 21 Installing ProSoft Configuration Builder Software ................................................... 22 Using the Online Help ............................................................................................. 22 Using ProSoft Configuration Builder ....................................................................... 23 Setting Up the Project ............................................................................................. 23 Configuring the Gateway ......................................................................................... 26 Configuring the PROFIBUS DP Network ................................................................ 26 Profibus Master DPV1 ............................................................................................. 35 Configuring the MNET Server Settings (Optional) .................................................. 41 Configuring the MNET Client (Optional) .................................................................. 42 Configuring Ethernet Settings ................................................................................. 42 Backing Up the Project ............................................................................................ 44 Downloading the Project to the Gateway ................................................................ 46 Exporting the Unity Pro v 4.0 Logic Support Files from PCB .................................. 50 Password Protecting the Configuration ................................................................... 52 Creating a Password ............................................................................................... 53 Changing a Password ............................................................................................. 55 Removing Password Protection .............................................................................. 57 Configuring the Modicon M340 Processor with Unity Pro....................................... 59 Creating a New M340 Project ................................................................................. 59 Configuring the Memory Size for the M340 Processor ........................................... 63 Importing the M340 Functional Module (.XFM File) ................................................ 66 Importing the M340 Variables (.XSY file) ................................................................ 70 Building the M340 Project ....................................................................................... 71 Downloading the Project to the Quantum Processor .............................................. 74 Verifying Communication Between the M340 Processor and the Gateway ........... 74
Page 5 of 245
4
4.1 4.2 4.3 4.4
Reference
97
Basics of Working with Unity Pro ............................................................................ 97 Unity Pro Program Objects and Organizing Structures .......................................... 99 Modbus TCP/IP Communication Control in M340 and Quantum PACs ................ 99 Modicon M340 Variables, Derived Data Types, and Derived Function Blocks .... 100 4.4.1 M340 Modbus Variables and Derived Data Types (DDTs) .................................. 100 4.4.2 MNETDPV1_BASICVAR Variables and DDTs - M340 ........................................ 102 4.4.3 MNETDPV1_MailVar Variables and DDTs - M340 .............................................. 103 4.4.4 Cyclic I/O Variables, DDTs and DFBs - M340 ...................................................... 104 4.4.5 Sample Control and Sequencing Logic for Cyclic Data Polling - M340 ............... 114 4.4.6 Acyclic Mailbox Message DFBs - M340 ............................................................... 116 4.5 Modicon Quantum Variables, Derived Data Types and Derived Function Blocks 136 4.5.1 Quantum Communication Control and Data Buffer Variables and Derived Data Types (DDTs) ............................................................................................................................ 136 4.5.2 MNETDPV1_BASICVAR Variables and DDTs - Quantum .................................. 141 4.5.3 MNETDPV1_MailVar Variables and DDTs - Quantum......................................... 142 4.5.4 Cyclic I/O Variables, DDTs and DFBs - Quantum ................................................ 144 4.5.5 Sample Control and Sequencing Logic for Cyclic Data Polling - Quantum .......... 158 4.5.6 Acyclic Messaging DFBs - Quantum .................................................................... 159 4.6 PROFIBUS Acyclic Telegram (Message) Block Structures ................................. 184 4.6.1 Set Operating Mode Message Structure .............................................................. 184 4.6.2 Get Live List Message Structure........................................................................... 186 4.6.3 Get (Extended) Slave Diagnostics Message Structure ........................................ 188 4.6.4 Get Slave Configuration Message Structure ........................................................ 190 4.6.5 Stop Slave Message Structure ............................................................................. 192 4.6.6 Start Slave Message Structure ............................................................................. 194 4.6.7 Set Slave Mode Message Structure ..................................................................... 196 4.6.8 Set Slave Address Message Structure ................................................................. 199 4.6.9 Get Database Information Message Structure ..................................................... 201 4.6.10 Read Class 1 Acyclic Data Message Structure .................................................... 203 4.6.11 Write Class 1 Acyclic Data Message Structure .................................................... 205 4.7 Acyclic Mailbox Message Error Codes ................................................................. 207 4.7.1 Acyclic Message Status Word .............................................................................. 207 4.7.2 Return Codes ........................................................................................................ 208 4.7.3 Error Codes........................................................................................................... 208 4.7.4 DP-V1 Error Codes ............................................................................................... 209 4.7.5 Command Error Codes ......................................................................................... 210 4.8 PROFIBUS comDTM ............................................................................................ 211 4.8.1 ProSoft Technology Product Availability ............................................................... 211 4.8.2 Introduction to PROFIBUS comDTM .................................................................... 212 4.8.3 System Requirements .......................................................................................... 215 4.8.4 Installation ............................................................................................................. 216 4.8.5 Quick Start ............................................................................................................ 217
Page 6 of 245
Verifying the comDTM Version and comDTM Install Version ............................... 224
5
5.1 5.2
Conclusion
231
ProSoft Technology Support ................................................................................. 231 How to Get Help .................................................................................................... 232
233
Contacting Technical Support ......................................................................................................... 233 6.1 Return Material Authorization (RMA) Policies and Conditions.............................. 235 6.1.1 Returning Any Product .......................................................................................... 235 6.1.2 Returning Units Under Warranty ........................................................................... 236 6.1.3 Returning Units Out of Warranty ........................................................................... 236 6.2 LIMITED WARRANTY........................................................................................... 237 6.2.1 What Is Covered By This Warranty ....................................................................... 237 6.2.2 What Is Not Covered By This Warranty ................................................................ 238 6.2.3 Disclaimer Regarding High Risk Activities ............................................................ 238 6.2.4 Intellectual Property Indemnity .............................................................................. 239 6.2.5 Disclaimer of all Other Warranties ........................................................................ 239 6.2.6 Limitation of Remedies ** ...................................................................................... 240 6.2.7 Time Limit for Bringing Suit ................................................................................... 240 6.2.8 No Other Warranties ............................................................................................. 240 6.2.9 Allocation of Risks ................................................................................................. 240 6.2.10 Controlling Law and Severability ........................................................................... 241
Index
243
Page 7 of 245
Page 8 of 245
Scope
In This Chapter
Learning Objectives ................................................................................. 9 Prerequisites ........................................................................................... 9 System Requirements ........................................................................... 10
1.1
Learning Objectives
When you have completed the steps in this User Manual, you will have learned how to: Understand data flow through the gateway between a Schneider Electric Modicon M340 or Quantum controller using Modbus TCP/IP, and slave devices on a PROFIBUS DP network. Configure the 5204SE-MNET-PDPMV1 as a PROFIBUS DP version 1 Master station to read cyclic data from and write cyclic data to PROFIBUS slave devices. Understand how the Unity Pro v 4.0 Derived Function Blocks (DFBs) created by ProSoft Configuration Builder (PCB) work to transfer PROFIBUS cyclic data and perform any required PROFIBUS acyclic messaging, allowing the Modicon processor to emulate a PROFIBUS DP version 1 Master. Observe that the 5204SE-MNET-PDPMV1 gateway is sending and receiving data on the Ethernet port and PROFIBUS Master port.
1.2
Prerequisites
To get the most benefit from this User Manual, you should have the following skills: Microsoft Windows: Install and launch programs, execute menu commands, navigate dialog boxes, and enter data. PROFIBUS communication: Configure a PROFIBUS network using ProSoft Configuration Builder (PCB) software. Ethernet networking: Connect the 5204SE-Protocol> gateway and a Schneider Electric Modicon M340 or Quantum Programmable Automation Controller (PAC) system to an Ethernet network using valid IP address, subnet mask, and default network gateway settings. Hardware installation and wiring: Install the gateway, safely connect all devices to a power source, and connect the gateways PROFIBUS Master port and its Ethernet port to their respective networks.
Page 9 of 245
1.3
System Requirements
The application described in this User Manual requires the following minimum hardware and software components: Schneider Electric Telemecanique Modicon PAC system with either: o Built-in Modbus TCP/IP Ethernet communication port or o BMXNOE0100 Ethernet Network Module (NOE) Schneider Electric Telemecanique Unity Pro programming software, version 4.0 or higher ProSoft Configuration Builder (PCB) software, version 2.1.8 or higher (on the ProLinx Solutions CD-ROM, or can be downloaded from the website) Supported operating systems and PC hardware required: o Microsoft Windows VISTA Business Edition 32 Pentium IV, 2.4 GHz processor minimum, 3 GHz recommended 1 GB of RAM minimum, 3 GB recommended 8 GB of hard drive space minimum, 20 GB recommended o Microsoft Windows XP Professional with Service Pack 1 or 2 Pentium IV, 1.5 GHz processor minimum, 3 GHz recommended 512 MB of RAM minimum, 1 GB recommended 4 GB of hard drive space minimum, 8 GB recommended VGA or SVGA graphics adapter, 800 x 600 minimum resolution, 24-bit color resolution (True Color) CD-ROM drive, Windows mouse and keyboard PC with DB9Male RS-232 serial port (for full diagnostics using PCB), USB port (for Unity Pro), and Ethernet port (for configuration and PROFIBUS diagnostics using PCB and for Unity Pro) 24 Vdc power supply (not provided) with at least 500 mA current capacity available to power the gateway
Page 10 of 245
Functional Overview
In This Chapter
General Overview.................................................................................. 11 Architecture ........................................................................................... 12 Data Flow Through the Gateway ........................................................... 13 PROFIBUS DP Pass-Through Data Flow.............................................. 15 Cyclic Polling and Acyclic Messaging Control Logic.............................. 17
2.1
General Overview
Automating integration for Schneider Electric (SE) Modicon processors and maximizing ease of use are the hallmark design criteria behind the new ProLinx SE line of communication gateways. The first SE gateway, the 5204SE-MNETPDPMV1 Modbus TCP/IP to PROFIBUS DP-V1 Master gateway, easily turns a Modicon M340 or Quantum Programmable Automation Controller (PAC) into a PROFIBUS DP-V1 Master. The new Application Communication Logic functions built into ProSoft Configuration Builder (PCB) automatically generate all the Unity Pro data types, variables, and logic required for the processor to perform PROFIBUS DP-V1 cyclic and acyclic communication. PCB automatically generates customized export files based on the gateway's PROFIBUS DP network configuration. You can import these files into Unity Pro version 4 software without modification, eliminating the need to write additional communication message logic. Automatically generated Derived Function Block logic also provides advanced PROFIBUS DP-V1 acyclic message pass-through capability. Acyclic messaging allows the processor to request extended slave data and diagnostics, as well as access slave-specific special functions. If you change the configuration of your PROFIBUS DP network in ProSoft Configuration Builder, you can easily export new logic files, and then import them into an existing project.
Page 11 of 245
2.2
Architecture
The following diagram shows an example network that connects a Personal Computer (PC) and a Modicon M340 or Quantum Programmable Automation Controller (PAC) to a ProLinx 5204SE-MNET-PDPMV1 gateway.
You configure the gateway using ProSoft Configuration Builder (PCB) software through an Ethernet connection. The gateway also uses its Ethernet port to support the Modbus TCP/IP protocol, allowing it to communicate with the Modicon processor, as well as other Modbus TCP/IP devices. You can also use the Ethernet connection to manage your PROFIBUS network slaves using ProSoft Technology Field Device Tool/Communications Device Type Manager (FDT/comDTM) drivers for popular plant asset management software, such as PACTware and Endress+Hauser FieldCare. For more information on FDT/comDTM drivers for the gateway, please refer to the ProLinx PDPMV1 Protocol Manual, on the ProLinx Solutions CD-ROM. The gateway's PROFIBUS port allows it to act as a PROFIBUS DP-V1 Master. The special Application Communication Logic functions built into PCB create all the Unity Pro Derived Data Types (DDTs), Variables, and Derived Function Blocks (DFBs) needed by the Modicon processor to be able to send Modbus TCP/IP messages and have those messages turned into PROFIBUS DP-V1 cyclic I/O and acyclic mailbox messages (called telegrams in the PROFIBUS protocol). The gateway can also communicate with PROFIBUS PA slaves though a third-party PROFIBUS DP-to-PA Link Coupler device (not supplied by ProSoft Technology). The gateway has an RS-232 serial port. ProSoft Configuration Builder can use this port to view the gateway's diagnostics and troubleshooting menus. You can also use the serial port to upgrade the gateway's firmware.
Page 12 of 245
2.3
Note: The normal MNET server driver will accept and respond normally to remote Modbus TCP/IP Client requests to read or write data to any address in the gateway's internal database. However, this special SE implementation of the MNET server is slightly different. ProSoft Technology, Inc. January 28, 2011 Page 13 of 245
The SE MNET server will accept and respond to read requests from Modbus TCP/IP Clients in the same way as the normal MNET server. However, for write requests, the SE MNET server will accept and respond normally only if the address or addresses to be written fall in the gateway database area designated for PROFIBUS Cyclic Output Data. This area is internal addresses 1000 through 1767, which have corresponding virtual Modbus addresses of 41001 through 41768 (fivedigit addressing) or 401001 through 401768 (six-digit addressing), as shown in the preceding data flow diagram. Any write requests received by the special SE MNET server that are outside this specific data address range will be rejected by the SE server and an exception response containing Exception Code "02 ILLEGAL DATA ADDRESS" will be returned to the requesting Client. This special modification has been done to preserve the integrity of PROFIBUS Input Data by preventing external Modbus TCP/IP Clients from writing to and thereby corrupting data in this critical area, while allowing any Modbus TCP/IP Client to send data to PROFIBUS slaves by writing it to the PROFIBUS Output Data area.
Page 14 of 245
2.4
Page 15 of 245
The DFBs create Modbus TCP/IP Client (Master) commands, which are transmitted to the ProLinx MNET server (slave) driver. The MNET server recognizes these special Modbus TCP/IP commands as PROFIBUS DP Acyclic mailbox messages, strips out the PROFIBUS DP-V1 acyclic mailbox message parameters contained in the Modbus TCP/IP message, and passes those PROFIBUS message parameters through to the ProLinx PDPMV1 Master driver for transmission to the PROFIBUS slave or slaves indicated in the message. Any response message returned by the a slave to the PDPMV1 Master will be automatically repackaged as a Modbus TCP/IP message and returned to the Modicon processor, where the imported DFBs will process it. This process allows a Modicon processor, using its native Modbus TCP/IP communication ability, to act as a PROFIBUS DP-V1 Master on a PROFIBUS network. By using a third-party PROFIBUS DP to PROFIBUS PA Link Coupler (not supplied by ProSoft Technology), you can extend these PROFIBUS capabilities even further and communicate with PROFIBUS PA slaves.
Page 16 of 245
2.5
Page 17 of 245
Some commands cause data to be returned, such as read commands. Some commands, such as write commands, return only an acknowledgement that the command was received and executed. Commands sometimes fail. Any data or error response to a command returned by the MNET server will be available in the provided Variables or DDTs after being placed there by the triggered DFB that initiated the process cycle. User-created logic in the processor must process data or errors received in the Modbus TCP/IP response, if any. o If no Modbus TCP/IP response is received within the time value specified in a Timeout variable, the triggered DFB will set a Message Error bit flag to indicate the message sequence failed and should be retried by triggering a new message cycle. 4 In cases where PROFIBUS cyclic I/O data, general gateway status, or standard PROFIBUS slave diagnostic data are concerned, these read or write requests from the processor are handled internally in the gateway and are processed asynchronously from any PROFIBUS DP Master processes that might also be running in the gateway. This means these cyclic requests tend to be responded to much more quickly than requests involving acyclic messages that must be "passed-through" to the PROFIBUS Master for execution before a Modbus TCP/IP response can be created and returned to the processor. 5 In cases where PROFIBUS DP-V1 acyclic messages are concerned, these read or write requests require a longer, more involved process cycle, synchronized with actions on the PROFIBUS DP-V1 Master side of the gateway. When the processor sends a Modbus TCP/IP read or write request, using an acyclic message DFB: o User-created logic in the processor sends a Modbus TCP/IP command message containing the data needed for the PROFIBUS DP-V1 acyclic message to the gateway by triggering one of the ten (10) provided acyclic DFBs. o The gateway MNET server must process the incoming command. o The MNET server must pass the acyclic message and any associated data through to the PROFIBUS DP-V1 Master. o The PROFIBUS Master must insert this command in between normal slave data polling messages (send an acyclic message to a particular slave or group of slaves.) o The PROFIBUS Master must receive a response from the addressed PROFIBUS slave. o The PROFIBUS Master must return any PROFIBUS slave response data to the MNET server. o The MNET server must create and return a Modbus TCP/IP response to the processor containing the data, if any, from the PROFIBUS slave or slaves.
Page 18 of 245
Some acyclic messages cause data to be returned. Some acyclic messages return no data. Acyclic messages sometimes fail. Communication failures could happen on either or both the Modbus TCP/IP protocol or the PROFIBUS protocol. Any data or error response to an acyclic message returned by the PROFIBUS Master or the MNET server will be available in the provided Variables or DDTs after being placed there by the triggered DFB that initiated the process cycle. Usercreated logic in the processor must process data received in the PROFIBUS DP or Modbus TCP/IP response, if any. o If no Modbus TCP/IP response is received within the time value specified in a Timeout variable, the triggered DFB will set a Message Error bit flag to indicate the message sequence failed and should be retried by triggering a new message cycle. You can see from the amount of processing involved that it will take somewhat more time for the gateway to respond to acyclic message commands than it will take to respond to cyclic I/O, status and diagnostics requests. 6 Due to the nature of the communication routines used in the processor and the Unity Pro programming language, only one Modbus TCP/IP command can be "active" or "in process" at any one time. All the provided DFBs have internal checks built in to prevent more than one at a time from being active. Therefore, any control or sequencing logic you create must respect and accommodate this processor/language limitation. Part of the accommodations you will have to make is to allow for the differing amounts of time it takes to process cyclic I/O and status commands as well as the increased time it takes to process acyclic messages. 7 All provided DFBs have binary status bits available which can be monitored by your control and sequencing logic to be sure you are not trying to activate more than one DFB-created Modbus TCP/IP message at a time. There is a Message Done bit to indicate the communication cycle completed successfully; and, there is a Message Error bit to indicate the communication cycle did not complete successfully.
Page 19 of 245
Page 20 of 245
Procedures
In This Chapter
ProLinx Reference Guide ...................................................................... 21 Installing ProSoft Configuration Builder Software .................................. 22 Configuring the Gateway ....................................................................... 26 Password Protecting the Configuration ................................................. 52 Configuring the Modicon M340 Processor with Unity Pro ..................... 59 Configuring the Modicon Quantum Processor with Unity Pro ................ 76
3.1
Page 21 of 245
3.2
Open your web browser and navigate to http://www.prosofttechnology.com/pcb 2 Click the DOWNLOAD HERE link to download the latest version of ProSoft Configuration Builder. 3 Choose SAVE or SAVE FILE when prompted. 4 Save the file to your Windows Desktop, so that you can find it easily when you have finished downloading. 5 When the download is complete, locate and open the file, and then follow the instructions on your screen to install the program. If you do not have access to the Internet, you can install ProSoft Configuration Builder from the ProSoft Solutions Product CD-ROM, included in the package with your gateway.
To install ProSoft Configuration Builder from the Product CD-ROM
1 2 3 4
Insert the ProSoft Solutions Product CD-ROM into the CD-ROM drive of your PC. Wait for the startup screen to appear. On the startup screen, click PRODUCT DOCUMENTATION. This action opens a Windows Explorer file tree window. Click to open the UTILITIES folder. This folder contains all of the applications and files you will need to set up and configure your gateway. Double-click the SETUP CONFIGURATION TOOL folder, double-click the PCB_*.EXE file and follow the instructions on your screen to install the software on your PC. The information represented by the "*" character in the file name is the PCB version number and, therefore, subject to change as new versions of PCB are released.
Note: Many of the configuration and maintenance procedures use files and other utilities on the CD-ROM. You may wish to copy the files from the Utilities folder on the CD-ROM to a convenient location on your hard drive.
Your first task is to add the 5204SE-MNET-PDPMV1 gateway to the project. 1 Use the mouse to select DEFAULT MODULE in the tree view, and then click the right mouse button to open a shortcut menu.
Page 23 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master On the shortcut menu, select CHOOSE MODULE TYPE. This action opens the Choose Module Type dialog box.
In the Product Line Filter area of the dialog box, select 5204SE. In the Select Module Type dropdown list, select 5204SE-MNET-PDPMV1, and then click OK to save your settings and return to the ProSoft Configuration Builder window.
Important: Be sure to pick the 5204SE-MNET-PDPMV1 gateway from the list. The very similar 5204-MNET-PDPMV1 does not support the special Application Communication Logic functions available in the 5204SE-MNET-PDPMV1. These functions are required to integrate the 5204SEMNET-PDPMV1 with the Modicon processor.
Page 24 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Renaming PCB Objects Notice that the contents of the information pane and the configuration pane changed when you added the gateway to the project.
At this time, you may wish to rename the Default Project and Default Location folders in the tree view. 1 Select the object, and then click the right mouse button to open a shortcut menu. From the shortcut menu, choose RENAME. 2 Type the name to assign to the object. 3 Click away from the object to save the new name. Configuring Gateway Parameters 1 Click the [+] sign next to the module icon to expand gateway information. icon to view gateway information and 2 Click the [+] sign next to any configuration options. 3 4 5 icon to open an Edit dialog box. Double-click any To edit a parameter, select the parameter in the left pane and make your changes in the right pane. Click OK to save your changes.
Printing a Configuration File 1 Select the module icon, and then click the right mouse button to open a shortcut menu. 2 On the shortcut menu, choose VIEW CONFIGURATION. This action opens the View Configuration window. 3 In the View Configuration window, open the FILE menu, and choose PRINT. This action opens the Print dialog box. 4 In the Print dialog box, choose the printer to use from the drop-down list, select printing options, and then click OK. ProSoft Technology, Inc. January 28, 2011 Page 25 of 245
3.3
Installing the GSD Files ProSoft Configuration Builder (PCB) uses PROFIBUS slave device definition files (GSD files) to obtain basic configuration information about the PROFIBUS slaves you add to the network. The GSD configuration files identify the slaves capabilities so that the 5204SE-MNET-PDPMV1 can communicate with it correctly. Slave device manufacturers provide the GSD files for the equipment they make. Slave device files sometimes come in various languages. When a manufacturer provides slave device files in several languages, it is a common practice to use the third letter of the file extension to indicate the language used in the file. For instance: o .GSD is the most commonly used file extension and will usually be in either English or German o .GSE will usually be in English o .GSS will usually be in Spanish o .GSF will usually be in French o other combinations may also be seen, as well as other languages using the letters indicated above Follow these steps to install the GSD file or files for your slave device or devices. Tip: GSD configuration files for popular PROFIBUS slaves and ProSoft Technology solutions are included with PCB. Before installing GSD files, browse the list of available slaves in the Tree View window to see if GSD files for your slave are already installed.
Page 26 of 245
GSD files are often both model number specific as well as model revision specific. Just because you may have an older GSD file from a manufacturer for the particular make and model of your slave device does not guarantee it will work for a newer revision of that device. Be sure you obtain from the device manufacturer the correct GSD file or files for your PROFIBUS slave or slaves.
To install GSD files manually
2 3
4 5
In ProSoft Configuration Builder tree view, click [+] to expand the module tree, and then double-click the PROFIBUS DP icon. This action opens the PDPMV1 PROFIBUS Master Setup dialog box. Click the CONFIGURE PROFIBUS button. This action opens the ProSoft Configuration Builder for PROFIBUS application. Open the TOOLS menu, and then choose INSTALL NEW GS* FILE. This action opens a dialog box that allows you to browse for the location of the GSD configuration files to install. (Depending on the device and language used in the file, the actual extension may be ".GSD", ".GSE", ".GSS", or other combinations; hence the generic reference to ".GS*" files, where "*" is a wildcard that stands for any letter.) Choose the file to install, and then click OPEN. If the file already exists in the configuration file path, you will be prompted to overwrite the file. You will be prompted to associate the GSD configuration file with a bitmap image of the slave device. Use the FILE / OPEN dialog box to browse for the location of the image file to use. If you have no device-specific bitmap file, you may CANCEL the bitmap upload, and a generic device icon will be used in the Bus Configuration window for this slave device.
Page 27 of 245
Configuring the PROFIBUS DP Master 1 In ProSoft Configuration Builder tree view, click [+] to expand the module tree, and then double-click the PROFIBUS DP icon. This action opens the PDPMV1 PROFIBUS Master Setup dialog box. 2 In the PDPMV1 PROFIBUS Master Setup dialog box, click the CONFIGURE PROFIBUS button. This action opens the ProSoft Configuration Builder for PROFIBUS application. 3 Click [+] to expand the PROFIBUS MASTER tree. 4 Drag the PROSOFT PROFIBUS Master icon into the Bus Configuration window.
Double-click the PROSOFT MASTER icon in the Bus Configuration window. This action opens the Master Properties dialog box.
Page 28 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Configuring the PROFIBUS Slaves
Important: The GSD file for this example is not included on the ProLinx Solutions CD-ROM, and is used for illustrative purposes only. You can download a variety of example GSD files from the PROFIBUS Trade Organization website at www.profibus.org, or from the manufacturer's website for your PROFIBUS slaves. The following steps describe how to add and configure a Siemens EM 277 I/O chassis to the PROFIBUS network. The configuration information (.GSD file) for this device must be installed according to the procedure found in Install the GSD Files (page 26). Most other PROFIBUS slaves can be configured in a similar manner. 1 In ProSoft Configuration Builder for PROFIBUS, click the plus sign [+] to expand the PROFIBUS DP tree. 2 Navigate to the folder containing the type of slave device to add (PLCS/SIEMENS/EM 277, in this example), and then click the plus sign [+] to expand the folder.
Page 29 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Click the EM 277 PROFIBUS-DP icon in the tree view and drag and drop the icon into the Bus Configuration view. This action adds the slave device and connects it to the Master in a network relationship.
In the tree view, click the plus sign [+] to expand the slave device you added. This action opens a list of device configuration values. The following illustration shows the possible input/output configuration values for a Siemens EM 277. The selections available for other devices may be different, so you should review the specifications for the product you are installing in order to determine the correct values to use.
Page 30 of 245
Drag the input and output parameters to the slot location grid (Subscriber List) below the Bus Configuration window. The slot view displays the slot number, configuration data, and input and output addresses. The PROFIBUS DP Master uses this information to identify and communicate with individual slaves on the network. For this example, we will configure 8 words of input and 32 words of output. These input and output words are assigned to addresses within the gateway's internal database.
For each new slave added to the PROFIBUS network, ProSoft Configuration Builder automatically converts the input/output byte addresses to word input/output addresses. Tip: To make it easier to view the data from individual slaves, you can create a spreadsheet with all added slaves and input and output data offsets, or you can view and print the data map.
Page 31 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Double-click the SLAVE icon to view the Slave properties dialog box.
7 8
ProSoft Configuration Builder automatically assigns a PROFIBUS address to each new slave. The slave address assignment begins at address 3 for the first slave added to the network (addresses 0, 1, and 2 are reserved for use with PROFIBUS Masters), and is incremented by 1 for each new slave added to the network. You may, however, assign any address, 0-125 to any Master or slave node as long as you do not assign the same address to more than one device. You can change the address in the COMMON tab of the Slave properties dialog box. ProSoft Configuration Builder will not allow you to assign a PROFIBUS address that is already in use by another device on this network. Leave the remaining settings unchanged for now, and click OK to close the Slave properties dialog box. Repeat steps 2 through 6 for all slaves you intend to place on the network. When you are finished adding slaves, open the PROJECT menu and choose EXIT. Click YES to save the project and return to the PROFIBUS Master Setup dialog box.
Page 32 of 245
Printing the Unity Passthru Memory Map The Unity Passthru Memory Map dialog box uses the information about your PROFIBUS Master and slave configuration to display where the data may appear in your Modicon processor's Memory Word (%MW) data registers. You need to know where in the Modicon processor %MW area you want the PROFIBUS data to appear before you will be able to input configuration parameters that will make this Memory Map display valid addresses.
To view or print the ProLinx Memory Map
In the PDPMV1 PROFIBUS Master Setup dialog box, click the SHOW PLX MEMORY MAP button, near the bottom of the window.
Page 33 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master This action opens Unity Passthru Memory Map window.
Notice that there are two radio buttons in the Display area of the dialog box to select Inputs or Outputs. These Input and Output maps correspond to the Input and Output data you configured for the PROFIBUS slaves (page 29). Notice also that there are check boxes to display slot numbers and PROFIBUS addresses. Click PRINT to print the maps for reference. Note that you must do this once for the input map and once for the output map. Use the Display area radio buttons to select which map you wish to print. When you have finished printing the ProLinx memory maps, click OK to close the dialog box. Click OK again to close the Master Setup dialog box.
Page 34 of 245
Double-click the PROFIBUS MASTER DPV1 object. This action opens the Edit dialog box.
Page 35 of 245
PLC Input Register Start The value you enter here will be used by PCB to assign Modicon processor's %MW memory addresses to the Unity Passthru Input Memory Map. Valid values are %MW address 00001 to highest possible address (32000 minus Input Data Size value, depending on the processor's memory configuration.) Set this parameter to the Unity Pro Memory Word (%MW) address in the Modicon processor that will hold PROFIBUS slave device cyclic input data. This start address and the Input Data Size value will determine the area of processor memory to reserve exclusively for incoming PROFIBUS cyclic input data. Caution: To avoid corruption of PROFIBUS data, you must make sure that this memory area is only read from and never written into by other parts of your application logic. Refer to the Unity Passthru Memory Map for the addresses to use (page 33). PROFIBUS cyclic input data will always be stored in the gateway's memory addresses 0000 through 0767. These are 16-bit word-sized registers, which can hold two (2) 8-bit bytes per register, for a total PROFIBUS cyclic input capacity of 1536 bytes.
Input Data Size 0 to 768 Total number of PROFIBUS Input Words (one word equals two bytes) from all PROFIBUS slaves. These Input Words will be the data received from slave devices on the PROFIBUS network.
PLC Output Register Start The value you enter here will be used by PCB to assign the processor's %MW memory addresses to the Unity Passthru Output Memory Map. Valid values are %MW address 00001 to highest possible address (32000 minus Output Data Size value, depending on processor memory configuration.) Set this parameter to the Unity Pro Memory Word (%MW) address in the processor you intend to use for holding PROFIBUS slave device cyclic output data. This start address and the Output Data Size value will determine the area of processor memory to reserve exclusively for outgoing PROFIBUS cyclic output data. Be sure other parts of your application logic put data into this area only if it should be sent to PROFIBUS slaves and be sure to put the data into the correct part of this data area, so that the data goes to the correct slave. For more information on using these memory registers, refer to Print the Unity Passthru Memory Map (page 33). You will need to create your own custom control and sequencing logic to place data into the proper places in the processor memory in this address range before you send the data to the gateway with the WriteCyclicData DFB. Page 36 of 245 ProSoft Technology, Inc. January 28, 2011
PROFIBUS cyclic output data will always be stored in the gateway's memory addresses 1000 through 1767. These are 16-bit word-sized registers, which can hold two (2) 8-bit bytes per register, for a total PROFIBUS cyclic output capacity of 1536 bytes.
Warning: Inadvertent overwriting of data in the PROFIBUS memory areas could cause unexpected behavior on your PROFIBUS DP network, leading to unintended equipment operation. Such unintended operation could cause injury to personnel or damage to equipment.
Output Data Size 0 to 768 Total number of PROFIBUS Output Words (one word equals two bytes) to be sent to all PROFIBUS slaves. These Output Words will be the data sent to slave devices on the PROFIBUS network.
Input Byte Swap YES or NO This parameter determines if the bytes in the PROFIBUS Input Data area are swapped before being stored in the gateway memory database. If the parameter is set to NO, no swapping will be applied. If the parameter is set to YES, the order of bytes in each word will be swapped before being stored in memory. Example: With Input Byte Swap set to NO, incoming order is unchanged - ABCDEF With Input Byte Swap set to YES, each byte pair is swapped - BADCFE
Output Byte Swap YES or NO This parameter determines if the bytes in the PROFIBUS Output Data area are swapped before being transmitted to slaves on the PROFIBUS network. If the parameter is set to NO, no swapping will be applied. If the parameter is set to YES, the order of bytes in each word will be swapped before being transmitted. Example: With Output Byte Swap set to NO, outgoing output order is unchanged ABCDEF With Output Byte Swap set to YES, each output byte pair is swapped BADCFE
Page 37 of 245
Mailbox Messaging YES or NO This parameter controls whether or not special files will be created for import into your Unity Pro project for PROFIBUS acyclic messaging support. Set the parameter to YES if you plan to use the special acyclic messaging capabilities of PROFIBUS DP version 1. When Mailbox Messaging is set to YES, the gateway will use your PROFIBUS DP Master/slave configuration to create the required Derived Function Blocks (DFBs), Derived Data Types (DDTs), and Variables needed for processor application logic. If your PROFIBUS application uses only cyclic I/O data (PROFIBUS Input and Output Data) and you will not be using any acyclic messaging, set this parameter to NO, so that unnecessary files will not be created.
Slave Diagnostics YES or NO If the parameter is set to YES, then the gateway will poll data from all slaves on the PROFIBUS network and place it in the gateway database addresses 1800 through 2177. If it is set to NO, then the gateway will not poll any slave diagnostics data over the network and the gateway database will show zeros in this area. Each PROFIBUS slave can report six bytes (three words) of standard diagnostic data. A total of 378 words (756 bytes; 3 words or 6 bytes times 126 possible nodes) will have to be reserved to hold this Slave Diagnostic Data in processor %MW memory.
PLC Status Register Start Modicon %MW address 00001 to highest possible address (32000 MINUS 152). Set this parameter to the Unity Pro Memory Word (%MW) address in the processor that you intend to use for holding general gateway status data. This data consists of 76 words (152 bytes) of gateway status registers, error counters, and general gateway diagnostic information. This start address will determine the area of the processor memory to reserve exclusively for incoming gateway status data. Be sure this memory area is only read from and never written into by other parts of your application logic to avoid corruption of this status data. General gateway status data will always be stored in the gateway's memory addresses 2200 through 2275. For more details about the contents of these registers, refer to DFB Get Module Status (page 111).
Page 38 of 245
Watchdog Register The Watchdog function allows the gateway to monitor a database register, the Watchdog Register, to check for loss of communication with the non-PROFIBUS communication protocol. If this function is used, the other gateway protocol is expected to change the value in the Watchdog Register at an interval less than the amount of time specified in the Watchdog Timeout parameter. If the value in the Watchdog Register does not change within this amount of time, a communication loss is assumed and the Watchdog function will set the PROFIBUS outputs to the default value specified in the Watchdog Reset Value parameter. To disable this function, set this parameter to a value of -1.
Watchdog Timeout Sets the period of time (in 0.1s increments) for the gateway to wait for communication loss detection. For example, set this parameter to 100 to set a waiting period of 10 seconds. To disable this function, set this parameter to a value of -1.
Watchdog Reset Value Sets the value that will be sent to the PROFIBUS output byte registers upon communication loss as detected by the Watchdog function. To disable this function, set this parameter to a value of -1.
Page 39 of 245
PLC Control Buffer Start 0 for M340 processors only 1 to 32000 for Quantum processors only This parameter serves two purposes. First, it tells the gateway what kind of processor will be used. This affects what kind of export files are created by the Application Communication Logic (ACL) features of the gateway. If PLC Control Buffer Start is set to zero (0), export files will be created for M340 processors. If it is set to a non-zero value in the range of 1 to 32000, export files will be created for Quantum processors. Second, it tells the gateway which addresses to show in the Unity Passthru Memory Map for Quantum communication control and data buffers when a Quantum processor is used. Set this parameter to zero (0) when the gateway will be used with an M340 processor, which does not require special communication control and data buffer space be reserved in processor memory. No Control Buffer information will be shown in the Unity Passthru Memory Map when this parameter is set to zero (0). Set this parameter to a memory address (1 to 32000) to reserve memory space in a Quantum processor for communication control and data buffers. To send and receive Modbus TCP/IP messages with a Quantum processor, an area of processor memory must be set aside and reserved for exclusive use as communication control and data buffer space. The amount of memory that must be reserved varies with the amount of communication tasks in the Unity Pro program. The address you enter in this parameter will be the starting address of these buffers in %MW processor memory. How much memory to reserve depends on whether or not you plan to use the PROFIBUS Acyclic Messaging (Mailbox Messaging) capabilities of the gateway. The communication control and data buffers are related to the special Defined Function Blocks (DFBs) created for you by the gateway's ACL. The four (4) basic DFBs used to transfer PROFIBUS cyclic data, general gateway status, and standard slave diagnostic data require 436 16-bit registers of communication control and data buffer space. This is the least amount of space that will need to be reserved. The ten (10) DFBs used to accomplish Mailbox Messaging require as much as an additional 1635 registers, for a total of up to 2071 registers, that should be reserved for these special function buffers. How you set the Mailbox Messaging parameter will determine how much memory will be shown for Control Buffers in the Unity Passthru Memory Map. Setting Mailbox Messaging to NO will show 436 registers reserved for Control Buffers. Setting Mailbox Messaging to YES will show 2071 registers reserved for Control Buffers.
Page 40 of 245
Page 41 of 245
Warning: Inadvertent overwriting of data in the PROFIBUS memory areas could cause unexpected behavior on your PROFIBUS DP network, leading to unintended equipment operation. Such unintended operation could cause injury to personnel or damage to equipment. Refer to the MNET Protocol Manual, on the ProLinx Solutions CD-ROM, for more information about the MNET Client, its functions and capabilities.
Page 42 of 245
Click [+] next to the module icon to expand the tree for the 5204SE-MNETPDPMV1 gateway. Click [+] next to the COMMONNET option to reach the ETHERNET CONFIGURATION.
Double-click the ETHERNET CONFIGURATION object. This action opens the Edit dialog box.
4 5
Edit the values for MY_IP (IP Address), NETMASK (Subnet mask) and GATEWAY (Default Gateway). When you are finished editing, click OK to save your changes and return to the ProSoft Configuration Builder window.
Page 43 of 245
In ProSoft Configuration Builder tree view, click [+] to expand the 5204SEMNET-PDPMV1 tree, and then double-click the PROFIBUS DP icon. This action opens the PDPMV1 PROFIBUS Master Setup dialog box. In the PDPMV1 PROFIBUS Master Setup dialog box, click the EXPORT MASTER CONFIG button. This action saves the PROFIBUS network configuration for your gateway in an XML file. The recommended location for this file is your My Documents folder.
Tip: You can use the XML file created by ProSoft Configuration Builder in this step to simplify the task of configuring additional PROFIBUS network modules. Because it saves the entire network configuration, you can add modules quickly by modifying only the items that are unique for each device, typically the slot number and I/O addresses. To use this saved configuration, open Windows Explorer, navigate to the folder where you saved the Master Configuration XML file, and then drag the file onto the new PROFIBUS DP icon in the ProSoft Configuration Builder tree view. 3 4 In ProSoft Configuration Builder, open the FILE menu, and then choose SAVE AS. Name the project file, and click SAVE. The recommended location for this file is your My Documents folder.
Note: All PCB project files and module-related files are automatically saved to C:\PCBExportfFiles. A complete backup consists of the Project and Master Configuration files, plus the GSD configuration files. The default location for the GSD files is C:\Documents and Settings\All Users\Application Data\ProSoft\GSD (Windows XP / 2000) or C:\My Documents\.
Page 44 of 245
PCB does this complete backup for you automatically. The default location for these backup files is C:\PCBExportFiles. All the files associated with your PCB configuration will be stored in a folder with the same name as the name you used to save your PCB configuration (.ppf) file. When you exit PCB, you will be prompted to overwrite your Export folder files.
If you have made changes to your configuration settings, you should click the YES button every time you see this dialog box to have the backup files updated. Having all the files for your PCB configuration stored in one folder makes it easier to transfer the application from one system to the other or to send your files to ProSoft Technical Support when you need assistance.
Page 45 of 245
1 2
In the tree view in ProSoft Configuration Builder, click once to select the module icon. Right-click the module icon and select DOWNLOAD FROM PC TO DEVICE from the shortcut menu.
Page 46 of 245
This action opens the Download files dialog box. Notice that the Ethernet address field contains the gateway default IP address. ProSoft Configuration Builder will use this default IP address to connect to the gateway.
Click TEST CONNECTION to verify that the default IP address is correct. 4 If the Test Connection procedure fails, you will see an error message.
Several factors might cause or contribute to your receiving this error. To correct the two most common errors and complete the download, check the following:
Page 47 of 245
Is the PC you are using to configure the gateway on the same subnet as the gateway? The subnet is determined by a combination of the IP Address and the Subnet Mask. If two devices are not on the same subnet, they will not be able to connect with each other. To correct this problem you may need to temporarily change the IP address and/or Subnet Mask on your PC to allow it to be on the same subnet as the gateway. If there is an Ethernet Gateway Server on your network, putting its IP Address in the Gateway parameter of the gateway's Ethernet configuration might also solve this problem. o Are there any switches, hubs, routers, or other network hardware between your PC and the gateway which might be blocking the messages? If your network equipment is not configured properly, your PC may not be able to connect to the gateway. To correct this problem, you could ask your Information Technology (IT) personnel to check your network configuration. Another possible solution would be to connect your PC directly to the gateway using an Ethernet crossover cable. This cable is different from standard Ethernet connection cables in that it has been specially wired for direct connection between two Ethernet devices. Ethernet crossover cables are readily available from most computer parts suppliers or may be custom-made. 5 If the connection succeeds, click the DOWNLOAD button to transfer the configuration to the gateway. If you do not have the configuration download password protection feature enabled on the gateway, which is the factory default condition, the download will begin. However, If you have set a password, the configuration download password protection feature will be enabled, and you will be prompted to enter your password before the download will be allowed to begin.
Page 48 of 245
If you incorrectly enter the password or if you enter the wrong password, you will see the invalid password window and be prompted to re-enter the password. Click the OK button, click the DOWNLOAD button, and try again to correctly enter the correct password.
Page 49 of 245
3.3.8 Exporting the Unity Pro v 4.0 Logic Support Files from PCB
The Unity Pro import files that you create in this step use the information in the Unity Passthru Memory Map to build the Derived Data Types (DDTs), Variables, and Derived Function Blocks (DFBs) for the slave devices on your PROFIBUS DP network. These files may be uploaded and used without modification to allow the Modicon processor to act as a PROFIBUS DP Master.
To export the processor memory map
In the Master Setup dialog box, click SHOW PLX MEMORY MAP.
Page 50 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master 2 This action opens the Unity Passthru Memory Map dialog box.
On the Memory Map dialog box, click EXPORT PROCESSOR FILES. This will create two Unity Pro import files, an .XSY file and a .XFM file. Both files must be imported into the Unity Pro project for the application to work successfully. Name the files (or accept the default names given by PCB), choose a location on your hard drive where you wish the files to be stored, and then click SAVE.
Page 51 of 245
3.4
Page 52 of 245
In the Download Files dialog box, click the SET/RESET PASSWORD button.
Page 53 of 245
You will notice the Old Password box is grayed out. This indicates that password protection is currently not enabled on this gateway. Enter a password in the New Password box and then retype the password in the ReEnter New Password box. The password can be any combination of four (4) to twelve (12) letter and number (alphanumeric) characters. The password is case-sensitive, meaning: o password1 o PASSWORD1 o PaSsWoRd1 are three different passwords, not the same password typed three different ways. 3 Click OK. You will see a download progress bar near the top of the download dialog box. This indicates that password protection is being enabled on the gateway. When you see the success dialog window appear, password protection has been successfully enabled. You will now be required to enter your password whenever you wish to download a configuration to the gateway.
If the progress bar indicates the process has finished, but you do not see the success window, then password protection is not properly enabled on the gateway. This problem can usually be solved by upgrading the gateway firmware, gateway operating system loader, and/or ProSoft Configuration Builder to the latest versions that support password protection. For further information, contact ProSoft Technology Technical Support (page 231).
Page 54 of 245
In the Download Files dialog box, click the SET/RESET PASSWORD button.
Page 55 of 245
You will notice the Old Password box is white, just like the other boxes. This indicates that password protection is currently enabled on this gateway. To change the password, you will need to enter the current password in the Old Password box, enter a new password in the New Password box, and then retype the new password in the Re-Enter New Password box. The password can be any combination of four (4) to twelve (12) letter and number (alphanumeric) characters. The password is case-sensitive, meaning: o password1 o PASSWORD1 o PaSsWoRd1 are three different passwords, not the same password typed three different ways. 3 Click OK. You will see a download progress bar near the top of the download dialog box indicating that the new password is being downloaded to the gateway. When you see the success dialog screen appear, the new password has been successfully installed. You will now be required to enter this new password whenever you wish to download a configuration to the gateway.
If the progress bar indicates the process has finished but you do not see the success window, then the new password has not been successfully changed on the gateway and the old password is still in effect. Make sure that the length of the new password you are trying to set is no less than 4 alphanumeric characters and no more than 12 alphanumeric characters, and try the procedure again.
Page 56 of 245
In the Download Files dialog box, click the SET/RESET PASSWORD button.
Page 57 of 245
You will notice the Old Password box is white, just like the other boxes. This indicates that password protection is currently enabled on this gateway. To remove the password, you will need to: o Enter the current password in the Old Password box o Enter nothing in the New Password box o Enter nothing in the Re-Enter New Password box. Leaving the New Password and Re-Enter New Password boxes blank will clear out the existing password and disable password checking on the gateway, once this change has been successfully completed. 3 Click OK. You will see a download progress bar near the top of the download dialog box indicating that the existing password is being deleted from the gateway. When you see the success dialog screen appear, the existing password has been successfully erased. You will no longer be required to enter a password whenever you wish to download a configuration to the gateway. No further password checks will be done before a configuration is allowed to download.
If the progress bar indicates the process has finished but you do not see the success window, then the existing password has not been successfully deleted from the gateway and password protection is still enabled. Try the procedure again.
Page 58 of 245
3.5
Configuring the Modicon M340 Processor with Unity Pro 3.5.1 Creating a New M340 Project
The first step is to open Unity Pro and create a new project. 1 Start Unity Pro. Open the FILE menu, and then select NEW. This action opens the New Project dialog box. 2 In the New Project dialog box, choose the CPU type that matches your Modicon M340 processor.
Page 59 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master In the Project Browser, double-click CONFIGURATION to open the PLC Bus window.
Notice that the image in the window shows the processor in the second position in the rack (the first position is for the power supply).
For this example, you will populate the rack with a combination of modules that represent all the possible Modbus data types: o Coil bits o Input Status bits o Input Registers o Holding Registers
Page 60 of 245
To add devices to the rack, double-click the location (slot) in the rack where the device will be installed. This action opens the New Device dialog box.
Click the [+] sign next to module types to open the list of devices. Select a module from the list, and then click OK. This action adds a module to the PLC Bus image.
Repeat steps 4 and 5 to add the following modules to the project: o Analog: BMX AMM 0600 o Discrete: BMX DDI 1602 o Motion: BMX MSP 0200
Page 61 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Communication: BMX NOE 0110.2
When you have finished adding devices, open the FILE menu and choose SAVE. This action saves the project to the hard drive on your PC.
Page 62 of 245
Page 63 of 245
The following steps will help you determine the correct memory addresses to assign.
To view memory usage in the processor
1 2 3 4
Start Unity Pro. In the Project Browser, expand the CONFIGURATION item, and then doubleclick the PLC BUS object. In the PLC Bus window, double-click the processor. This action opens a tabbed window with information about the processor. Click the CONFIGURATION tab. This tab describes the processor's memory configuration.
Page 64 of 245
To view detailed information about the processor's memory configuration, click the I/O OBJECTS tab. These selections offers tools to view the types of data stored at specific addresses in the processor. Make note of memory areas that are already allocated, and select an area of contiguous memory that can be allocated to the gateway.
Page 65 of 245
Use the project you created in Unity Pro and perform all of the following steps. 1 Open the VIEW menu, and then choose FUNCTIONAL VIEW.
Page 66 of 245
This action populates the Project Browser with a FUNCTIONAL PROJECT icon.
Select FUNCTIONAL PROJECT and then click the right mouse button to open a shortcut menu. On the shortcut menu, choose IMPORT.
Page 67 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master In the Import dialog box, choose FUNCTIONAL MODULE (*.XFM) in the Files of Type dropdown list and then select the XFM file to import. The XFM file name matches the gateway name you defined in PCB and exported (page 50).
Click IMPORT to import the file. Notice that the Project Browser is now populated with the Functional Module.
Page 68 of 245
To view the DFBs, DDTs and Variables associated with the Functional Module, open the VIEW menu and choose STRUCTURAL VIEW. Notice that all function blocks have been defined using the ST type language.
Page 69 of 245
In the Project Browser, select VARIABLES & FB INSTANCES, and click the right mouse button to open a shortcut menu. On the shortcut menu, choose IMPORT. In the Files of Type dropdown list, choose DATA EXCHANGE FILE (*.XSY). Select the .xsy file created when you exported the processor files from PCB (page 50) and then click IMPORT. If you see an Import Trouble Report window, click REPLACE ALL, then click OK.
At this point, the DDTs, DFBs, and Variables have been imported to the application.
Page 70 of 245
1 2 3
Review the elements of the project in the Project Browser. Make sure you have configured sufficient %MW memory space for your entire project and PROFIBUS data. To avoid build errors, you will need to enable the Dynamic Array Language Extension option. From the Unity Pro menu bar, select TOOLS, and then choose PROJECT SETTINGS.
Page 71 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master For UnityPro version 4.0: In the Project Settings dialog box, click the LANGUAGE EXTENSIONS tab and select (check) ALLOW DYNAMIC ARRAYS [ANY_ARRAY_XXX].
For UnityPro version 4.1: Select VARIABLES in the left pane, and then select (check) ALLOW DYNAMIC ARRAYS [ANY_ARRAY_XXX].
Click OK to save your changes and dismiss the dialog box. Page 72 of 245 ProSoft Technology, Inc. January 28, 2011
When you are satisfied that you are ready to download the project, open the BUILD menu, and then choose REBUILD ALL PROJECT. This action builds (compiles) the project into a form that the processor can use to execute the instructions in the project file. This task may take several minutes, depending on the complexity of the project and the resources available on your PC. As the project is built, Unity Pro displays a progress dialog box, with details appearing in a pane at the bottom of the window. If you are using the files from PCB and have your memory and processor configuration set up correctly, the project should build without errors. The following illustration shows the build process under way.
Page 73 of 245
Click the TRANSFER button to download the project to the processor. As the project is transferred, Unity Pro reports its process in a PROGRESS dialog box, with details appearing in a pane at the bottom of the window. When the transfer is complete, place the processor in RUN mode. The processor will start scanning your process logic application.
3.5.7 Verifying Communication Between the M340 Processor and the Gateway
In this step, you will verify that the processor and the gateway are communicating with each other over the Modbus TCP/IP Ethernet network. The sample project includes an animation table called MNETDPV1_Table. When the processor is in RUN mode and communicating with the gateway, the values in this animation table are updated whenever you trigger a GetModuleStatus read message to request general gateway status from the gateway.
To verify communication between the processor and the gateway
1 2 3 4
Place the processor in RUN mode, if you have not already done so. In the Unity Pro Project Browser pane, click [+] to open the ANIMATION TABLES tree, and then double-click MNETDPV1_TABLE. In the MNETDPV1_Table, you will see three main variables which can be expanded to see many more sub-variables. Look for the variable, MNETDPV1_StatIn. Click the [+] next to it to open it and see all the sub-variables. These will include configuration information and version/revision information, which will remain static, as well as program scan counters, input/output update counters, request/response counters, and other variables that should change whenever you trigger a status call.
Page 74 of 245
Now, look for and expand the variable, MNETDPV1_BASICVAR. From there, look for and expand the sub-variable, MODULESTATUS. Expand the OUT subvariable.
Force a one (1) into the sub-variable, GetModuleStatus. Notice that the MODIFICATION button must be engaged and you must use the SET TO 1 icon option to actually have the variable value changed so the update request will be sent. Scroll within MNETDPV1_StatIn. Notice that whenever you force the GETMODULESTATUS update, the numbers in the Value column for items such as ModuleStatus_ModuleProgramScanCounter are updated.
Page 75 of 245
3.6
Configuring the Modicon Quantum Processor with Unity Pro 3.6.1 Creating a New Quantum Project
The first step is to open Unity Pro and create a new project. 1 In the New Project dialog box, choose the CPU type. In the following illustration, the CPU is 140 CPU 651 60. Choose the processor type that matches your own hardware configuration, if it differs from the example. Click OK to continue.
Page 76 of 245
Next, add a power supply to the project. In the Project Browser, expand the CONFIGURATION folder, and then double-click the 1:LOCALBUS icon. This action opens a graphical window showing the arrangement of devices in your Quantum rack.
Select the rack position for the power supply, and then click the right mouse button to open a shortcut menu. On the shortcut menu, choose NEW DEVICE.
Page 77 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Expand the SUPPLY folder, and then select your power supply from the list. Click OK to continue.
For this example, you will populate the rack with a combination of modules that represent all the possible Modbus data types: o Coil bits o Input Status bits o Input Registers o Holding Registers
Page 78 of 245
To add devices to the rack, double-click the location (slot) in the rack where the device will be installed. This action opens the New Device dialog box.
Page 79 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Click the [+] sign next to module types to open the list of devices. Select a module from the list, such as the 140 AMM 090 00 in the examples below, and then click OK. This action adds a module to the PLC Bus image.
Page 80 of 245
Repeat steps 5 and 6 to add the following modules to the project: o Discrete: 140 DDI 364 00 o Motion: 140 DDO 364 00 o Communication: 140 NOE 771 01
When you have finished adding devices, open the FILE menu and choose SAVE. This action saves the project to the hard drive on your PC.
Page 81 of 245
Page 82 of 245
1 2 3 4
Start Unity Pro. In the Project Browser, expand the CONFIGURATION item, and then doubleclick the PLC BUS object. In the PLC Bus window, double-click the processor. This action opens a tabbed window with information about the processor. Click the CONFIGURATION tab. This tab describes the processor's memory configuration.
Page 83 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master To view detailed information about the processor's memory configuration, click the I/O OBJECTS tab. These selections offers tools to view the types of data stored at specific addresses in the processor. Make note of memory areas that are already allocated, and select an area of contiguous memory that can be allocated to the gateway.
Page 84 of 245
Page 85 of 245
Use the project you created in Unity Pro and perform all of the following steps. 1 Open the VIEW menu, and then choose FUNCTIONAL VIEW.
This action populates the Project Browser with a Functional Project icon.
Page 86 of 245
Select FUNCTIONAL PROJECT and then click the right mouse button to open a shortcut menu. On the shortcut menu, choose IMPORT.
In the Import dialog box, choose FUNCTIONAL MODULE (*.XFM) in the Files of Type dropdown list and then select the XFM file to import. The XFM file name matches the gateway name you defined in PCB and exported (page 50).
Page 87 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Click IMPORT to import the file. Notice that the Project Browser is now populated with the Functional Module.
To view the DFBs, DDTs and Variables associated with the Functional Module, open the VIEW menu and choose STRUCTURAL VIEW. Notice that all function blocks have been defined using the ST type language.
Page 88 of 245
In the Project Browser, select VARIABLES & FB INSTANCES, and click the right mouse button to open a shortcut menu. On the shortcut menu, choose IMPORT. In the Files of Type dropdown list, choose DATA EXCHANGE FILE (*.XSY). Select the .xsy file created when you exported the processor files from PCB (page 50) and then click IMPORT. If you see an Import Trouble Report window, click REPLACE ALL, then click OK.
At this point, the DDTs, DFBs, and Variables have been imported to the application.
Page 89 of 245
1 2 3
Review the elements of the project in the Project Browser. Make sure you have configured sufficient %MW memory space for your entire project and PROFIBUS data. To avoid build errors, you will need to enable the Dynamic Array Language Extension option. From the Unity Pro menu bar, select TOOLS, and then choose PROJECT SETTINGS.
Page 90 of 245
For UnityPro version 4.0: In the Project Settings dialog box, click the LANGUAGE EXTENSIONS tab and select (check) ALLOW DYNAMIC ARRAYS [ANY_ARRAY_XXX].
For UnityPro version 4.1: Select VARIABLES in the left pane, and then select (check) ALLOW DYNAMIC ARRAYS [ANY_ARRAY_XXX].
Click OK to save your changes and dismiss the dialog box. ProSoft Technology, Inc. January 28, 2011 Page 91 of 245
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master When you are satisfied that you are ready to download the project, open the BUILD menu, and then choose REBUILD ALL PROJECT. This action builds (compiles) the project into a form that the processor can use to execute the instructions in the project file. This task may take several minutes, depending on the complexity of the project and the resources available on your PC. As the project is built, Unity Pro displays a progress dialog box, with details appearing in a pane at the bottom of the window. If you are using the files from PCB and have your memory and processor configuration set up correctly, the project should build without errors. The following illustration shows the build process under way.
Page 92 of 245
Click the TRANSFER button to download the project to the processor. As the project is transferred, Unity Pro reports its process in a PROGRESS dialog box, with details appearing in a pane at the bottom of the window. When the transfer is complete, place the processor in RUN mode. The processor will start scanning your process logic application.
Page 93 of 245
3.6.7 Verifying Communication Between the Quantum Processor and the Gateway
In this step, you will verify that the processor and the gateway are communicating with each other over the Modbus TCP/IP Ethernet network. The sample project includes an animation table called MNETDPV1_Table. When the processor is in RUN mode and communicating with the gateway, the values in this animation table are updated whenever you trigger a GetModuleStatus read message to request general gateway status from the gateway.
To verify communication between the processor and the gateway
1 2 3 4
Place the processor in RUN mode, if you have not already done so. In the Unity Pro Project Browser pane, click [+] to open the ANIMATION TABLES tree, and then double-click MNETDPV1_TABLE. In the MNETDPV1_Table, you will see three main variables which can be expanded to see many more sub-variables. Look for the variable, MNETDPV1_StatIn. Click the [+] next to it to open it and see all the sub-variables. These will include configuration information and version/revision information, which will remain static, as well as program scan counters, input/output update counters, request/response counters, and other variables that should change whenever you trigger a status call.
Page 94 of 245
Now, look for and expand the variable, MNETDPV1_BASICVAR. From there, look for and expand the sub-variable, MODULESTATUS. Expand the OUT subvariable.
Force a one (1) into the sub-variable, GetModuleStatus. Notice that the MODIFICATION button must be engaged and you must use the SET TO 1 icon option to actually have the variable value changed so the update request will be sent. Scroll within MNETDPV1_StatIn. Notice that whenever you force the GETMODULESTATUS update, the numbers in the Value column for items such as ModuleStatus_ModuleProgramScanCounter are updated.
Page 95 of 245
Page 96 of 245
Reference
In This Chapter
Basics of Working with Unity Pro........................................................... 97 Unity Pro Program Objects and Organizing Structures ......................... 99 Modbus TCP/IP Communication Control in M340 and Quantum PACs 99 Modicon M340 Variables, Derived Data Types, and Derived Function Blocks .................................................................................................. 100 Modicon Quantum Variables, Derived Data Types and Derived Function Blocks .................................................................................................. 136 PROFIBUS Acyclic Telegram (Message) Block Structures ................. 184 Mailbox Messaging Error Codes ......................................................... 207 PROFIBUS comDTM........................................................................... 211
4.1
Page 97 of 245
Variables can be stored in fixed, non-changeable memory locations within the processor's memory. Such Variables are called located variables and may be referenced by their variable name (symbol) or by their memory address. However, Variables are not required to be assigned to specific, fixed memory locations. If Variables are not assigned to specific memory addresses, they are called unlocated variables and may be referenced only by their unique variable names (symbols). DDTs and Variables are then used to create Derived Function Blocks (DFBs). These DFBs have input data, internal storage data, and output data variables and DDTs associated with them. They use the data stored in DDTs and Variables in process logic algorithms, which are also part of the DFBs. Unity Pro offers several programming options to create the logic contained in the DFBs. All logic in the DFBs created by ProSoft Configuration Builder (PCB) is in the form of Structured Text (ST) program language sections, called Implements in Unity Pro. The Application Communication Logic functions built into ProSoft Configuration Builder (PCB) automatically create all the Variables, DDTs and DFBs required to allow the processor to use its native Modbus TCP/IP communication protocol capability and act as a PROFIBUS DP Master on a PROFIBUS network. The following sections in this Reference chapter give brief descriptions of the Variables, DDTs and DFBs created by PCB. Each DFB will be described and grouped with its associated Variables and DDTs. NOTE: Thorough understanding of all of this reference material is not required to successfully use the gateway. This information is given for those users who wish to have a deeper understanding of the inner workings of the system and to make it easier to troubleshoot potential communication or programming problems.
Page 98 of 245
4.2
4.3
Page 99 of 245
4.4
Modicon M340 Variables, Derived Data Types, and Derived Function Blocks 4.4.1 M340 Modbus Variables and Derived Data Types (DDTs)
The Modbus Derived Data Type (DDT) is a special DDT used by all other DDTs and Derived Function Blocks (DFBs). This DDT holds all the variables needed to create a Modbus TCP/IP Client command which the processor can then transmit to servers on the network. The specific purpose of this DDT is to allow any parameters or data needed to create a valid PROFIBUS DP Master request to be passed from the processor to the 5204SE-MNET-PDPMV1 as a Modbus TCP/IP message, which can then be re-transmitted on the PROFIBUS DP network, if required. You can think of the variables in this structure as temporary holding registers. They will be used by all the other DDTs and DFBs to build and transmit each required Modbus TCP/IP message. No direct manipulation of these variables should be required or attempted by any other parts of your application code. The other imported DDTs and DFBs will make all necessary changes to these variables for you, as required. The information here is given for reference only.
Used to hold the raw byte values of a Modbus TCP/IP message as it is being assembled by the active DFB. Once assembly is complete, the contents of this array will be passed to the Unity Pro DATA_EXCH function to be transmitted on the Modbus TCP/IP network as a Client Request Message. Will hold a value of 3 for Read Holding Register messages to request data from the 5204SE-MNETPDPMV1 or a value of 16 for Preset (Write) Multiple Registers to send data to the 5204SE-MNETPDPMV1 Will hold the address where data will begin to be read from or written to the gateway For Read Commands to bring in PROFIBUS cyclic input data, this address will be in the range of 0767. For Write Commands that send PROFIBUS cyclic output data, this address will be in the range of 1000-1767. These address ranges are fixed in the gateway's memory and may not be changed or re-configured by the user. Will hold the number of 16-bit registers that will be affected by the command. The maximum allowable count is 125. Most messages will use lower values. A value of 0 is invalid and will cause an error. These are four standard Unity Pro communication message status words. Refer to the topic "Structure of the management parameters" in your Unity Pro documentation for more information. Since an IP address contains a combination of numbers and period characters, it must be passed to the message functions as a string of alphanumeric characters. Please see your Unity Pro documentation for the DATA_EXCH and ADDM functions for additional details.
FunctionCode
1 8-bit byte
StartAddress
1 16-bit integer
DataCount
1 16-bit integer
ManagementWords[ ]
DestinationIPAddress [ ]
Set Slave Mode - Some PROFIBUS slaves support capabilities called Sync and Freeze. These are special command features which allow a PROFIBUS Master to control when and how a slave updates its internal cyclic inputs and outputs. These structures give the Master the ability to send these special kinds of control messages. For detailed information, see DFB Acyclic Mailbox Message: Set Slave Mode (page 126). 8 Start/Stop Slaves - These structures allow the Master to stop or start cyclic data transfers with a slave or or group of slaves. For detailed information, see DFB Acyclic Mailbox Message: Start/Stop Slave (page 124). 9 Set Operate Mode - These structures allow the Master to suspend or restart all cyclic polling activity on the network. For detailed information, see DFB Acyclic Mailbox Message: Set Operating Mode (page 116). 10 Get Database - These structures allow the Master to obtain and report database configuration information about the PROFIBUS Master hardware. For detailed information, see DFB Acyclic Mailbox Message: Get Database Information (page 130). All the DDTs and variables required to use, control, and manage these ten types of acyclic messages are contained in the MNETDPV1_MAILVAR structures and sub-structures.
DFB Read Cyclic Data - M340 The Read Cyclic Data DFB is used to retrieve PROFIBUS cyclic input data from the 5204SE-MNET-PDPMV1 gateway and bring it back into the processor. This is the data being received by the PROFIBUS DP-V1 Master from the slave or slaves on the PROFIBUS network. MNETDPV1_BASICVAR_ReadCyclicData Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to read PROFIBUS cyclic input data.
Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit This is the bit your control and sequencing logic will use to trigger a cyclic read message. Set this bit to one (1) whenever no other messages are active and when you want to update the PROFIBUS cyclic slave input data. Will hold the total number of 16-bit register words of PROFIBUS cyclic input data that need to be read. This value will be the same as what you entered in the PCB configuration for the [PROFIBUS Master DPV1] Input Data Size parameter For details, see Modbus DDT (page 100). The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out ReadCyclicData
MNETDPV1_Inputs Variable - M340 This variable is an array of 1536 bytes. It is used to receive up to 768 words (1536 bytes) of PROFIBUS cyclic input data from slaves on the PROFIBUS network.
The order of data in this array will match the order in the PCB memory maps you exported and/or printed. The following screen shot shows a typical memory map.
The PCB table lists usage in words rather than bytes, where one (1) word equals two (2) bytes. In this example, there are only eight (8) total words or 16 total bytes of PROFIBUS cyclic input data configured (highlighted in yellow) of the available 1536 bytes that could be used. The 16 bytes (8 words) of PROFIBUS inputs from the device assigned to Slave Address 1 will be stored in the first 16 bytes of this array. You should also notice that the native storage size in the gateway's memory is 16-bit or 2-byte word registers. If the number of inputs from the first configured device is an odd number of bytes, you will see that memory register hold one byte from the first device in its low-order byte. The higher-order byte of this register will hold the first byte of data for the next configured slave device. In other words, this data is byte-packed with no extra blank bytes inserted just so the data for each slave address can begin on a low-order byte boundary.
If you wish to put gaps into the memory map to give more separation between data blocks from different slave addresses, you may do so in the PROFIBUS Master configuration in PCB by editing the starting address of the data for each slave so that it falls on whatever byte or register address you prefer. MNETDPV1_DataIn Variables - M340 These variables allow you to take advantage of the MNETDPV1_DataIn DDT structure.
There is no direct link or logic provided to populate this array with the data received in the MNETDPV1_Inputs variable. If you wish to use these variables for your application, you will need to create the logic to link the individual bytes of the MNETDPV1_Inputs variable to the word array variables in this structure. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown. You may assign these variables to any valid %MW addresses that exist in your processor configuration. Sample Procedure for Copying from the MNETDPV1_Inputs array to the MNETDPV1_DataIn Variables 1 Create an INT variable to use as the control variable in a copy loop. This example uses the variable "i". 2 Assign a specific %MW address to the variables in the MNETDPV1_Inputs variable array. This example uses address %MW 200. 3 Assign a specific %MW address to the MNETDPV1_DataIn variable structure. This example uses address %MW 1. 4 Use logic to copy from one set of %MW memory addresses to the other for the amount of data you need to copy. In our sample configuration, we have 16 bytes of PROFIBUS cyclic input data. So, the logic needed would look something like this:
FOR i:=0 to 15 DO %MW1[i]:=%MW200[i] ; END_FOR ;
MNETDPV1_BASICVAR_WriteCyclicData Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to write PROFIBUS cyclic output data.
Description This is the bit your control and sequencing logic will use to trigger a cyclic write message. Set this bit to one (1) whenever no other messages are active and when you want to send PROFIBUS cyclic slave output data. Will hold the total number of 16-bit register words of PROFIBUS cyclic output data that need to be written. This value will be the same as what you entered in the PCB configuration for the [PROFIBUS Master DPV1] Output Data Size parameter. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit. For details, see Modbus DDT (page 100).
Out - RegisterCount
Out - Timeout
1 16-bit integer
Out - MailBoxData
In - MessageDone
The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic output data memory area in the gateway has been updated. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
In - MessageError
MNETDPV1_Outputs Variable - M340 This variable is an array of 1536 bytes. It is used to hold up to 768 words (1536 bytes) of PROFIBUS cyclic output data to be sent to slaves on the PROFIBUS network.
The order of data in this array will match the order in the PCB memory maps you exported and/or printed. The following illustration shows a typical memory map.
The PCB table lists usage in words rather than bytes, where one (1) word equals two (2) bytes. In this example, there are only 32 total words or 64 total bytes of PROFIBUS output data configured of the 1536 bytes available that could be used. The first 64 bytes (32 words) this array will hold data to be sent to Slave Address 1, Slot 0. You should also notice that the native storage size in the gateway's memory is 16-bit or 2-byte word registers. When you have more than one slave device, this data is 'byte-packed' with no extra blank bytes inserted just so the data for each slave address can begin on an even-numbered, low-order byte boundary. If you wish to put gaps into the memory map to give more separation between data blocks from different slave addresses, you may do so in the PROFIBUS Master configuration in PCB by editing the starting address of the data for each slave.
MNETDPV1_DataOut Variable - M340 These variables allow you to take advantage of the MNETDPV1_DataOut DDT structure.
There is no direct link or logic provided to populate data in the MNETDPV1_Outputs variable from the data in these variables. If you wish to use these variables for your application, you will need to create the logic to link the variables in this structure to the MNETDPV1_Outputs array variable. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration. Sample Procedure for Copying from the MNETDPV1_DataOut variables to the MNETDPV1_Outputs array 1 Create an INT variable to use as the control variable in a copy loop. This example uses the variable "j". 2 Assign a specific %MW address to the variables in the MNETDPV1_DataOut variable structure. This example uses address %MW 1000. 3 Assign a specific %MW address to the MNETDPV1_Outputs variable array. This example uses address %MW 1200. 4 Use logic to copy from one set of %MW memory addresses to the other for the amount of data you need to copy. In our sample configuration, we have 64 bytes of PROFIBUS cyclic output data. So, the logic needed would look something like this:
FOR j:=0 to 63 DO %MW1000[j]:=%MW1200[j] ; END_FOR ;
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master DFB Get Module Status - M340
MNETDPV1_BASICVAR_ModuleStatus Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to read general gateway status data.
Description For details, see Modbus DDT (page 100). This is the bit your control and sequencing logic will use to trigger a message to get general gateway status data. Set this bit to one (1) whenever no other messages are active and when you want to update the StatInF variable table. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit The DFB will set this bit when the Modbus TCP/IP response is successfully received and the general gateway status data variables have been updated. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out - Timeout
In - MessageDone
In - MessageError
MNETDPV1_StatIn Variables - M340 These variables take advantage of the StatInF DDT structure. The GetStatus DFB will automatically populate this variable list with general gateway status information received in the Modbus TCP/IP response to the GetModuleStatus command.
The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration by setting the desired start address in the PLC Status Register Start parameter in the PCB configuration file. This will cause the import files to contain addresses in the range you select and change the values displayed in this array.
DFB Get PROFIBUS Standard Slave Diagnostics - M340 MNETDPV1_BASICVAR_PB_SLVDiagnostics Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to read standard PROFIBUS slave diagnostic data.
Out GetPBSlaveDiagnostics
1 Single-bit Boolean
Description Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the In-MessageError status bit This is the bit your control and sequencing logic will use to trigger a read message that will retrieve PROFIBUS slave diagnostic data. Set this bit to one (1) whenever no other messages are active and when you want to update the MNETDPV1_SLVDIAG data variables. For details, see Modbus DDT (page 100). The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
In - MessageError
MNETDPV1_SLVDIAG Variables - M340 This variable structure is a collection of six-byte arrays. Each array element holds the six bytes of standard PROFIBUS slave data reported to the PROFIBUS Master from each slave that exists on the network as part of the regular cyclic data polling scheme. The array element number corresponds to the node address of each slave.
The PB_SlaveDiagnostic DFB will automatically populate these variables with the diagnostic data returned by the Modbus TCP/IP command. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration.
4.4.5 Sample Control and Sequencing Logic for Cyclic Data Polling M340
Here is a structured text (ST) logic example of how you might control and sequence the PROFIBUS cyclic data DFBs. You may adapt this sample to fit your application or you may choose to create your own control and sequencing scheme that is more suitable for your specific needs. For this example, start by creating two variables:
LastExecuted Start as type INT as type BOOL
Then, you can use the following ST logic code. Each time you set the variable Start equal to 1, it will begin executing a sequence to read cyclic inputs, write cyclic outputs, get general gateway status, and get standard PROFIBUS slavespecific diagnostic data. As long as Start remains equal to 1, this sequence will roll-over and be repeated until interrupted by setting Start = 0.
IF Start:=1 THEN IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadCyclicData=0 THEN IF LastExcuted=0 THEN MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadCyclicData:=1; LastExcuted:=1; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadCyclicData=0 THEN IF LastExcuted=1 THEN MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData:=1; LastExcuted:=2; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadCyclicData=0 THEN IF LastExcuted=2 THEN MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus:=1; LastExcuted:=3; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadCyclicData=0 THEN IF LastExcuted=3 THEN MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics:=1; LastExcuted:=0; END_IF; END_IF; END_IF;
DFB Acyclic Mailbox Message: Set Operating Mode - M340 This command allows setting the operating mode of the PROFIBUS Master (STOP, CLEAR, or OPERATE). MNETDPV1_MAILVAR_SetOperateMode Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to set the PROFIBUS Master/network operating mode. Possible choices are: Operate - Tells the PROFIBUS Master to begin and continue normal cyclic polling and pass acyclic messages, if requested. The network should be in STOP mode when you issue this command message. Stop - Tells the PROFIBUS Master to interrupt normal cyclic polling. Acyclic messaging can still be accomplished when the network is stopped. The network should be in OPERATE mode when you issue this command. Clear - Tells the PROFIBUS Master to attempt to clear diagnostic errors and re-initialize the PROFIBUS network. The network should be in STOP mode when you issue this command.
Description This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to begin and continue normal network cyclic polling and acyclic messaging. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to stop normal network cyclic polling. Some acyclic messaging can still be accomplished in this mode. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to clear slave diagnostic faults and re-initialize the PROFIBUS network. Set this bit to one (1) whenever no other messages are active, the network mode is currently set to STOP, and you want to send this acyclic message. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit For details, see Modbus DDT (page 100). The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out - Stop
1 Single-Bit Boolean
Out - Clear
1 Single-Bit Boolean
Out - TimeOut
1 16-bit integer
In - MessageError
DFB Acyclic Mailbox Message: Get Live List - M340 This acyclic message returns 127 bytes of information about the nodes on the network. Each byte holds the node type for one bus subscriber (node or device). The position of the byte in the response data corresponds to the address (0 to 125) of the node on the network. The content of each byte tells whether the node is a Master or slave (multiple PROFIBUS Masters may co-exist on the same physical network). This acyclic message can be sent in all operation modes (STOP, CLEAR, and OPERATE); however, the gateway must be initialized properly. MNETDPV1_MAILVAR_GetLiveList Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to request a list of PROFIBUS network nodes (bus subscribers).
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to provide a list of active slave nodes. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit Each byte will contain one of the following codes indicating the type of node present at that node address: 00h: Slave Station 01h: Master Station not yet ready for Token ring (station physically attached to the bus but not configured or polling) 02h: Master Station ready to enter Token ring (station is configured but not polling; there is not yet any Token transmission) 03h: Master Station in Token Ring (Token transmission through the station; station is fully operational) 04h: Station does not exist For details on Fault Codes, see Acyclic Message Status Word (page 207). For details, see Return Codes (page 208). The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out - Timeout
1 16-bit Integer
In - Message Error
DFB Acyclic Mailbox Message: Get Slave Diagnostics - M340 This acyclic message reads extended diagnostic data from a specified slave.\ Note: The response data size depends on the actual slave implementation. Range 6 to 244. MNETDPV1_MAILVAR_GetDiag Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to retrieve extended slave diagnostic data from a specific PROFIBUS network slave.
Out - SlaveAddress
1 8-bit Byte
Description This is the bit your control and sequencing logic will use to trigger a message to retrieve extended slave diagnostic data from a specified slave address. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Valid entries: 0 - 125 Enter the slave address of the device from which you wish to retrieve extended diagnostic data.
Out - TimeOut
1 16-bit Integer
In - Error1
In - ReturnCode In - Fault
In - Length In - MessageDone
Multi-variable Nested Array 245-element 8- For detailed breakdown of the data available in this array, bit Byte Array see Get (Extended) Slave Diagnostic Message Structure (page 188). The amount and type of extended diagnostic data returned varies, and depends on the capabilities of the slave device. Refer to the device manufacturer's documentation for slave diagnostic information. 1 Error Byte 1 of 4. Bytes 2 - 4 are reserved 8-bit Byte For details on Error Byte 1, see Acyclic Message Status Word (page 207) 1 For details, see Return Codes (page 208) 16-bit Integer 1 If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information 16-bit Integer about the fault can be found here. 0001h: Address out of range 0002h: Incorrect "Request Type" 000Ah: Failed to read diagnostic data from slave. Refer to Return Codes (page 208) for additional fault information 000Bh: Remote station failure. For additional fault information, refer to Return Codes (page 208) 00FEh: Command not possible; gateway operates as a Class 2 Master only 00FFh: Gateway offline (not initialized or no valid database) 1 Number of diagnostic bytes returned by the slave and help in the In-Response Data[ ] variable array 8-bit Byte 1 Single-bit Boolean 1 Single-bit Boolean The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
In - MessageError
DFB Acyclic Mailbox Message: Get Slave Configuration - M340 This acyclic message reads the actual configuration (identifier bytes) of a specified slave. Note: The response data size depends on the actual slave implementation. Range 6 to 244. MNETDPV1_MAILVAR_GetConfig Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to retrieve configuration information from a specific PROFIBUS network slave.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to retrieve slave configuration information from the specified slave address. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Valid entries: 0 - 125 Enter the slave address of the device from which you wish to retrieve slave configuration data. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the In-MessageError status bit For details, see Modbus DDT (page 100) Error Byte 1 of 4. Bytes 2 - 4 are reserved For details on Error Byte 1, see Acyclic Message Status Word (page 207) Range 6 to 244 Number of bytes sent by the slave as response data If "Invalid other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207) 0001h: Address out of range 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information 00FFh: Gateway not initialized For details, see Return Codes (page 208) For detailed breakdown of the data available in this array, see Get Slave Configuration Message Structure (page 190). Response Data size will be from 6 to 244 bytes. Actual amount and type of data returned varies and depends on the capabilities of the slave device. Please see the device manufacturer's documentation for details. The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out - SlaveAddress
Out - Timeout
In -Length In - Fault
In - ReturnCode In - ResponseData[ ]
In - MessageDone
In - MessageError
DFB Acyclic Mailbox Message: Start/Stop Slave - M340 This acyclic message stops or starts a selection of slaves. Stopping a slave or group of slaves removes them from the normal cyclic data polling cycle. Starting a slave or group of slaves returns them to the normal polling cycle. This message is allowed in all operation modes (STOP, CLEAR and OPERATE). Note: The message will be accepted even if one or several slaves are not part of the configuration and can therefore obviously not be started. The application can, however, find out about this situation by evaluating the "Fault information" and "Message data words" of the response. MNETDPV1_MAILVAR_StartStopSlaves Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a PROFIBUS Master acyclic message to start or stop one or more slaves.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send Stop acyclic message to all slaves which have their OutSlaveNumber array element set to 1. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send Start acyclic message to all slaves which have their OutSlaveNumber array element set to 1. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit
Out - StartSlaves
1 Single-Bit Boolean
Out - TimeOut
1 16-bit Integer
Out SlaveNumber
126-element 8-bit Enter 0 or 1 for each array element before you trigger the Byte Array Start or Stop acyclic message 0 = Do not change this node (ignore acyclic message for this node) 1 = Change the state of this node to Stop for Stop acyclic message or Start for Start acyclic message (acyclic message affects this node) For details, see Modbus DDT (page 100) The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
DFB Acyclic Mailbox Message: Set Slave Mode - M340 In addition to station-related user data transfer, which is executed automatically, the Master can send control acyclic messages to a single slave, a group of slaves, or all slaves simultaneously. These control acyclic messages are transmitted as multicast acyclic messages. This permits use of sync and freeze modes for event-controlled synchronization of the slaves. The slaves begin sync mode when they receive a sync acyclic message from their assigned Master. The outputs of all addressed slaves are then frozen in their current state. During subsequent user data transmissions, the output data are stored on the slaves, but the output states remain unchanged. The stored output data are not sent to the outputs until the next sync acyclic message is received. Sync mode is concluded with the unsync acyclic message. Similarly, a freeze control acyclic message causes the addressed slaves to assume freeze mode. In this operating mode, the states of the inputs are frozen until the Master sends the next freeze acyclic message. Freeze mode is concluded with the unfreeze acyclic message. Note 1: It is only possible to send Sync and Freeze control acyclic messages when operating mode is either CLEAR or OPERATE mode. Note 2: Not all slaves support this feature. Refer to the documentation for the actual slave for more information. For additional details, see Set Slave Mode Message Structure (page 196). MNETDPV1_MAILVAR_SetSlaveMode Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to the PROFIBUS Master to send Sync and Freeze control messages to a slave or group of slaves.
Out SetSlaveMode
1 Single-Bit Boolean
In - MessageError
1 8-bit Byte 1 8-bit Byte Multi-variable nested DDT 1 Single-bit Boolean 1 Single-bit Boolean
Description Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to change the operating mode of a single slave or group of slaves. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Valid entries: 0-125, 127 If you enter a value from 0 to 125, the acyclic message will affect only the one slave device at this address. If you enter a value of 127, the acyclic message will affect a group of slaves, specified by the Out-GroupSelect parameter. For details on how to set this parameter, see Set Slave Mode Message Structure (page 196) For details on how the set this parameter, see Set Slave Mode Message Structure (page 196) For details, see Modbus DDT (page 100) The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
DFB Acyclic Mailbox Message: Set Address - M340 This acyclic message makes it possible to set the node address of a specified slave, provided that the slave supports this feature. Note: The message data size depends on the actual slave implementation. Range 0-240 bytes. MNETDPV1_MAILVAR_SetSlaveAdd Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to change the network node address of a slave that supports this feature.
Description This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send a new network node number to a specific slave, thereby changing its node address. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Description Valid entries: 0 - 126 Set this variable to the current address of the slave whose address you wish to change. Out - NewSlaveAddress 1 Valid entries: 0 - 126 8-Bit Byte Set this variable to the new address you wish the slave to have. Out - NoAddressChange 1 Valid entries: 00h: Change of address is still possible at a later stage 8-Bit Byte 01h - FFh: Change or address is not possible until after slave reset This parameter specifies whether the slave address can be changed again at a later stage. If this is not allowed, then it is only possible to change the address with this function after initial reset. After the initial reset, the slave takes the default address 126. Out - SlaveIdentNumber 1 Unique PROFIBUS Slave Identifier, assigned by 16-bit Integer PROFIBUS User Organization Out - TimeOut 1 Used to hold the amount of time in milliseconds to wait 16-bit Integer for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the In-MessageError status bit Out - MailBoxData Multi-variable For details, see Modbus DDT (page 100) nested DDT In - Error1 1 Error Byte 1 of 4. Bytes 2 - 4 are reserved 8-bit Byte For details on Error Byte 1, see Acyclic Message Status Word (page 207) In - Length 1 Range 6 to 244 8-bit Byte Number of bytes sent by the slave as response data, if any. In - ReturnCode 1 Refer to Return Codes (page 208) for additional 16-bit Integer information. In - Fault 1 If "Invalid other" is returned in the Acyclic Message 16-bit Integer Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207) 0001h: Address out of range. 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information. 00FFh: Gateway not initialized. 245-element Additional message data that may be returned by the 8-bit Byte slave Array 1 The DFB will set this bit when the Modbus TCP/IP response is successfully received. Single-bit Boolean 1 The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is Single-bit set, it indicates your control and sequencing logic should Boolean retry the command.
In - ConfigurationData
In - MessageDone
In - MessageError
DFB Acyclic Mailbox Message: Get Database Information - M340 This acyclic message fetches information about the stored database (userspecific data that was downloaded to the gateway in message data bytes 1 to 32 via mailbox FB_APPL_END_DATABASE_DOWNLOAD or from the configuration tool). This message also returns information about the amount of allocated I/O data space. MNETDPV1_MAILVAR_GetDataBase Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to retrieve information about the PROFIBUS database.
This is the bit your control and sequencing logic will use to trigger a message to retrieve information about the PROFIBUS database. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. For details, see Modbus DDT (page 100) Used to hold the amount of time in milliseconds to wait for a response to the Modbus TCP/IP command before assuming a communication error has occurred and setting the InMessageError status bit If 'Invalid Other' is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found in this variable. 0001h - No database in FLASH memory, or download is in progress. Total Input Length Sum of all Input lengths for all slaves in the database, in bytes Total Output Length Sum of all Output lengths for all slaves in the database, in bytes Required Initialization Input size for the current database. If the slaves are located in a contiguous block, this size is the same as the Total Input Length. Required Initialization Output size for the current database. If the slaves are located in a contiguous block, this size is the same as the Total Output Length.
In - Fault
1 16-bit Integer
In - InputLength In - OutputLength
In - InputSize
In - OutputSize
In Database Informations
4-element 16-bit This array holds two 32-bit values which are the PROFIBUS Integer Array and gateway CRC32 checksums. These values also appear in the gateway Status variables and in ProSoft Configuration Builder (PCB). 1 Single-bit Boolean 1 Single-bit Boolean The DFB will set this bit when the Modbus TCP/IP response is successfully received. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
In - MessageDone
In - MessageError
DFB Acyclic Mailbox Message: Read Class 1 Acyclic Data - M340 Some, but not all, PROFIBUS DP-V1 slaves are capable of providing more data that can be configured for normal cyclic polling. Acyclic data read messages allow the PROFIBUS Master to request this additional data from slaves that can provide it. This acyclic message initiates a PROFIBUS DP-V1 Class 1 Acyclic Read Request. Refer to protocol specification EN50170 (DP-V1) for more information about this type of acyclic message. MNETDPV1_MAILVAR_AcyclicRead Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a request to read PROFIBUS DP-V1 Class 1 Acyclic Data.
Description This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to read PROFIBUS DP-V1 Acyclic Data from a specific slave on the network. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Out - Index
Out - Length
In - ErrorDecode
1 8-bit Byte
In - Error1
1 8-bit Byte
In - Error2
1 8-bit Byte
In - Length
1 8-bit Byte In - Extended 1 Fault 16-bit Integer In - Fault 1 16-bit Integer In - AcyclicData[ ] 243-element 8bit Byte Array In - Message 1 Done Single-bit Boolean In - Message Error 1 Single-bit Boolean
DFB Acyclic Mailbox Message: Write Class 1 Acyclic Data - M340 Some, but not all, PROFIBUS DP-V1 slaves are capable of receiving more data that can be configured for normal cyclic polling. Acyclic data write messages allow the PROFIBUS Master to send this additional data to slaves that can receive it. This acyclic message initiates a PROFIBUS DP-V1 Class 1 Acyclic Write Request. Refer to PROFIBUS DP-V1 specification EN50170 (DP-V1) for more information. MNETDPV1_MAILVAR_AcyclicWrite Variables - M340 This variable structure is the one to use with your control and sequencing logic when you want to send a PROFIBUS DP-V1 Class 1 Acyclic Write Request.
Description This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to write PROFIBUS DP-V1 Acyclic Data to a specific slave on the network. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Out - Index
Out - WriteData[ ]
In - Error1
1 8-bit Byte
In - Error2
1 8-bit Byte
In - Length
1 8-bit Byte In - Extended Fault 1 16-bit Integer In - Fault 1 16-bit Integer In - AcyclicData[ ] 243-element 8-bit Byte Array In - Message Done 1 Single-bit Boolean In - Message Error 1 Single-bit Boolean
4.5
Modicon Quantum Variables, Derived Data Types and Derived Function Blocks 4.5.1 Quantum Communication Control and Data Buffer Variables and Derived Data Types (DDTs)
The MBP_MSTR function used by the Quantum platform performs a similar function to that of the DATA_EXCH function in the M340 platform. However, the MBP_MSTR function uses a different structure which requires the use of two variable arrays: a data buffer array, called BufferArray, and a control parameter array, called ControlArray. To make it more convenient for you, the two DDTs and variable arrays have been combined into one mid-level structure, called ControlAndBufferArrays DDT.
The BufferArray is used to hold only the data to be sent or the data received in the Modbus message created by the MBP_MSTR function. The BufferArray is an array of 100 16-bit integer registers. Since this array holds only the data contained in a Modbus message, the significance of the values in this array depends on how the data is to be used in the application. The ControlArray holds all the parameters needed to determine the type of message to be sent (read or write message), the amount of data to transfer in the message (register count), and the address of the device that will be the message target (the IP address of the ProLinx gateway). This array has a fixed structure, in which each element contains the value for a specific MBP_MSTR parameter. Here are the definitions of the parameters held in the ControlArray.
Control[2]
Holds the MBP_MSTR Block Error Status A value will be placed in this register after the message has completed, failed, or timed out. 0 = Message completed successfully Any non-zero value indicates an unsuccessful message attempt. For details, see MBP_MSTR Error Codes Holds the length (number of 16-bit registers) to be sent or requested by the MBP_MSTR Block. Holds MSTR operation-dependent information. Typically, this will be used to hold the starting register address in the target device where data will be written by a write command or read by a read command. Holds MBP_MSTR Routing Register information. Used to specify a message source node. Most Significant Byte (MSB) = Source Node Address, which could be the slot number of an NOE module or a Quantum processors built-in Ethernet port. Use a default value of 254 (16#FE00 hex) to use a Quantum processor's built-in Ethernet port. Least Significant Byte (LSB) = MBP on Ethernet Transporter (MET) mapping index. Use a default value of 0 to use a Quantum processor's builtin Ethernet port. For more details, see Unity Pro Help index: "MBP_MSTR, Ethernet (Quantum)" - Network Control Block Structures -Control Block for TCP/IP Ethernet Byte 4, MSB or first octet of the ProLinx gateway destination IP address Example: The value 192 for IP address 192.168.0.100 Byte 3, second octet of the ProLinx gateway destination IP address Example: The value 168 for IP address 192.168.0.100 Byte 2, third octet of the ProLinx gateway destination IP address Example: The value 0 for IP address 192.168.0.100 Byte 1, LSB last octet of the ProLinx gateway destination IP address Example: The value 100 for IP address 192.168.0.100
Control[3]
1 16-bit Integer Array Element 1 16-bit Integer Array Element 1 16-bit Integer Array Element
Control[4]
Control[5]
Control[6]
1 16-bit Integer Array Element 1 16-bit Integer Array Element 1 16-bit Integer Array Element 1 16-bit Integer Array Element
Control[7]
Control[8]
Control[9]
Quantum MBP_MSTR TCP/IP Ethernet Error Codes An error in an MSTR routine via TCP/IP Ethernet may produce one of the following errors in the MSTR control block. The error code appears as: Mmss where: M is the high code m is the low code ss is a subcode Hexadecimal Error Codes For TCP/IP Ethernet Message Errors
Hex Error Code 1001 2001 2002 Meaning Abort by user An operation type that is not supported has been specified in the control block One or more control block parameters were modified while the MSTR element was active (this only applies to operations which require several cycles for completion). Control block parameters may only be modified in inactive MSTR components. Invalid value in the length field of the control block Invalid value in the offset field of the control block Invalid value in the length and offset fields of the control block Unauthorized data field on slave Unauthorized network routing path on slave The control block is not assigned, or parts of the control block are located outside of the %MW (4x) range. Generic Modbus failure code Exception response by Modbus slave Inconsistent response by Modbus slave
Hexadecimal Error Codes For TCP/IP Ethernet Network Errors An error on the TCP/IP Ethernet network itself may produce one of the following errors in the CONTROL[1] register of the control block.
Hex Error Code 5004 5005 5006 5009 500C 500D 5011 5016 5017 5020 5023 5024 5025 5026 5027 5028 5029 502A 502B 502C 502D 502E F502 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 503A 503B 503C 503D Meaning Interrupted system invocation I/O error No such address The socket descriptor is not valid Not enough storage space Authorization denied Entry exists An argument is not valid An internal table has no more space There is interference on the connection This operation was blocked and the socket is non-blocking The socket is non-blocking and the connection cannot be closed down The socket is non-blocking and a previous connection attempt has not been concluded Socket operation on a non-socket The destination address is not valid Message too long Wrong type of protocol for the socket Protocol not available Protocol not supported Socket type not supported Operation not supported at socket Protocol family not supported Address family not supported Address is already in use Address not available Network is out of order Network cannot be reached Network shut down the connection during reset The connection was terminated by the peer The connection was reset by the peer An internal buffer is required, but cannot be assigned The socket is already connected The socket is not connected Cannot transmit after the socket has been shut off Too many references; cannot splice Connection timed out The connection attempt was denied
The destination host could not be reached from this node Directory not empty NI_INIT returned -1 The MTU is not valid The hardware length is not valid The route specified cannot be found Collision when invoking Select; these conditions have already been selected by another job The job ID is not valid No network resource Length error Addressing error Application error Client cannot process request No network resource Non-operational TCP connection Incoherent configuration FIN or RST not expected In reset mode Component not fully initialized
Set Slave Mode - Some PROFIBUS slaves support capabilities called Sync and Freeze. These are special command features which allow a PROFIBUS Master to control when and how a slave updates its internal cyclic inputs and outputs. These structures give the Master the ability to send these special kinds of control messages. For detailed information, see DFB Acyclic Mailbox Message: Set Slave Mode (page 171). 8 Start/Stop Slaves - These structures allow the Master to stop or start cyclic data transfers with a slave or or group of slaves. For detailed information, see DFB Acyclic Mailbox Message: Start/Stop Slave (page 169). 9 Set Operate Mode - These structures allow the Master to suspend or restart all cyclic polling activity on the network. For detailed information, see DFB Acyclic Mailbox Message: Set Operating Mode (page 160). 10 Get Database - These structures allow the Master to obtain and report database configuration information about the PROFIBUS Master hardware. For detailed information, see DFB Acyclic Mailbox Message: Get Database Information (page 176). All the DDTs and variables required to use, control, and manage these ten types of acyclic messages are contained in the MNETDPV1_MAILVAR structures and sub-structures.
DFB ReadCycData - Quantum The ReadCycData DFB is used to retrieve PROFIBUS cyclic input data from the 5204SE-MNET-PDPMV1 gateway and bring it back into the processor. This is the data being received by the PROFIBUS DP-V1 Master from the slave or slaves on the PROFIBUS network. MNETDPV1_BASICVAR_ReadCyclicData Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to read PROFIBUS cyclic input data.
This is the bit your control and sequencing logic will use to trigger a cyclic read message. Set this bit to one (1) whenever no other messages are active and when you want to update the PROFIBUS cyclic slave input data. Will hold the total number of 16-bit register words of PROFIBUS cyclic input data that need to be read. This value will be the same as what you entered in the PCB configuration for the [PROFIBUS Master DPV1] Input Data Size parameter Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
Out - RegisterCount
Out - IPAddress[ ]
In ReadOperationSuccess
MNETDPV1_Inputs Variable - Quantum This variable is an array of 1536 bytes. It is used to receive up to 768 words (1536 bytes) of PROFIBUS cyclic input data from slaves on the PROFIBUS network.
The order of data in this array will match the order in the PCB memory maps you exported and/or printed. The following screen shot shows a typical memory map.
The PCB table lists usage in words rather than bytes, where one (1) word equals two (2) bytes. In this example, there are only eight (8) total words or 16 total bytes of PROFIBUS cyclic input data configured (highlighted in yellow) of the available 1536 bytes that could be used. The 16 bytes (8 words) of PROFIBUS inputs from the device assigned to Slave Address 1 will be stored in the first 16 bytes of this array. You should also notice that the native storage size in the gateway's memory is 16-bit or 2-byte word registers. If the number of inputs from the first configured device is an odd number of bytes, you will see that memory register hold one byte from the first device in its low-order byte. The higher-order byte of this register will hold the first byte of data for the next configured slave device. In other words, this data is byte-packed with no extra blank bytes inserted just so the data for each slave address can begin on a low-order byte boundary.
If you wish to put gaps into the memory map to give more separation between data blocks from different slave addresses, you may do so in the PROFIBUS Master configuration in PCB by editing the starting address of the data for each slave so that it falls on whatever byte or register address you prefer. MNETDPV1_DataIn Variables - Quantum These variables allow you to take advantage of the MNETDPV1_DataIn DDT structure.
There is no direct link or logic provided to populate this array with the data received in the MNETDPV1_Inputs variable. If you wish to use these variables for your application, you will need to create the logic to link the individual bytes of the MNETDPV1_Inputs variable to the word array variables in this structure. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown. You may assign these variables to any valid %MW addresses that exist in your processor configuration. Sample Procedure for Copying from the MNETDPV1_Inputs array to the MNETDPV1_DataIn Variables 1 Create an INT variable to use as the control variable in a copy loop. This example uses the variable "i". 2 Assign a specific %MW address to the variables in the MNETDPV1_Inputs variable array. This example uses address %MW 200. 3 Assign a specific %MW address to the MNETDPV1_DataIn variable structure. This example uses address %MW 1. 4 Use logic to copy from one set of %MW memory addresses to the other for the amount of data you need to copy. In our sample configuration, we have 16 bytes of PROFIBUS cyclic input data. So, the logic needed would look something like this:
FOR i:=0 to 15 DO %MW1[i]:=%MW200[i] ; END_FOR ;
MNETDPV1_BASICVAR_WriteCyclicData Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to write PROFIBUS cyclic output data.
This is the bit your control and sequencing logic will use to trigger a cyclic write message. Set this bit to one (1) whenever no other messages are active and when you want to send PROFIBUS cyclic slave output data. Will hold the total number of 16-bit register words of PROFIBUS cyclic output data that need to be written. This value will be the same as what you entered in the PCB configuration for the [PROFIBUS Master DPV1] Output Data Size parameter. Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic output data variables have been updated.
Out IPAddress[ ]
MNETDPV1_Outputs Variable - Quantum This variable is an array of 1536 bytes. It is used to hold up to 768 words (1536 bytes) of PROFIBUS cyclic output data to be sent to slaves on the PROFIBUS network.
The order of data in this array will match the order in the PCB memory maps you exported and/or printed. The following illustration shows a typical memory map.
The PCB table lists usage in words rather than bytes, where one (1) word equals two (2) bytes. In this example, there are only 32 total words or 64 total bytes of PROFIBUS output data configured of the 1536 bytes available that could be used. The first 64 bytes (32 words) this array will hold data to be sent to Slave Address 1, Slot 0. You should also notice that the native storage size in the gateway's memory is 16-bit or 2-byte word registers. When you have more than one slave device, this data is 'byte-packed' with no extra blank bytes inserted just so the data for each slave address can begin on an even-numbered, low-order byte boundary. If you wish to put gaps into the memory map to give more separation between data blocks from different slave addresses, you may do so in the PROFIBUS Master configuration in PCB by editing the starting address of the data for each slave. Page 150 of 245 ProSoft Technology, Inc. January 28, 2011
MNETDPV1_DataOut Variable - Quantum These variables allow you to take advantage of the MNETDPV1_DataOut DDT structure.
There is no direct link or logic provided to populate data in the MNETDPV1_Outputs variable from the data in these variables. If you wish to use these variables for your application, you will need to create the logic to link the variables in this structure to the MNETDPV1_Outputs array variable. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration. Sample Procedure for Copying from the MNETDPV1_DataOut variables to the MNETDPV1_Outputs array 1 Create an INT variable to use as the control variable in a copy loop. This example uses the variable "j". 2 Assign a specific %MW address to the variables in the MNETDPV1_DataOut variable structure. This example uses address %MW 1000. 3 Assign a specific %MW address to the MNETDPV1_Outputs variable array. This example uses address %MW 1200. 4 Use logic to copy from one set of %MW memory addresses to the other for the amount of data you need to copy. In our sample configuration, we have 64 bytes of PROFIBUS cyclic output data. So, the logic needed would look something like this:
FOR j:=0 to 63 DO %MW1000[j]:=%MW1200[j] ; END_FOR ;
MNETDPV1_BASICVAR_ModuleStatus Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to read general gateway status data.
This is the bit your control and sequencing logic will use to trigger a message to get general gateway status data. Set this bit to one (1) whenever no other messages are active and when you want to update the StatInF variable table. Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated. If "Invalid other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207) 0001h: Address out of range. 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information. 00FFh: gateway not initialized. Refer to Return Codes (page 208) for additional information.
Out - IPAddress[ ]
Out - RoutingRegister
In - StatusOperationActive
In - StatusOperationError
In - ReturnCode
1 16-bit Integer
MNETDPV1_StatIn Variables - Quantum These variables take advantage of the StatInF DDT structure. The GetStatus DFB will automatically populate this variable list with general gateway status information received in the Modbus TCP/IP response to the GetModuleStatus command.
The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration by setting the desired start address in the PLC Status Register Start parameter in the PCB configuration file. This will cause the import files to contain addresses in the range you select and change the values displayed in this array.
DFB Get PROFIBUS Standard Slave Diagnostics - Quantum MNETDPV1_BASICVAR_PB_SLVDiagnostics Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to read standard PROFIBUS slave diagnostic data.
Out - IPAddress[ ]
Out - RoutingRegister
Description This is the bit your control and sequencing logic will use to trigger a read message that will retrieve PROFIBUS slave diagnostic data. Set this bit to one (1) whenever no other messages are active and when you want to update the MNETDPV1_SLVDIAG data variables. Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136)
In - DiagOperationError
In - DiagOperationSuccess
MNETDPV1_SLVDIAG Variables - Quantum This variable structure is a collection of six-byte arrays. Each array element holds the six bytes of standard PROFIBUS slave data reported to the PROFIBUS Master from each slave that exists on the network as part of the regular cyclic data polling scheme. The array element number corresponds to the node address of each slave.
The PB_SlaveDiagnostic DFB will automatically populate these variables with the diagnostic data returned by the Modbus TCP/IP command. The %MW addresses shown are for illustration only. If you decide to use these variables, your application may require that you map them to addresses other than the ones shown here. You may assign these variables to any valid %MW addresses that exist in your processor configuration.
4.5.5 Sample Control and Sequencing Logic for Cyclic Data Polling Quantum
Here is a structured text (ST) logic example of how you might control and sequence the PROFIBUS cyclic data DFBs. You may adapt this sample to fit your application or you may choose to create your own control and sequencing scheme that is more suitable for your specific needs. For this example, start by creating two variables:
LastExecuted Start as type INT as type BOOL
Then, you can use the following ST logic code. Each time you set the variable Start equal to 1, it will begin executing a sequence to read cyclic inputs, write cyclic outputs, get general gateway status, and get standard PROFIBUS slavespecific diagnostic data. As long as Start remains equal to 1, this sequence will roll over and be repeated until interrupted by setting Start = 0.
IF Start:=1 THEN IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadcyclicData=0 THEN IF LastExcuted=0 THEN MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadcyclicData:=1; LastExcuted:=1; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadcyclicData=0 THEN IF LastExcuted=1 THEN MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData:=1; LastExcuted:=2; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND MNETPDPMV1_BASICVAR.WriteCyclicData.Out.WriteCyclicData=0 AND MNETPDPMV1_BASICVAR.ReadCyclicData.Out.ReadcyclicData=0 THEN IF LastExcuted=2 THEN MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus:=1; LastExcuted:=3; END_IF; END_IF; IF MNETPDPMV1_BASICVAR.PB_SLVDiagnostics.Out.GetPBSlaveDiagnostics=0 AND MNETPDPMV1_BASICVAR.ModuleStatus.Out.GetModuleStatus=0 AND
DFB Acyclic Mailbox Message: Set Operating Mode - Quantum This command allows setting the operating mode of the PROFIBUS Master (STOP, CLEAR, or OPERATE). MNETDPV1_MAILVAR_SetOperatMode Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to set the PROFIBUS Master/network operating mode. Possible choices are: Operate - Tells the PROFIBUS Master to begin and continue normal cyclic polling and pass acyclic messages, if requested. The network should be in STOP mode when you issue this command message. Stop - Tells the PROFIBUS Master to interrupt normal cyclic polling. Acyclic messaging can still be accomplished when the network is stopped. The network should be in OPERATE mode when you issue this command. Clear - Tells the PROFIBUS Master to attempt to clear diagnostic errors and re-initialize the PROFIBUS network. The network should be in STOP mode when you issue this command.
4-element Each of the four integer elements holds one octet of the message destination device's IP Address. For this 16-bit Integer Array application, it will be the ProLinx gateway's Ethernet port address. 1 Single-Bit Boolean This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to begin and continue normal network cyclic polling and acyclic messaging. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to stop normal network cyclic polling. Some acyclic messaging can still be accomplished in this mode. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to clear slave diagnostic faults and re-initialize the PROFIBUS network. Set this bit to one (1) whenever no other messages are active, the network mode is currently set to STOP, and you want to send this acyclic message. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
Out - Operate
Out - Stop
1 Single-Bit Boolean
Out - Clear
1 Single-Bit Boolean
Out RoutingRegister
1 16-bit Integer
In - OperationActive
In - OperationError
In OperationSuccess
DFB Acyclic Mailbox Message: Get Live List - Quantum This acyclic message returns 127 bytes of information about the nodes on the network. Each byte holds the node type for one bus subscriber (node or device). The position of the byte in the response data corresponds to the address (0 to 125) of the node on the network. The content of each byte tells whether the node is a Master or slave (multiple PROFIBUS Masters may co-exist on the same physical network). This acyclic message can be sent in all operation modes (STOP, CLEAR, and OPERATE); however, the gateway must be initialized properly. MNETDPV1_MAILVAR_GetLiveList Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to request a list of PROFIBUS network nodes (bus subscribers).
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master provide a list of active slave nodes. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Out - IPAddress[ ]
4-element Each of the four integer elements holds one octet of the message destination device's IP Address. For this 16-bit Integer Array application, it will be the the ProLinx gateway's Ethernet port address. 1 16-bit Integer Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
Out - RoutingRegister
In - ListOperationActive
In - ListOperationError
In ListOperationSuccess In - StationsStatus[ ]
127 element Each byte will contain one of the following codes indicating type of node present at that node address: 8-bit Byte 00h: Slave Station Array 01h: Master Station not yet ready for Token ring (station physically attached to the bus but not configured or polling) 02h: Master Station ready to enter Token ring (station is configured but not polling; there is not yet any Token transmission) 03h: Master Station in Token Ring (Token transmission through the station; station is fully operational) 04h: Station does not exist 1 16-bit Integer 1 16-bit Integer For details on Fault Codes, see Acyclic Message Status Word (page 207). For details, see Return Codes (page 208).
In - Fault
In - Return Code
DFB Acyclic Mailbox Message: Get Slave Diagnostics - Quantum This acyclic message reads extended diagnostic data from a specified slave. Note: The response data size depends on the actual slave implementation. Range 6 to 244. MNETDPV1_MAILVAR_GetDiag Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to retrieve extended slave diagnostic data from a specific PROFIBUS network slave.
Out - SlaveAddress
Out - RequestType
Out - IPAddress[ ]
Out - RoutingRegister
In - Error1
In - Length In - Fault
In - Return Code
1 16-bit Integer
In - RDDiagnostActive
In - RDDiagnostError
In RDDiagnostSuccess
NOTE: The MBP_MSTR function used on the Quantum platform has a lower data transfer limit than the DATA_EXCH function for the M340 platform. As a result, on the Quantum platform, the amount of data that can be transferred between a Quantum PAC and the ProLinx Gateway is 200 8-bit bytes (100 16-bit words) per message transaction. This limit is more than enough for most PROFIBUS DP message telegrams. However, there are a few PROFIBUS messages that could contain more data in the PROFIBUS response than can be sent to the Quantum processor using the MBP_MSTR function for Modbus TCP/IP. It such cases, the PROFIBUS data is truncated after the first 200 bytes, any PROFIBUS data beyond that limit will not be sent to the Quantum, and the excess data will be lost. The performance of this Get Slave Diagnostics mailbox message may be affected by this limitation. Please consult your device manufacture's documentation to see if any of your PROFIBUS DP slave devices provide more than 200 bytes of extended diagnostic data in per message.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master DFB Acyclic Mailbox Message: Get Slave Configuration - Quantum This acyclic message reads the actual configuration (identifier bytes) of a specified slave. Note: The response data size depends on the actual slave implementation. Range 6 to 244.
MNETDPV1_MAILVAR_GetConfig Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to retrieve configuration information from a specific PROFIBUS network slave.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to retrieve slave configuration information from the specified slave address. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Valid entries: 0 - 125 Enter the slave address of the device from which you wish to retrieve slave configuration data. Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) Error Byte 1 of 4. Bytes 2 - 4 are reserved For details on Error Byte 1, see Acyclic Message Status Word (page 207) Range 6 to 244 Number of bytes sent by the slave as response data. If "Invalid other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207) 0001h: Address out of range. 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information. 00FFh: Gateway not initialized. For details, see Return Codes (page 208) For detailed breakdown of the data available in this array, see Get Slave Configuration Message Structure (page 190). Response Data size will be from 6 to 244 bytes. Actual amount and type of data returned varies and depends on the capabilities of the slave device. Please see the device manufacturer's documentation for details. The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command.
Out - SlaveAddress
Out - IPAddress[ ]
Out - RoutingRegister
In - Error1
In -Length In - Fault
In - RDConfigActive
In - RDConfigError
The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
DFB Acyclic Mailbox Message: Start/Stop Slave - Quantum This acyclic message stops or starts a selection of slaves. Stopping a slave or group of slaves removes them from the normal cyclic data polling cycle. Starting a slave or group of slaves returns them to the normal polling cycle. This message is allowed in all operation modes (STOP, CLEAR and OPERATE). Note: The message will be accepted even if one or several slaves are not part of the configuration and can therefore obviously not be started. The application can, however, find out about this situation by evaluating the "Fault information" and "Message data words" of the response. MNETDPV1_MAILVAR_StartStopSlaves Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a PROFIBUS Master acyclic message to start or stop one or more slaves.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send Stop acyclic message to all slaves which have their OutSlaveNumber array element set to 1. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send Start acyclic message to all slaves which have their OutSlaveNumber array element set to 1. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Out - StartSlaves
1 Single-Bit Boolean
Out - IPAddress[ ]
4-element Each of the four integer elements holds one octet of the message destination device's IP Address. For this 16-bit Integer Array application, it will be the the ProLinx gateway's Ethernet port address. 126-element Enter 0 or 1 for each array element before you trigger the Start or Stop acyclic message 8-bit Byte Array 0 = Do not change this node (ignore acyclic message for this node) 1 = Change the state of this node to STOP for Stop acyclic message or START for Start acyclic message (acyclic message affects this node) 1 16-bit Integer Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
Out - SlaveNumber
In StStOperationActive
1 Single-bit Boolean
DFB Acyclic Mailbox Message: Set Slave Mode - Quantum In addition to station-related user data transfer, which is executed automatically, the Master can send control acyclic messages to a single slave, a group of slaves, or all slaves simultaneously. These control acyclic messages are transmitted as multicast acyclic messages. This permits use of sync and freeze modes for event-controlled synchronization of the slaves. The slaves begin sync mode when they receive a sync acyclic message from their assigned Master. The outputs of all addressed slaves are then frozen in their current state. During subsequent user data transmissions, the output data is stored on the slaves, but the output states remain unchanged. The stored output data is not sent to the outputs until the next sync acyclic message is received. Sync mode is concluded with the unsync acyclic message. Similarly, a freeze control acyclic message causes the addressed slaves to assume freeze mode. In this operating mode, the states of the inputs are frozen until the Master sends the next freeze acyclic message. Freeze mode is concluded with the unfreeze acyclic message. Note 1: It is only possible to send Sync and Freeze control acyclic messages when operating mode is either CLEAR or OPERATE. Note 2: Not all slaves support this feature. Refer to the documentation for the actual slave for more information. For additional details, see Set Slave Mode Message Structure (page 196).
MNETDPV1_MAILVAR_SetSlaveMode Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to the PROFIBUS Master to send Sync and Freeze control messages to a slave or group of slaves.
Out - SlaveAddress
1 8-bit Byte
1 8-bit Byte 1 8-bit Byte 4-element 16-bit Integer Array 1 16-bit Integer
In SlaveModeActive In - SlaveModeError
In SlaveModeSuccess
DFB Acyclic Mailbox Message: Set Address - Quantum This acyclic message makes it possible to set the node address of a specified slave, provided that the slave supports this feature. Note: The message data size depends on the actual slave implementation. Range 0-240 bytes. MNETDPV1_MAILVAR_SetSlaveAdd Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to change the network node address of a slave that supports this feature.
Description This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to send a new network node number to a specific slave, thereby changing its node address. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message.
Description Valid entries: 0 - 126 Set this variable to the current address of the slave whose address you wish to change. Out - NewSlaveAddress 1 Valid entries: 0 - 126 8-Bit Byte Set this variable to the new address you wish the slave to have. Out - NoAddressChange 1 Valid entries: 00h: Change of address is still possible at a later stage. 8-Bit Byte 01h - FFh: Change or address is not possible until after slave reset This parameter specifies whether the slave address can be changed again at a later stage. If this is not allowed, then it is only possible to change the address with this function after initial reset. After the initial reset, the slave takes the default address 126. Out - SlaveIdentNumber 1 Unique PROFIBUS Slave Identifier, assigned by 16-bit Integer PROFIBUS User Organization Out - IPAddress[ ] 4-element Each of the four integer elements holds one octet of the 16-bit Integer message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet Array port address. Out - Routing Register 1 Default value for Quantum processors with built-in 16-bit Integer Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) In - Error1 1 Error Byte 1 of 4. Bytes 2 - 4 are reserved 8-bit Byte For details on Error Byte 1, see Acyclic Message Status Word (page 207) In - Length 1 Range 6 to 244 8-bit Byte Number of bytes sent by the slave as response data, if any. In - ReturnCode 1 Refer to Return Codes (page 208) for additional 16-bit Integer information. In - Fault 1 If "Invalid other" is returned in the Acyclic Message 16-bit Integer Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207) 0001h: Address out of range. 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information. 00FFh: Gateway not initialized. In - SetAddressData 200-element Additional message data that may be returned by the 8-bit Byte slave Array In - SetSlaveAddActive 1 The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. Single-bit Boolean
In SetSlaveAddSuccess
DFB Acyclic Mailbox Message: Get Database Information - Quantum This acyclic message fetches information about the stored database (userspecific data that was downloaded to the gateway in message data bytes 1 to 32 via mailbox FB_APPL_END_DATABASE_DOWNLOAD or from the configuration tool). This message also returns information about the amount of allocated I/O data space.
MNETDPV1_MAILVAR_GetDataBase Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to retrieve information about the PROFIBUS database.
4-element Each of the four integer elements holds one octet of the message destination device's IP Address. For this 16-bit Integer Array application, it will be the the ProLinx gateway's Ethernet port address. 1 Single-Bit Boolean This is the bit your control and sequencing logic will use to trigger a message to retrieve information about the PROFIBUS database. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) If 'Invalid Other' is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found in this variable. 0001h: No database in FLASH memory, or download is in progress. Total Input Length Sum of all Input lengths for all slaves in the database, in bytes Total Output Length Sum of all Output lengths for all slaves in the database, in bytes Required Initialization Input size for the current database. If the slaves are located in a contiguous block, this size is the same as the Total Input Length. Required Initialization Output size for the current database. If the slaves are located in a contiguous block, this size is the same as the Total Output Length.
Out GetDatabaseInfo
1 16-bit Integer
In - Fault
1 16-bit Integer
In - Input Length
In - Output Length
4-element This array holds two 32-bit values which are the PROFIBUS 16-bit and gateway CRC32 checksums. These values also appear in Integer Array the gateway status variables and in ProSoft Configuration Builder (PCB). 1 Single-bit Boolean 1 Single-bit Boolean 1 Single-bit Boolean The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
In - DatabaseActive
In - DatabaseError
In DatabaseSuccess
DFB Acyclic Mailbox Message: Read Class 1 Acyclic Data - Quantum Some, but not all, PROFIBUS DP-V1 slaves are capable of providing more data that can be configured for normal cyclic polling. Acyclic data read messages allow the PROFIBUS Master to request this additional data from slaves that can provide it. This acyclic message initiates a PROFIBUS DP-V1 Class 1 Acyclic Read Request. Refer to protocol specification EN50170 (DP-V1) for more information about this type of acyclic message. MNETDPV1_MAILVAR_AcyclicRead Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a request to read PROFIBUS DP-V1 Class 1 Acyclic Data.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to read PROFIBUS DP-V1 Acyclic Data from a specific slave on the network. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Each of the four integer elements holds one octet of the message destination device's IP Address. For this application, it will be the the ProLinx gateway's Ethernet port address. Valid entries 0 - 125 Enter the node address of the slave device from which you wish to receive Acyclic Data. Valid entries 0 - n (where 'n' is the highest configured slot number on the target slave address - depends on device configuration) Enter the slot number on the target node from which you wish to retrieve the acyclic data. See slave device manufacturer for valid entries. This parameter is used to address the desired data block in the target slave. See slave device manufacturer for valid entries. Maximum value is 200 bytes. See NOTE below. This parameter specifies the number of bytes of the data block that has to be read. If the slave data block length is less than requested, the length of the response will be the actual length of the data block. If the slave data block is greater or equal, then the response will contain the same amount of data. Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation, or the EN50170 (DP-V1) protocol specification. If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation, or the EN50170 (DP-V1) protocol specification. If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation, or the EN50170 (DP-V1) protocol specification. This value specifies the number of valid acyclic read data bytes returned by the slave.
Out - IPAddress[ ]
Out - SlaveAddress
Out - Slot
Out - Index
Out - Length
1 16-bit Integer
In - ErrorDecode
1 8-bit Byte
In - Error1
1 8-bit Byte
In - Error2
1 8-bit Byte
In - Length
1 8-bit Byte
Refer to Read Class 1 Acyclic Data Message Structure (page 203) Refer to Read Class 1 Acyclic Data Message Structure (page 203) This array will hold the actual acyclic read data bytes returned by the slave. The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
In AcyclicReadActive In - AcyclicReadError
In AcyclicReadSuccess
NOTE: The MBP_MSTR function used on the Quantum platform has a lower data transfer limit than the DATA_EXCH function for the M340 platform. As a result, on the Quantum platform, the amount of data that can be transferred between a Quantum PAC and the ProLinx Gateway is 200 8-bit bytes (100 16-bit words) per message transaction. This limit is more than enough for most PROFIBUS DP message telegrams. However, there are a few PROFIBUS messages that could contain more data in the PROFIBUS response than can be sent to the Quantum processor using the MBP_MSTR funcution for Modbus TCP/IP. It such cases, the PROFIBUS data is truncated after the first 200 bytes, any PROFIBUS data beyond that limit will not be sent to the Quantum, and the excess data will be lost. The performance of this Read Class 1 Acyclic mailbox message may be affected by this limitation. Please consult your device manufacture's documentation to see if any of your PROFIBUS DP slave devices provide more than 200 bytes of acyclic read data per message.
DFB Acyclic Mailbox Message: Write Class 1 Acyclic Data - Quantum Some, but not all, PROFIBUS DP-V1 slaves are capable of receiving more data that can be configured for normal cyclic polling. Acyclic data write messages allow the PROFIBUS Master to send this additional data to slaves that can receive it. This acyclic message initiates a PROFIBUS DP-V1 Class 1 Acyclic Write Request. Refer to PROFIBUS DP-V1 specification EN50170 (DP-V1) for more information. MNETDPV1_MAILVAR_AcyclicWrite Variables - Quantum This variable structure is the one to use with your control and sequencing logic when you want to send a PROFIBUS DP-V1 Class 1 Acyclic Write Request.
This is the bit your control and sequencing logic will use to trigger a message to tell the PROFIBUS Master to write PROFIBUS DP-V1 Acyclic Data to a specific slave on the network. Set this bit to one (1) whenever no other messages are active and you want to send this acyclic message. Valid entries 0 - 125 Enter the node address of the slave device to which you wish to send Acyclic Data. Valid entries 0 - n (where 'n' is the highest configured slot number on the target slave address - depends on device configuration) Enter the slot number on the target node to which you wish to send the acyclic data. See slave device manufacturer for valid entries. This parameter is used to address the desired data block in the target slave. Valid entries: 1 - 200 Enter the number of acyclic data bytes you wish to write to the target slave.
Out - SlaveAddress
Out - Slot
Out - Index
Out - LengthOfBytes
Out - IPAddress[ ]
4-element Each of the four integer elements holds one octet of the message destination device's IP Address. For this 16-bit Integer Array application, it will be the the ProLinx gateway's Ethernet port address. 200-element This array will be used to hold the acyclic data, in bytes, that you wish to write to the target slave. 8-bit Byte Array Default value for Quantum processors with built-in Ethernet port is 254 (16#FE00 hex) For details, see "MBP_MSTR, Ethernet (Quantum) - Control Block for TCP/IP Ethernet" in Quantum Help Files, or Quantum Communication Control and Data Buffer Variables and DDTs (page 136) If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation or the EN50170 (DP-V1) protocol specification. If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation or the EN50170 (DP-V1) protocol specification. If 'Fault' contains error code 0010h, more information can be found here. For information on how to interpret these values, refer to the slave device manufacturer's documentation or the EN50170 (DP-V1) protocol specification. The value seen here specifies the number of valid data bytes returned by the slave, if any. For details, see Write Class 1 Acyclic Data Message Structure (page 205)
Out - WriteData
In - ErrorDecode
1 8-bit Byte
In - Error1
1 8-bit Byte
In - Error2
1 8-bit Byte
In - Length In - ExtendedFault
In AcyclicWriteActive In - AcyclicWriteError
The DFB will set this bit when the Modbus TCP/IP message has been initiated and is being processed. The DFB will set this bit when the Modbus TCP/IP response is not successfully received. When this bit is set, it indicates your control and sequencing logic should retry the command. The DFB will set this bit when the Modbus TCP/IP response is successfully received and the PROFIBUS cyclic input data variables have been updated.
In AcyclicWriteSuccess
4.6
PROFIBUS Acyclic Telegram (Message) Block Structures 4.6.1 Set Operating Mode Message Structure
Parameter Command Initiator Command Name Command Number Fragmented Extended Header Data Description Application FB_APPL_SET_OPERATION_MODE 0002h No Fault information may be returned in the header of the response.
Mode 40h: STOP 80h: CLEAR C0h: OPERATE Conf. Req. 00h: Confirmation is not required 01h: Confirmation required. All confirmations are automatically sent by the Master, the user is not required to send a confirmation message.
Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Return Codes (page 208) for more information. 0001h: Invalid operating mode 0002h: Invalid 'Conf.Req.' setting 0003h: Timeout or incorrect answering of the 'FB_ABM_SHIFT_OPERATION_MODE_REQ' message 0004h: Application did not permit changing the operation mode. More information might be supplied in the 'Application Specific Error Code'. 00FEh: Command not possible in 'Class 2-Only' mode. 00FFh: gateway not initialized
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207). Station Type [0 126] 00h: Slave Station
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master 01h: Master Station not yet ready for Token ring (station only physically at the bus) 02h: Master Station ready to enter Token ring (there is not yet any Token transmission) 03h: Master Station in Token Ring (Token transmission through the station) 04h: Station does not exist
Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207). 000Ah: Failed to build Live List. 00FFh: gateway offline (not initialized or no valid database)
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207).
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Slave Address Range 0 to 125; specifies the slave from which to read diagnostics.
Type of request 00h: Internal slave diagnostic request. Returns the diagnostic information stored in the Master. Can only be requested for slaves configured by the Master. Note: Not allowed when operating in "Class 2-Only" mode. 01h: External slave diagnostic request. Sends a diagnostic request on the network to the specified slave. Can be requested for all slaves on the network. Error code [1 ...4] If "Return Code" equals 8030h ("Negative indication from lower layer"), status values according to the DP-specification may be available in "Error Code 1". Error Codes 2 to 4 are reserved. Refer to Acyclic Mailbox Message Error Codes (page 207) Return Code Refer to Acyclic Mailbox Message Error Codes (page 207) Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. 0001h: Address out of range. 0002h: Incorrect "Type of request" 000Ah: Failed to read diagnostic data from slave. Refer to Return Codes (page 208) for additional fault information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional fault information. 00FEh: Command not possible; gateway operates as a Class 2 Master only. 00FFh: gateway offline (not initialized or no valid database). Station Status [1 ... 3] Refer to EN50170 Vol. 2 for more information. Master Address Address of the Master that parameterized the slave. Ident Number Unique ID assigned by the PROFIBUS User Organization. Extended Diagnostic Data Slave user-specific data. Refer to the documentation for the actual slave for more information.
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207). Slave Address Range 0 to 125; specifies the slave from which to read the configuration. Page 190 of 245 ProSoft Technology, Inc. January 28, 2011
Error Code [1 4] If "Return Code" equals 8030h ("Negative indication from lower layer"), status values according to the DP-specification may be available in "Error Code 1", Error Codes 2 through 3 are reserved. Refer to Acyclic Mailbox Message Error Codes (page 207). Return Code Refer to Acyclic Mailbox Message Error Codes (page 207). Fault Information If "Invalid other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Acyclic Message Status Word (page 207). 0001h: Address out of range. 000Ah: Failed to execute request. Refer to Return Codes (page 208) for additional information. 000Bh: Remote station failure. Refer to Return Codes (page 208) for additional information. 00FFh: gateway not initialized. Identifier Bytes [1 n] Refer to EN50170 Vol. 2 for information on the structure of these bytes. In addition, refer to the documentation provided with the slave device for more information.
Command: Message data word 1-63 Byte-array stating which slave/slaves to stop. Array index is equal to slave address. 0: Do not affect slave 1: Stop slave 2-255: Reserved Page 192 of 245 ProSoft Technology, Inc. January 28, 2011
Response: Acyclic Message Status Word (in response header) "Invalid Data Size" is returned if data size in the command header does not equal 126. If "Invalid Other" is returned, further information is to be found in Extended word 8. Additional Fault information (Extended word 7) If Extended word 8 equals 0x000A -"Failed to execute request" additional info can be found here. Fault information (Extended word 8) 0001h: Invalid setting in Message data word 1-63 of the command. 0002h: At least one slave reports a warning. Refer to Message data word 163. 000Ah: Failed to execute request. Additional fault information is to be found in Extended word 7. 00FEh: Command not possible, gateway operates as Class 2 Master only. 00FFh: gateway not initialized (this command is only possible after END_INIT). Message data word 1-63 Byte-array stating the status of the slaves. Array index is equal to slave address. 0: Slave unaffected 1: Slave stopped 2: Warning - Slave could not be stopped because it is not part of the configuration 3: Warning - Slave already stopped
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Command: Message data word 1-63 Byte-array stating which slave/slaves to start. Array index is equal to slave address. 0: Do not affect slave 1: Start slave 2-255: Reserved
Response: Acyclic Message Status Word (in response header) "Invalid Data Size" is returned if Data size in the command header does not equal 126. If "Invalid Other" is returned, further information is to be found in Extended word 8. Additional Fault information (Extended word 7) If Extended word 8 equals 0x000A -"Failed to execute request" additional info can be found here Fault information (Extended word 8) 0001h: Invalid setting in Message data word 1-63 of the command. 0002h: At least one slave reports a warning. Refer to Message data word 163. 000Ah: Failed to execute request. Additional fault information is to be found in Extended word 7. 00FEh: Command not possible, gateway operates as Class 2 Master only. 00FFh: gateway not initialized (this command is only possible after END_INIT). Message data word 1-63 Byte-array stating the status of the slaves. Array index is equal to slave address. 0: Slave unaffected 1: Slave started 2: Warning - Slave could not be started because it is not part of the configuration
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207). Slave Address Range 0 to 125; 127 If the request applies for only one slave, that Slave Address must be entered in the range 1 to 125. If a slave group is to be addressed, Slave Address should be 127 (Multicast address).
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Group Select Range 01h to FFh (Bit Coded) This parameter determines which group to address. Refer to the following example:
b7 Group 8 b6 Group 7 b5 Group 6 b4 Group 5 b3 Group 4 b2 Group 3 b1 Group 2 b0
Group 1
Example: To address Group 1, 2, and 4, the Group Select value should be 0Dh. If an individual slave should be addressed, the correct group selection must also be made, because the slave will ignore the message if it does not belong to the requested group(s). What group(s) a slave belongs to is determined during network configuration, and is downloaded during initialization to each slave via the PROFIBUS telegram "Set_Prm". Control Command This parameter specifies the command to send:
Bit 0 (LSB) 1 2 3 4 5 6 7 (MSB) Explanation Reserved, set to zero Reserved, set to zero Unfreeze input data Freeze input data Unsynchronize output data Synchronize output data Reserved, set to zero Reserved, set to zero
"Extended Fault Information" Contents 000Ah 5001h 5002h 5003h 5004h Incorrect operation mode (Clear/Operate Only) Invalid Freeze Group (Group is not initiated to be Freeze Group) Invalid Sync Group (Group is not initiated to be Sync Group) Incorrect Control Command No Sync or Freeze groups enabled in Master configuration
00FEh
00FFh
Return Code Fault Information Slave Data 1 Slave Data 2 Slave Data 3
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207).
Reference User Manual Current Slave Address Range 0 to 125 Specifies the current address of the slave. New Slave Address Range 0 to 125 Specifies the new address of the slave.
Slave Ident Number Ident number for the slave, which address should be altered. No_Add_Change This parameter specifies whether it is allowed to change the slave address again at a later stage. If this is not allowed, then it is only possible to change the address with this function after initial reset. After the initial reset, the slave takes the default address 126. 00h Change of address is still possible at a later stage 01h - FFh Change of address is only possible after the initial address (the default address = 126) Error Code [1 ... 4] If 'Return Code' equals 8030h ('Negative indication from lower layer'), status values according to the DP-specification is available in 'Error Code 1'. Error Codes 2 to 4 are reserved. (See Return Codes (page 208) and Error Codes (page 208)) Fault Information and Extended Fault Information
"Fault Information" Contents 0001h 0002h 000Ah 000Bh 00FFh Current Slave Address out of range New Slave Address out of range Failed to send Global Control request Remote Station Failure Module offline "Extended Fault Information" Contents For additional fault information, see Return Codes (page 208) For additional fault information, see Return Codes (page 208) (Not initialized or no valid database)
Slave Data With this parameter it is possible to deliver user specific data. The data is stored in the slave if possible (EEPROM, FLASH, etc.)
Total Input Length, Total Output Length: The sum of Input/Output lengths for all slaves in the database (in bytes). Init Input size, Init Output size: Required initialization Input/Output sizes for the current database. If the slaves are located in a contiguous block, these sizes are the same as total Input/Output lengths. Note: The input/output direction refers to the directions and naming used for the DPRAM areas, not to the input/output directions used in the bus database or the NetTool-PB.
Database Description: String of ASCII characters that describes the data base file. This is the string that was written to the database by the FB_APPL_END_DATABASE_DOWNLOAD command. No. of Slaves: Number of configured slaves in the database. Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here. Refer to Return Codes (page 208) for more information. 0001h: No database in flash, or download in progress.
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207). Slave Address Station address of the slave responder
Reference User Manual Slot Number and Slot Index Used in the slave to address the desired data block
Length This parameter specifies the number of bytes of the data block to read. If the slave data block length is less than requested, the length of the response will be the actual length of the data block. If the slave data block is greater or equal, the response will contain the same amount of data. The slave may answer with an error response if data access is not allowed. Data [1 n] Returned data Fault Information and Extended Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here.
"Fault Information" 0001h 000Ah 000Bh 0010h 0011h 0012h 0013h 00FEh 00FFh Address out of range Failed to execute request Remote station failure Remote station DP-V1 failure Length out of range (>240 bytes) Slave does not support DP-V1 Slave not active or not present in configuration Function_Number "Extended Fault Information" Contents Refer to Return Codes (page 208).
Command not possible in "Class 2- Only" mode Module offline (not initialized or no valid database) -
Error Decode, Error Code 1 and Error Code 2 If "Fault Information" contains error code 0010h, refer to the slave device manufacturer's documentation, or the EN50170 (DP-V1) protocol specification.
Acyclic Message Status Word Refer to Acyclic Message Status Word (page 207). Slave Address Station address of the slave responder
Reference User Manual Slot Number and Slot Index Used in the slave to address the desired data block
Length This parameter specifies the number of bytes to write. If the destination data block size is less than requested, the response will contain an error message. If the data block length is greater than or equal to the requested length, the response contains the number of bytes that have been written. The slave may answer with an error response if data access is not allowed. Data [1 n] Data that should be written Fault Information and Extended Fault Information If "Invalid Other" is returned in the Acyclic Message Status Word in the header of the response, information about the fault can be found here:
"Fault Information" 0100h 0A00h 0B00h 1000h 1100h 1200h 1300h FE00h FF00h Address out of range Failed to execute request Remote station failure Remote station DP-V1 failure Length out of range (>240 bytes) Slave does not support DP-V1 Slave not active or not present in configuration Function_Number "Extended Fault Information" Contents Refer to Return Codes (page 208).
Command not possible in "Class 2- Only" mode Module offline (not initialized or no valid database) -
Error Decode, Error Code 1, and Error Code 2 If "Fault Information" contains error code 1000h, more information according to the DP-V1 specification can be found here.
4.7
Acyclic Mailbox Message Error Codes 4.7.1 Acyclic Message Status Word
This register contains bit and code information about the mailbox message. The register is divided into five areas according to the following illustration:
b15 b14 b13 b12 b11 b10 b9 b8 b7 ER R Description This bit indicates if the received command contained any errors. This bit specifies whether the message is a command or a response. Contents 0: 1: 0: 1: Message OK Error (See also "Error Code" below) Response Message Command Message Invalid Message ID Invalid Message Type Invalid Command Invalid Data Size Message header malformed (offset 008h) Message header malformed (offset 00Ah) Message header malformed (offset 00Ch to 00Dh) Invalid Response Flash Config Error Invalid Other b6 C/ R b 5 b4 b 3 b2 b1 b0
Message Type
(reserved)
Error Code
C/R
Error Code
If the ERR bit is set, this field 0h: contains additional information 1h: about the error. 2h: 3h: 4h: 5h: 6h: 8h: 9h: Fh: This field specifies the type of the message.
(All other values are reserved) Message Type 1h: Application Message 2h: PROFIBUS Specific Message 3h: Memory Message 5h: Reset Message (All other values are reserved)
Refer to Error Codes (page 208) for an explanation of other error codes. The 8 bytes (4 words) represent the extended words 5 to 8 in response messages.
4.8
PROFIBUS comDTM
DTM (Device Type Manager) is a standard way to provide all necessary data and functionality for a communication device, for example a PROFIBUS DP card. This technology is similar to the way Microsoft Windows supports printer drivers supplied by manufacturers and available to any Windows application, rather than requiring a custom printer driver for each specific application. PROFIBUS comDTM, distributed by ProSoft Technology, is a DTM for PTQ and MVI series PDPMV1 modules and ProLinx PDPMV1 gateways. Configuration is available through Ethernet for the PTQ and ProLinx series PDPMV1, and through RS-232 serial for the MVI series PDPMV1 modules. Ethernet configuration is also available through the CIPConnect feature for the MVI56-PDPMV1 modules (see Note), with the addition of the 1756-ENBT module installed in the same ControlLogix rack. PROFIBUS comDTM allows configuration tools, instruments, and communication devices on a field network to recognize and use the module's capabilities. Communication Channels Supported
Serial Product MVI56-PDPMV1 MVI69-PDPMV1 PTQ-PDPMV1 ProLinx PDPMV1 Local RS-232 Port Supported Supported Supported Supported Ethernet Local Ethernet Port 1756 ENBT Supported (see note)
Note: MVI56-PDPMV1 requires firmware version 1.28.000 or later to support CIPConnect ENABLED PC programs (1756-ENBT support). The 1756-ENBT card must be located in the same rack as the MVI56-PDPMV1 (bridging through different racks is not supported). This functionality requires comDTM version 1.0.1.5 with install version 1.01.0003. For information on how to check the comDTM version and install version, refer to Verifying the comDTM Version and comDTM Install Version (page 224).
What is FDT? FDT (Field Device Tool) is the specification for software interfaces for the integration of field devices, drives, and controls in engineering and configuration tools. FDT is manufacturer-independent and allows for trouble-free parameterization and configuration of the user's specific processing system. FDT technology standardizes the communication interface between field devices and systems. The key feature is its independence from the communication protocol and the software environment of either the device or the host system. FDT allows any device to be accessed from any host through any protocol. The FDT container implements the FDT specification. It serves as an interface between FDT and a superior application. It uses the DTMs to gain access to the devices. FDT frame application is an engineering or configuration tool which has an FDT container. FDT technology comprises three key components: the Frame Application, Device DTMs, and Communication DTMs. The DTM (Device Type Manager) is used for the configuration and maintenance of field devices, drives and so on. It is only functional with an FDT container. The FDT container implements the FDT specification. It serves as interface between FDT and a superior application. It uses the DTMs to gain access to devices. FDT frame application is an engineering or configuration tool that has an FDT container. The user interface of the DTMs is displayed here. To better understand the functionality of these components, consider the analogy of the Internet - a standard web browser allows users to view countless web pages created by many content providers. The host system supplier typically creates the Frame Application, just as Microsoft supplies the Internet Explorer web browser. Just as a web browser opens a web page that contains code from the company that makes the web page, an FDT frame opens the Device DTM, which is the plug-in software from the device vendor.
Similar to a web browser, the Frame Application has menu bars, toolbars, and a navigation tree. Visually, the frame application surrounds the device vendors DTM. Like opening a web page from a favorites' navigation tree, a user can navigate down a tree that lists the field device tags, click on one, and open the device vendors DTM inside the frame. And, like web pages that let users interact with a reservation system or a shopping service, the Device DTMs let the user interact with the field device in a wide variety of ways. The Device DTM vendor can create a graphically rich user interface that does virtually anything possible in an advanced Windows PC-type interface. The third part of the technology, the Communication DTM, provides a standardized communication Application Process Interface (API) inside the PC, interfacing between the Device Vendors DTM and the host systems specific driver that handles pass-through communications from the PC down to the fieldbus interface card. The host system vendor supplies a Communication DTM (comDTM) for each supported fieldbus protocol. This ensures that the details of the PC, network, interface cards, and pass-through protocols of the host system, are transparent to the device vendors DTM. This correlates back to the internet analogy where: the web page is transparent to the PC its running in, the brand of the network interface card in the PC, or whether communication is DSL or broadband cable. FDT technology complements and expands existing device description languages. It does not replace but rather builds upon existing DDs. In particular, FDT expands the capabilities of DD for complex devices. Device Description languages have limitations in the graphical representation of the device at the user interface and allow only a limited integration of special features. FDT/DTM removes these limitations. Typical frame applications are Pactware from The PACTware Consortium e.V (freeware) FieldCare from Endress & Hauser Field Control from ABB
What is DTM? DTM (Device Type Manager) is a standard way to provide all necessary data and functionality for a communication device, for example a PROFIBUS DP card. This technology is similar to the way Microsoft Windows supports printer drivers supplied by manufacturers and available to any Windows application, rather than requiring a custom printer driver for each specific application.
PROFIBUS comDTM, distributed by ProSoft Technology, is a DTM for PTQ and MVI series PDPMV1 modules and ProLinx PDPMV1 gateways. It allows configuration tools, instruments and communication devices on a field network to recognize and use the modules capabilities.
What is PROFIBUS? PROFIBUS (Process Field Bus) is a widely-used, open-standards protocol created by a consortium of European factory automation suppliers in 1989. PROFIBUS is a Master/slave protocol. The Master establishes a connection to the remote slave. When the connection is established, the Master sends the PROFIBUS commands to the slave. PROFIBUS supports a variety of network types. The network type supported by the PTQ and MVI series PROFIBUS modules is PROFIBUS DP (Device Bus) version 1.0, which is designed for remote I/O systems, motor control centers, and variable speed drives.
Hardware Requirements (Recommended) Pentium 4 processor rated for at least 2 GHz 450 MB hard drive space for DTM Libraries Video card capable of 1024 X 768 resolution at 64k colors Ethernet Network Interface Card (NIC) One of the following ProSoft Technology PROFIBUS DPV1 Master modules: o ProLinx PDPMV1 Ethernet only, serial port not supported o PTQ-PDPMV1 Ethernet only, serial port not supported o MVI series PDPMV1 RS232 serial o MVI56-PDPMV1 (with 1756-ENBT for Ethernet support) Note for PTQ Users: The Ethernet connection implements UDP protocol, which dynamically allocates a random UDP port for every connection. This implementation limits the possibility of using most serial to Ethernet converters to access the PDPMV1 serial port through an Ethernet connection. Several Ethernet to serial converters require the configuration of a fixed UDP port, which is not available for the current implementation.
Software Requirements (Minimum) Windows NT 4.0 Service Pack 6A, Windows 2000 SP3 or Windows XP Professional SP2, or better Microsoft Internet Explorer Version 6.0, or better FDT 1.2.1 compliant FDT frame application. Compatible applications include: o PACTware o FieldCare o M&M fdtCONTAINER Some FDT Containers require the following components: Microsoft Management Console Adobe Acrobat Reader 5.0, or better
4.8.4 Installation
Important: You must have Administrator rights on your computer to install this application. Important: Please open and read the Readme file before starting the installation. The Readme file is located in Utilities > comDTM > Readme on the ProSoft Solutions Product CD-ROM.
To install comDTM
1 2 3 4 5 6
Insert the ProSoft Solutions Product CD-ROM in an available CD-ROM drive in your computer. Wait for the startup screen to appear. On the startup screen, click PRODUCT DOCUMENTATION. This action opens a Windows Explorer file tree window. Double-click to open the UTILITIES folder, then navigate to COMDTM > COMDTM INSTALL. Double-click the SETUP.EXE file. This action starts the installation wizard. Follow the instructions on the installation wizard to install the program. Click FINISH to complete the installation. If you are prompted to restart your computer, save your work in any applications that are running, close the applications, and allow the computer to restart.
Note: During installation, you will be prompted to accept or change the location for the database folder. The default location for this folder is the Program Files directory on your local hard drive (normally Drive C:). If you intend to allow multiple workstations to access the same database folder, you should choose a network drive that other workstations can access.
Starting FDT 1 Start the FDT program and login as administrator. The following procedures use PACTware 3.0 software. 2 Click the UPDATE DEVICE CATALOG button. If PROFIBUS comDTM was installed successfully, it will appear in the Device Catalog window.
3 4
Select the PROSOFT TECHNOLOGY COMDTM entry in the device catalog, and then click ADD. Repeat steps 1 through 3 to add any other manufacturers device DTMs installed on your computer. Select the correct address for each device, and then click OK to proceed.
Note: You must use the same PROFIBUS device address that you used when setting up the device.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Connecting the comDTM to the Master to Establish Communication
Note: The features described in this section require the current version of PROFIBUS comDTM. You can always download the newest version from www.prosoft-technology.com. 1 2 From the Windows START button, navigate to PROGRAMS > PROSOFT TECHNOLOGY, and then choose PROSOFT TRANSPORT PATH EDITOR. If you have not created a communication path, click the ADD button. If you have already created a path, skip this procedure and go to step 5.
For PTQ-PDPMV1 and ProLinx-PDPMV1 users: Select the ETHERNET tab, and enter the IP Address of the module or gateway. Enter a descriptive path name.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master For MVI-PDPMV1 users: Select the SERIAL tab and enter the COM port number on your PC connected to the module. Enter a descriptive path name.
For MVI56-PDPMV1 users with CIPconnect: Select the CIPCONNECT tab, and then click the ADD button.
Click the CIPCONNECT PATH EDIT button to define the path for this application. The CIPconnect Path Editor allows the configuration of the path between your PC and the MVI56-PDPMV1. The CIPconnect feature allows the comDTM to access the MVI56-PDPMV1 module through a 1756-ENBT communication card using an Ethernet path.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master For the following example, the PC will be connected through Ethernet to a 1756-ENBT communication card (IP=192.168.0.100) and the MVI56PDPMV1 card is located in slot 3 of the same rack.
The CIPConnect feature also supports applications where the MVI56PDPMV1 module is not located in the same rack as the 1756-ENBT communication card connected to your PC. The CIPconnect can route the access through Ethernet/IP or ControlNet networks. For further information on this topic please refer to Using the CIPConnect Path Editor (in applicable manuals). Note: CIPConnect is available for MVI56-PDPMV1 firmware version 1.28.000 (or later). This functionality requires comDTM version 1.0.1.5 with install version 1.01.0003 (or later). The access for remote rack applications is supported for comDTM version 1.0.1.5 with install version 1.02.0001 (or later). For information on how to check the comDTM version and install version, refer to Verifying the comDTM Version and comDTM Install Version (page 224).
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master When you have configured the communication path, click the OK button to confirm. The communication path will be displayed at the top grid panel as shown in the following illustration.
Select the path and click the OK button to exit the Transport Path Editor window.
Select the COMDTM icon and click the right mouse button to open a shortcut menu. On the shortcut menu, choose CONNECT. If the connection is successful, the icon will be highlighted, as shown in the following illustration:
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master When the comDTM is connected with the Master, PACTware indicates the connection Master by displaying a green plug in the status bar.
This completes the installation and Quick Start Guide for the ProSoft Technology PROFIBUS comDTM. Refer to the online help and documentation additional information on each DTM component you have installed and configured. The comDTM provides a Guided Tour section in the online help that explains the basic features and operation of the program. To open the online help, click the right mouse button on PROSOFT TECHNOLOGY COMDTM, and choose ADDITIONAL FUNCTIONS > ONLINE HELP from the shortcut menu.
Click the GUIDED TOUR icon. Use the navigation buttons on each help page to view the help topics.
Refer to the documentation and online help for your FDT frame program for specific FDT frame instructions.
Checking the comDTM Version Refer to the Version column indicated when you add the comDTM to the DTM Container project.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Checking the comDTM Install Version 1 Click the START menu and then choose CONTROL PANEL.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Select PROSOFT TECHNOLOGY COM-DTM, and then click on the link CLICK HERE FOR SUPPORT INFORMATION.
You will see the comDTM Install Version in the Version field, as shown in the following illustration (1.01.0003 for this example).
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Checking the Install Version for Vista 1 Select CONTROL PANEL.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master Select Prosoft Technology COM-DTM (click once)
Click the ORGANIZE tab and select LAYOUT > DETAILS PANE.
5204SE-MNET-PDPMV1 ProLinx Gateway DP-V1 Pass-Through Master 5 Check the Install Version at the bottom right portion of the window.
Conclusion
In This Chapter
ProSoft Technology Support ............................................................... 231 How to Get Help .................................................................................. 232
5.1
5.2
Latin America Tel: +52-222-3-99-6565, (location in Puebla, Mexico) E-mail: soporte@prosoft-technology.com Languages spoken include: Spanish Brasil (location in Sao Paulo) Tel: +55-11-5083-3776, E-mail: brasil@prosoft-technology.com Languages spoken include: Portuguese, English
6.1
6.2
LIMITED WARRANTY
This Limited Warranty ("Warranty") governs all sales of hardware, software, and other products (collectively, "Product") manufactured and/or offered for sale by ProSoft Technology, Incorporated (ProSoft), and all related services provided by ProSoft, including maintenance, repair, warranty exchange, and service programs (collectively, "Services"). By purchasing or using the Product or Services, the individual or entity purchasing or using the Product or Services ("Customer") agrees to all of the terms and provisions (collectively, the "Terms") of this Limited Warranty. All sales of software or other intellectual property are, in addition, subject to any license agreement accompanying such software or other intellectual property.
Index
A
Acyclic Mailbox Message DFBs - M340 116 Acyclic Message Status Word 119, 121, 123, 129, 153, 163, 165, 168, 175, 186, 187, 188, 190, 191, 196, 199, 203, 205, 207 Acyclic Messaging DFBs - Quantum 159 Allocation of Risks 240 Architecture 12
B
Backing Up the Project 44 Basics of Working with Unity Pro 97 Building the M340 Project 71 Building the Quantum Project 90
C
Changing a Password 55 Checking the comDTM Install Version 225 Checking the comDTM Version 224 Checking the Install Version for Vista 227 Command Error Codes 210 Conclusion 231 Configuring Ethernet Settings 26, 42 Configuring Gateway Parameters 25 Configuring the Gateway 26, 63, 82 Configuring the Memory Size for the M340 Processor 63 Configuring the Memory Size for the Quantum Processor 82 Configuring the MNET Client (Optional) 26, 42 Configuring the MNET Server Settings (Optional) 26, 41 Configuring the Modicon M340 Processor with Unity Pro 59 Configuring the Modicon Quantum Processor with Unity Pro 76 Configuring the PROFIBUS DP Master 26, 28 Configuring the PROFIBUS DP Network 26 Configuring the PROFIBUS Slaves 29, 34 Connecting the comDTM to the Master to Establish Communication 219 Contacting Technical Support 233, 235 Controlling Law and Severability 241 Creating a New M340 Project 59 Creating a New Quantum Project 76 Creating a Password 53 Cyclic I/O Variables, DDTs and DFBs - M340 104 Cyclic I/O Variables, DDTs and DFBs - Quantum 144 Cyclic Polling and Acyclic Messaging Control Logic 17
Data Flow Through the Gateway 13 DFB Acyclic Mailbox Message Get Database Information - M340 104, 130 Get Database Information - Quantum 143, 176 Get Live List - M340 103, 118 Get Live List - Quantum 142, 162 Get Slave Configuration - M340 103, 122 Get Slave Configuration - Quantum 142, 167 Get Slave Diagnostics - M340 103, 120 Get Slave Diagnostics - Quantum 142, 164 Read Class 1 Acyclic Data - M340 103, 132 Read Class 1 Acyclic Data - Quantum 142, 178 Set Address - M340 103, 128 Set Address - Quantum 142, 174 Set Operating Mode - M340 104, 116 Set Operating Mode - Quantum 143, 160 Set Slave Mode - M340 104, 126 Set Slave Mode - Quantum 143, 171 Start/Stop Slave - M340 104, 124 Start/Stop Slave - Quantum 143, 169 Write Class 1 Acyclic Data - M340 103, 134 Write Class 1 Acyclic Data - Quantum 142, 181 DFB Get Module Status - M340 38, 102, 111 DFB Get Module Status - Quantum 141, 152 DFB Get PROFIBUS Standard Slave Diagnostics M340 102, 113 DFB Get PROFIBUS Standard Slave Diagnostics Quantum 141, 156 DFB Read Cyclic Data - M340 102, 104 DFB ReadCycData - Quantum 141, 144 DFB Write Cyclic Data - M340 102, 108 DFB Write Cyclic Data - Quantum 141, 148 Disclaimer of all Other Warranties 239 Disclaimer Regarding High Risk Activities 238 Downloading the Project to the M340 Processor 93 Downloading the Project to the Module 26, 46 Downloading the Project to the Quantum Processor 74 DP-V1 Error Codes 209
E
Error Codes 200, 208, 210 Exporting the Unity Pro v 4.0 Logic Support Files from PCB 50, 66, 68, 70, 85, 87, 89
F
Functional Overview 11
G
General Overview 11 Get (Extended) Slave Diagnostics Message Structure 121, 166, 188 Get Database Information Message Structure 201 Get Live List Message Structure 186 Get Slave Configuration Message Structure 123, 168, 190
I
Important Installation Instructions 3 Importing the M340 Functional Module (.XFM File) 66 Importing the M340 Variables (.XSY file) 70 Importing the Quantum Functional Module (.XFM File) 85 Importing the Quantum Variables (.XSY file) 89 Input Byte Swap 37 Input Data Size 36 Installation 216 Installing ProSoft Configuration Builder Software 22 Installing the GSD Files 26, 29 Intellectual Property Indemnity 239 Introduction 224 Introduction to PROFIBUS comDTM 212
L
Learning Objectives 9 Limitation of Remedies ** 240 LIMITED WARRANTY 235, 237
M
M340 Modbus Variables and Derived Data Types (DDTs) 100, 105, 108, 111, 113, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135 Mailbox Messaging 38 Mailbox Messaging Error Codes 189, 191, 207 Markings 4 MNETDPV1_BASICVAR Variables and DDTs - M340 102 MNETDPV1_BASICVAR Variables and DDTs Quantum 141 MNETDPV1_BASICVAR_ModuleStatus Variables M340 111 MNETDPV1_BASICVAR_ModuleStatus Variables Quantum 152 MNETDPV1_BASICVAR_PB_SLVDiagnostics Variables - M340 113 MNETDPV1_BASICVAR_PB_SLVDiagnostics Variables - Quantum 156 MNETDPV1_BASICVAR_ReadCyclicData Variables M340 104 MNETDPV1_BASICVAR_ReadCyclicData Variables Quantum 144 MNETDPV1_BASICVAR_WriteCyclicData Variables M340 108 MNETDPV1_BASICVAR_WriteCyclicData Variables Quantum 148 MNETDPV1_DataIn Variables - M340 107 MNETDPV1_DataIn Variables - Quantum 147 MNETDPV1_DataOut Variable - M340 110 MNETDPV1_DataOut Variable - Quantum 151 MNETDPV1_Inputs Variable - M340 106
O
Output Byte Swap 37 Output Data Size 37
P
Password Protecting the Configuration 52 Pinouts 3 PLC Control Buffer Start 40 PLC Input Register Start 36 PLC Output Register Start 36 PLC Status Register Start 38 Prerequisites 9 Printing a Configuration File 25 Printing the Unity Passthru Memory Map 26, 33, 36, 42 Procedures 21 PROFIBUS Acyclic Telegram (Message) Block Structures 184 PROFIBUS comDTM 211 PROFIBUS DP Pass-Through Data Flow 15 Profibus Master DPV1 26, 35, 63, 82 ProLinx Reference Guide 21 ProLinx Products Warnings 3 ProSoft Technology Product Availability 211 ProSoft Technology Support 54, 231 ProSoft Technology Product Documentation 2
T
Time Limit for Bringing Suit 240
U
Unity Pro Program Objects and Organizing Structures 99 Using ProSoft Configuration Builder 23 Using the Online Help 22
V
Verifying Communication Between the M340 Processor and the Gateway 74 Verifying Communication Between the Quantum Processor and the Gateway 94 Verifying the comDTM Version and comDTM Install Version 211, 221, 224
Q
Quantum Communication Control and Data Buffer Variables and Derived Data Types (DDTs) 136, 145, 149, 153, 156, 161, 163, 165, 168, 170, 173, 175, 177, 179, 182 Quantum MBP_MSTR TCP/IP Ethernet Error Codes 138 Quick Start 217
W
Watchdog Register 39 Watchdog Reset Value 39 Watchdog Timeout 39 What Is Covered By This Warranty 237, 239 What is DTM? 213 What is FDT? 212 What Is Not Covered By This Warranty 238 What is PROFIBUS? 214 Why Use PROFIBUS comDTM? 212 Write Class 1 Acyclic Data Message Structure 135, 182, 183, 205
R
Read Class 1 Acyclic Data Message Structure 133, 180, 203 Reference 97 Removing Password Protection 57 Renaming PCB Objects 25 Return Codes 119, 121, 123, 129, 153, 163, 165, 168, 175, 185, 189, 191, 200, 202, 204, 206, 208 Return Material Authorization (RMA) Policies and Conditions 235 Returning Any Product 235 Returning Units Out of Warranty 236 Returning Units Under Warranty 236
Y
Your Feedback Please 2
S
Sample Control and Sequencing Logic for Cyclic Data Polling - M340 17, 114