ProSoft Technology MVI56-MCM User Manual

MVI56-MCM
ControlLogix Platform
Modbus Communication Module
User Manual
July 24, 2008
Successful application of this module requires a reasonable working knowledge of the Rockwell Automation ControlLogix hardware, the MVI56-MCM Module and the application in which the combination is to be used. For this reason, it is important that those responsible for implementation satisfy themselves that the combination will meet the needs of the application without exposing personnel or equipment to unsafe or inappropriate working conditions.
This manual is provided to assist the user. Every attempt has been made to ensure that the information provided is accurate and a true reflection of the product's installation requirements. In order to ensure a complete understanding of the operation of the product, the user should read all applicable Rockwell Automation documentation on the operation of the Rockwell Automation hardware.
Under no conditions will ProSoft Technology be responsible or liable for indirect or consequential damages resulting from the use or application of the product.
Reproduction of the contents of this manual, in whole or in part, without written permission from ProSoft Technology is prohibited.
Information in this manual is subject to change without notice and does not represent a commitment on the part of ProSoft Technology Improvements and/or changes in this manual or the product may be made at any time. These changes will be made periodically to correct technical inaccuracies or typographical errors.
Warnings
UL Warnings
A Warning - Explosion Hazard - Substitution of components may impair suitability for
Class I, Division 2.
B Warning - Explosion Hazard - When in Hazardous Locations, turn off power before
replacing or rewiring modules. Warning - Explosion Hazard - Do not disconnect equipment unless power has been switched off or the area is known to be nonhazardous.
C Suitable for use in Class I, division 2 Groups A, B, C and D Hazardous Locations or
Non-Hazardous Locations.
ATEX Warnings and Conditions of Safe Usage:
Power, Input, and Output (I/O) wiring must be in accordance with the authority having jurisdiction
A Warning - Explosion Hazard - When in hazardous locations, turn off power before
replacing or wiring modules.
B Warning - Explosion Hazard - Do not disconnect equipment unless power has been
switched off or the area is known to be non-hazardous.
C These products are intended to be mounted in an IP54 enclosure. The devices shall
provide external means to prevent the rated voltage being exceeded by transient disturbances of more than 40%. This device must be used only with ATEX certified backplanes.
D DO NOT OPEN WHEN ENERGIZED.
Electrical Ratings
Backplane Current Load: 800 mA @ 5 V DC; 3mA @ 24V DC Operating Temperature: 0 to 60°C (32 to 140°F) Storage Temperature: -40 to 85°C (-40 to 185°F) Shock: 30g Operational; 50g non-operational; Vibration: 5 g from 10 to 150 Hz Relative Humidity 5% to 95% (non-condensing) All phase conductor sizes must be at least 1.3 mm(squared) and all earth ground
conductors must be at least 4mm(squared).
Markings:
II 3 G 0C <=Ta<= 60C EEx nA IIC T4 DEMKO 07ATEX0710717X
Battery Life Advisory
All modules in the MVI series use a rechargeable Lithium Vanadium Pentoxide battery to backup the 512K SRAM memory, real-time clock, and CMOS. The battery should last for the life of the module.
The module must be powered for approximately twenty hours before it becomes fully charged. After it is fully charged, the battery provides backup power for the CMOS setup and configuration data, the real-time clock, and the 512K SRAM memory for approximately 21 days.
Before you remove a module from its power source, ensure that the battery within the module is fully charged. A fully charged battery will hold the BIOS settings (after being removed from its power source) for a limited number of days. When the battery is fully discharged, the module will revert to the default BIOS settings.
Note: The battery is not user replaceable.
ProSoft® Product Documentation
In an effort to conserve paper, ProSoft Technology no longer includes printed manuals with our product shipments. User Manuals, Datasheets, Sample Ladder Files, and Configuration Files are provided on the enclosed CD and are available at no charge from our web site: http://www.prosoft-technology.com
Printed documentation is available for purchase. Contact ProSoft Technology for pricing and availability.
Asia Pacific: +603.7724.2080 Europe, Middle East, Africa: +33.5.34.36.87.20 Latin America: +1.281.298.9109 North America: +1.661.716.5100
Your Feedback Please
We always want you to feel that you made the right decision to use our products. If you have suggestions, comments, compliments or complaints about the product, documentation or support, please write or call us.
ProSoft Technology 1675 Chester Avenue, Fourth Floor Bakersfield, CA 93301 +1 (661) 716-5100 +1 (661) 716-5101 (Fax) http://www.prosoft-technology.com
Copyright © ProSoft Technology, Inc. 2000 - 2008. All Rights Reserved.
MVI56-MCM User Manual July 24, 2008 PSFT.MCM.MVI56.UM.08.07.24
ProSoft Technology ®, ProLinx ®, inRAx ®, ProTalk® and RadioLinx ® are Registered Trademarks of ProSoft Technology, Inc.
Contents MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module
Contents
PLEASE READ THIS NOTICE................................................................................................................2
Warnings............................................................................................................................................2
Battery Life Advisory.......................................................................................................................... 3
ProSoft® Product Documentation .....................................................................................................3
Your Feedback Please ...................................................................................................................... 4
1 GUIDE TO THE MVI56-MCM USER MANUAL................................................................................7
2 START HERE....................................................................................................................................9
2.1 System Requirements .......................................................................................................... 9
2.2 Deployment Checklist.........................................................................................................10
2.3 Package Contents .............................................................................................................. 11
2.4 Setting Jumpers..................................................................................................................12
2.5 Install the Module in the Rack ............................................................................................12
2.6 Connect your PC to the Processor..................................................................................... 14
3 USING THE RSLOGIX 5000 V16 ADD ON INSTRUCTION..........................................................15
3.1 Add Module to Rack Configuration.....................................................................................16
3.2 Import Add On Instruction...................................................................................................18
3.3 Download the Sample Program to the Processor .............................................................. 21
4 CONFIGURATION AS A MODBUS MASTER...............................................................................25
4.1 Overview............................................................................................................................. 25
4.2 ModDef Settings .................................................................................................................26
4.3 Master Command Samples................................................................................................ 34
4.4 Floating Point Data Handling.............................................................................................. 40
4.5 Command Control and Event Command ...........................................................................45
5 CONFIGURATION AS A MODBUS SLAVE..................................................................................49
5.1 Overview............................................................................................................................. 49
5.2 ModDef Settings .................................................................................................................50
5.3 Read and Write Same Modbus Address (Pass Thru) ........................................................54
5.4 Slave Configuration ............................................................................................................56
5.5 Further clarification for some parameters in table above. ..................................................57
5.6 Float Point Data Handling...................................................................................................57
6 VERIFY COMMUNICATIONS.........................................................................................................61
6.1 MVI56-MCM Status Data Definition as a Master................................................................61
6.2 Verify Master Communications...........................................................................................62
6.3 Verify Slave Communications.............................................................................................66
7 DIAGNOSTICS AND TROUBLESHOOTING.................................................................................67
ProSoft Technology, Inc. Page 5 of 159 July 24, 2008
Contents MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module
7.1 Reading Status Data from the Module............................................................................... 67
7.2 LED Status Indicators ........................................................................................................ 80
8 REFERENCE.................................................................................................................................. 85
8.1 Product Specifications ....................................................................................................... 85
8.2 Functional Overview........................................................................................................... 87
8.3 Cable Connections........................................................................................................... 105
8.4 MVI56-MCM Database Definition .................................................................................... 111
8.5 MVI56-MCM Configuration Data...................................................................................... 111
8.6 MVI56-MCM Status Data Definition................................................................................. 119
8.7 MVI56-MCM Command Control....................................................................................... 121
8.8 MVI56-MCM User Defined Data Types ........................................................................... 121
8.9 Modbus Protocol Specification......................................................................................... 127
8.10 Using the Sample Program - RSLogix Version 15 and earlier ........................................ 137
9 SUPPORT, SERVICE & WARRANTY......................................................................................... 149
9.1 How to Contact Us: Technical Support............................................................................ 149
9.2 Return Material Authorization (RMA) Policies and Conditions ........................................ 150
9.3 LIMITED WARRANTY ..................................................................................................... 152
INDEX.................................................................................................................................................. 157
Page 6 of 159 ProSoft Technology, Inc. July 24, 2008
Guide to the MVI56-MCM User Manual MVI56-MCM ControlLogix Platform Modbus Communication Module

1 Guide to the MVI56-MCM User Manual

Function Section to Read Details
Introduction (Must Do)
Verify Communication, Diagnostic and Troubleshooting
Reference Product Specifications Functional Overview Glossary
Support, Service, and Warranty
Index
Start Here (page 9)
Verifying Communication (page 61)
Diagnostics and Troubleshooting (page 67)
Reference (page 85) Functional Overview
(page 87, page 137) Product
Specifications (page
85)
Support, Service and Warranty (page
149)
This Section introduces the customer to the module. Included are: package contents, system requirements, hardware installation, and basic configuration.
This section describes how to verify communications with the network. Diagnostic and Troubleshooting procedures.
These sections contain general references associated with this product, Specifications, and the Functional Overview.
This section contains Support, Service and Warranty information.
Index of chapters.
ProSoft Technology, Inc. Page 7 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Guide to the MVI56-MCM User Manual Modbus Communication Module
Page 8 of 159 ProSoft Technology, Inc.
July 24, 2008

Start Here MVI56-MCM ControlLogix Platform Modbus Communication Module

2 Start Here
In This Chapter
System Requirements .............................................................................9
Deployment Checklist............................................................................ 10
Package Contents .................................................................................11
Setting Jumpers ....................................................................................12
Install the Module in the Rack ............................................................... 12
Connect your PC to the Processor ........................................................14
Installing the MVI56-MCM module requires a reasonable working knowledge of the Rockwell Automation hardware, the MVI56-MCM Module and the application in which they will be used.
Caution: It is important that those responsible for implementati on can complete the application without exposing personnel, or equipment, to unsafe or inappropriate working conditions. Safety, quality and experience ar e key factors in a successful installation.
2.1 System Requirements
The MVI56-MCM module requires the following minimum hardware and software components:
Rockwell Automation ControlLogix™ processor, with compatible power
supply and one free slot in the rack, for the MVI56-MCM module. The module requires 800mA of available power.
Rockwell Automation RSLogix 5000 programming software version 2.51 or
higher.
Rockwell Automation RSLinx communication software Pentium® II 450 MHz minimum. Pentium III 733 MHz (or better)
recommended
Supported operating systems:
o Microsoft Windows XP Professional with Service Pack 1 or 2 o Microsoft Windows 2000 Professional with Service Pack 1, 2, or 3 o Microsoft Windows Server 2003
128 Mbytes of RAM minimum, 256 Mbytes of RAM recommended 100 Mbytes of free hard disk space (or more based on application
requirements)
256-color VGA graphics adapter, 800 x 600 minimum resolution (True Color
1024 × 768 recommended)
CD-ROM drive HyperTerminal or other terminal emulator program.
ProSoft Technology, Inc. Page 9 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Start Here Modbus Communication Module
Note: You can install the module in a local or remote rack. For remote rack installation, the modul e requires EtherNet/IP or ControlNet communication with the processor.
2.2 Deployment Checklist
Before you begin configuring the module, consider the following questions. Your answers will help you determine the scope of your project and the configuration requirements for a successful deployment.
1 ____________ Are you creating a new application or integrating the module
into an existing application? Most applications can use the Sample Ladder Logic without any edits to the
Sample Program.
2 ____________ What slot number in the chassis will the MVI56-MCM module
occupy? For communication to occur you must enter the correct slot number in the
sample program.
3 ____________ Are RSLogix 5000 and RSLinx installed?
RSLogix and RSLinx are required to communicate to the CLX processor (1756-L1, L55, L61 & L63). Sample Ladder programs are provided for many versions of RSLogix 5000.
4 ____________ How many words of data do you need to transfer in your
application (from ControlLogix to Module / to ControlLogix from Module)? The MVI module can transfer a maximum of 5000 (16-bit) registers to/from
the CLX processor. The Sample Ladder transfers 600 words to the CLX processor (into the Read Data array) and obtains 600 words from the CLX processor (from the Write Data array)
5 ____________ Will you be using the module as a Modbus Master or Modbus
Slave? Will you be transferring data using Modbus RTU or Modbus ASCII? Modbus is a master/slave network. Only one master is allowed on the Com
line (max 32 devices/RS485). The Master is responsible for polling data from the slaves on the network.
6 ____________ For a Modbus Master, what devices (node ID) and Modbus
addresses do you need to exchange data with on the Modbus network? As a Modbus master, you must know the node ID # of the slave devices you
wish to obtain data from, as well as the Modbus address (coil 0001, register 4001 etc) of the data that must be read from or written to that slave device.
7 ____________ For a Modbus Slave, how many words or bits of data do you
need to send to the master device? The MVI module can send data to a Modbus master as 0x coil data, 1x input
coil data, 3x input registers and 4x holding registers. The sample program transfers 600 (16-bit) words or 9600 bits to the CLX processor, and 600w or 18 bits from the CLX processor.
Page 10 of 159 ProSoft Technology, Inc.
July 24, 2008
Start Here MVI56-MCM ControlLogix Platform Modbus Communication Module
8 Serial Communication Parameters for the Modbus network:
____________ Baud rate? ____________ Data bits? ____________ Parity? ____________ Stop bits? Required for master and slave configurations.
9 ____________ Wiring type to be used (RS232, 422 or 485). Set by jumper
settings (page 12). Required for proper implementation of the module in master and slave
configurations.
Note: If you are installing your module into a new system and plan to use our Sample Ladder Logic, refer to the "handout" included in the module box for simple installation procedures. For version 16 or newer of RSLogix 5000, go to Usi ng the RSLogix 5000 v16 Add On Instruction (page 15). For NEW system installations, go to Sample Ladder Logic in New Application. For EXISTING system installations, go to Integrating the Sample Ladder Logic into an Existing Project (page 142).
Note: Most applications can use the Sample Lad der Logic without any edits to the sample program.
2.3 Package Contents
The following components are included with your MVI56-MCM module, and are all required for installation and configuration.
Important: Before beginning the installation, please verify that all of the following items are present.
Qty. Part Name Part Number Part Description
1
1 Cable
3 Cable
2 Adapter 1454-9F
1
MVI56-MCM Module
ProSoft Solutions CD
If any of these components are missing, please contact ProSoft Technology Support for replacement parts.
MVI56-MCM Modbus Communication Module
Cable #15, RS232 Null Modem
Cable #14, RJ45 to DB9 Male Adapter cable
For RS232 Connection to the CFG Port
For DB9 Connection to Module's Port
Two Adapters, DB9 Female to Screw Terminal. For RS422 or RS485 Connections to Port 1 and 2 of the Module
Contains sample programs, utilities and documentation for the MVI56-MCM module.
ProSoft Technology, Inc. Page 11 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Start Here Modbus Communication Module
2.4 Setting Jumpers
If you use an interface other than RS-232 (default), you must change the jumper configuration to match the interface. There are three jumpers located at the bottom of the module.
The following illustration shows the MVI56-MCM jumper configuration:
1 Set the PRT 2 (for application port 1) and PRT 3 (for application port 2)
jumpers for RS232, RS422 or RS485 to match the wiring needed for your application. The default jumper setting for both application ports is RS-232.
2 The Setup Jumper acts as "write protection" for the module's flash memory.
In "write protected" mode, the Setup pins are not connected, and the module's firmware cannot be overwritten. Do not jumper the Setup pins together unless you are directed to do so by ProSoft Technical Support.

2.5 Install the Module in the Rack

If you have not already installed and configured your ControlLogix processor and power supply, please do so before installing the MVI56-MCM module. Refer to your Rockwell Automation product documentation for installation instructions.
Warning: You must follow all safety instructions when installing this or any other electronic devices. Failure to follow safety procedures could result in damage to hardware or data, or even serious injury or death to personnel. Refer to the documentation for each device you plan to connect to verify that suitable safety procedures ar e in place before installing or servicing the device.
Page 12 of 159 ProSoft Technology, Inc.
July 24, 2008
Start Here MVI56-MCM ControlLogix Platform Modbus Communication Module
After you have checked the placement of the jumpers, insert MVI56-MCM into the ControlLogix chassis. Use the same technique recommended by Rockwell Automation to remove and install ControlLogix modules.
Warning: When you insert or remove the module while backplane power is on, an electrical arc can occur. This could cause an explosion in hazardous location installations. Verify that power is removed or the area is non-hazardous before proceeding. Repeated electrical arcing causes excessive wear to contacts on both the module and its mating connector. Worn contacts may create electrical resistance that can affect module operation.
1 Turn power OFF. 2 Align the module with the top and bottom guides, and slide it into the rack
until the module is firmly against the backplane connector.
3 With a firm but steady push, snap the module into place. 4 Check that the holding clips on the top and bottom of the module are securely
in the locking holes of the rack.
5 Make a note of the slot location. You will need to identify the slot in which the
module is installed in order for the sample program to work correctly. Slot numbers are identified on the green circuit board (backplane) of the ControlLogix rack.
6 Turn power ON.
ProSoft Technology, Inc. Page 13 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Start Here Modbus Communication Module
Note: If you insert the module improperly, the system may stop working, or may behave unpredictably. Note: If you are installing MVI56-MCM with other modul es connected to the PCI bus, the peripheral modules will not have holding clips. Make sure all of the modules are ali gned with their respective slots before you snap them into place.

2.6 Connect your PC to the Processor

1 Connect the right-angle connector end of the cable to your controller at the
communications port.
2 Connect the straight connector end of the cable to the serial port on your
computer.
Page 14 of 159 ProSoft Technology, Inc.
July 24, 2008

Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ControlLogix Platform Modbus Communication Module

3 Using the RSLogix 5000 v16 Add On
Instruction
In This Chapter
Add Module to Rack Configuration ........................................................16
Import Add On Instruction...................................................................... 18
Download the Sample Program to the Processor..................................21
Important: If you are using an older version of RSLogix 5000 (version 15 or older), please refer to Sample Ladder Logic in New Application or Integrating the Sample Ladder Logic into an Existing Project (page 142).
If you have RSLogix 5000 version 16 or newer, you can use an Add On Instruction to simplify the task of configuring the module, either as a new application, or within an existing application.
The ProSoft Solutions CD-ROM included in the package with the module contains ladder logic, product manuals and utility programs for all ProSoft Technology products.

Copy the manuals and sample program from the CD-ROM

1 Insert the ProSoft Solutions CD-ROM into the CD drive of your PC. Wait for
the startup screen to appear.
2 On the startup screen, click Product Documentation. This action opens an
Explorer window. Files are arranged by type:
o The Ladder Logic folder contains sample programs for each module,
arranged by processor type, and then by product name. The sample programs for your module are in the ControlLogix/MVI56/MVI56-MCM folder.
o The Manuals folder contains product manuals and datasheets in Adobe
Acrobat Reader format (PDF) for each module, arranged in the same way as the Ladder Logic folder.
o The Utilities folder contains additional programs and tools required for
some ProSoft modules. Refer to your user manual to determine if you need to use or install any of these additional tools.
3 In the Explorer window, navigate to the files you need, and then copy them to
a location on your hard drive.
Download the manuals and sample program from the ProSoft Technology web site
You can always download the latest version of the sample ladder logic and user manuals for the MVI56-MCM module from the ProSoft Technology web site, at http://www.prosoft-technology.com/support/downloads
ProSoft Technology, Inc. Page 15 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Using the RSLogix 5000 v16 Add On Instruction Modbus Communication Module
From that link, navigate to the download page for your module and choose the sample ladder program to download for your version of RSLogix 5000 and your processor.

3.1 Add Module to Rack Configuration

As with any project, the first step is to define the module in the I/O configuration of your project. This is done within the Controller Tree, as shown here:
1 Select the "1756 Backplane" object and select this object. Right mouse click
on this object, and select the "New Module…" option, as shown below.
This action opens the Select Module dialog box.
Page 16 of 159 ProSoft Technology, Inc.
July 24, 2008
Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ControlLogix Platform Modbus Communication Module
2 Select "1756-MODULE" option and then click the
opens the New Module dialog box.
3 Set the parameters to match the illustration above. Make sure that "Comm
Format Data -INT" is selected. Set the Slot parameter to the slot number used in your project.
4 Click
to open the Module Properties dialog box.
button. This action
An RPI time of the default 5.0 ms will work well for the MVI56-MCM module in a local I/O rack. If the module is being used in a remote rack over Control Net (for Redundancy systems for example) then this RPI time must be raised to values between 20 and 100 ms in most applications. Also ProSoft has a module that is specifically designed for this application, the MVI56-MCMR module. Contact Technical Support for more information about this module and other options.
5 When you have finished setting the RPI times, click the
save the module configuration and dismiss the dialog box.
ProSoft Technology, Inc. Page 17 of 159 July 24, 2008
button to
MVI56-MCM ControlLogix Platform Using the RSLogix 5000 v16 Add On Instruction Modbus Communication Module
The module is now defined in the I/O configuration. You should now be able to see the module in the I/O tab of the Controller Tree, as shown in the following illustration:

3.2 Import Add On Instruction

1 Open your application in RSLogix 5000. 2 Expand the Tasks folder, and then expand the Main Task folder. 3 On the Main Program folder, click the right mouse button to open a shortcut
menu. On the shortcut menu, choose New Routine.
4 In the New Routine dialog box, enter the name and description of your
routine, and then click OK.
5 Select an empty rung in the new routine, and then click the right mouse
button to open a shortcut menu. On the shortcut menu, choose "Import Rung…".
Page 18 of 159 ProSoft Technology, Inc.
July 24, 2008
Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ControlLogix Platform Modbus Communication Module
6 Select the MVI56MCM_AddOnRung.L5X file
7 The following window will be displayed showing the controller tags to be
created during the import procedure:
8 Click OK to confirm the import. RSLogix will indicate that the import is under
progress:
ProSoft Technology, Inc. Page 19 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Using the RSLogix 5000 v16 Add On Instruction Modbus Communication Module
When the import is completed, the new rung with the Add-On instruction will be visible as shown in the following illustration.
The procedure has also imported new user defined data types, data objects and the Add-On instruction to be used in your project.
Page 20 of 159 ProSoft Technology, Inc.
July 24, 2008
Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ControlLogix Platform Modbus Communication Module

3.3 Download the Sample Program to the Processor

Note: The key switch on the front of the ControlLogix module must be in the REM position.
To download the sample program from RSLogix 5000 to the ControlLogix processor
1 If you are not already online to the processor, open the Communications
menu, and then choose Download. RSLogix will establish communication with the processor.
2 When communication is established, RSLogix will open a confirmation dialog
box. Click the Download button to transfer the sample program to the processor.
3 RSLogix will compile the program and transfer it to the processor. This
process may take a few minutes.
4 When the download is complete, RSLogix will open another confirmation
dialog box. Click OK to switch the processor from Program mode to Run mode.
Note: If you receive an error message during these steps, refer to your RSLogix documentation to interpret and correct the error.
ProSoft Technology, Inc. Page 21 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Using the RSLogix 5000 v16 Add On Instruction Modbus Communication Module
3.3.1 Configuring RSLinx
If RSLogix is unable to establish communication with the processor, follow these steps:
1 Open RSLinx. 2 Open the Communications menu, and choose Configure Drivers.
This action opens the Configure Drivers dialog box.
Note: If the list of configured drivers is blank, you must first choose and configure a driver from the Available Driver Types list. The recommended driv er type to choose for serial communicatio n with the processor is "RS-232 DF1 Devices".
Page 22 of 159 ProSoft Technology, Inc.
July 24, 2008
Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ControlLogix Platform Modbus Communication Module
3 Click to select the driver, and then click Configure. This action opens the
Configure Allen-Bradley DF1 Communications Device dialog box.
4 Click the Auto-Configure button. RSLinx will attempt to configure your serial
port to work with the selected driver.
5 When you see the message "Auto Configuration Successful", click the OK
button to dismiss the dialog box.
Note: If the auto-configuration procedure fails, verify that the cables are connected correc tly between the processor and the serial port on your computer, and then try again. If you ar e still unable to auto-configure the port, refer to yo ur RSLinx documentation for further troubleshooti ng steps.
ProSoft Technology, Inc. Page 23 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Using the RSLogix 5000 v16 Add On Instruction Modbus Communication Module
Page 24 of 159 ProSoft Technology, Inc.
July 24, 2008
Configuration as a Modbus Master MVI56-MCM ControlLogix Platform Modbus Communication Module

4 Configuration as a Modbus Master

In This Chapter
Overview ...............................................................................................25
ModDef Settings.................................................................................... 26
Master Command Samples ................................................................... 34
Floating Point Data Handling................................................................. 40
Command Control and Event Command...............................................45
4.1 Overview
This section describes the configuration of the module as a Modbus Master device. With Modbus communication, the master is the only device on the line that will initiate communications. A master device will issue a request message, and then wait for the slave to respond. When the slave responds, or a timeout has occurred, the module (as a master) will then move on to the next command in the list.
Configuration of the module as a master must be done in the following three locations:
1 ModDef: configures which of the 5000 data registers of the module will be
sent to the ControlLogix Processor (data placed in the ReadData tags) and which of those same 5000 registers will be obtained from the ControlLogix Processor (data obtained from the WriteData tags).
2 PortX: configures the port. Parameters such as baud rate, data bits, and stop
bits are setup here.
3 PortXMasterCommand: you are building a polling table for the module as a
master. Here you tell the module what devices are connected on the Modbus network, what data to read/write with those devices, and where that data is obtained/stored within the modules 5000 register memory.
ProSoft Technology, Inc. Page 25 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module
4.2 ModDef Settings
The first step in the configuration of the module is in the tag labeled MCM.CONFIG.ModDef. This will setup which of the 5000 data registers will be written to the MVI module, and which of the 5000 data registers will be read from the MVI module. The read and write data locations will be used later in the Master Command section when we configure the IntAddress within each MasterCommand. Below are the values from our sample ladder program.
The WriteStartReg will be used to determine the starting register location for WriteData [0 to 599] and the WriteRegCnt will be used to determine how many of the 5000 registers will be used for information to be written out to the module. The sample ladder file will setup 600 registers for write data, labeled
MCM.WriteData[0 to 599].
Label Description
WriteStartReg
WriteRegCnt
ReadStartReg
ReadRegCnt
BPFail
ErrStatPtr
Determines where in the 5000 register module memory to place the data obtained from the ControlLogix processor from the WriteData tags.
Sets how many registers of data the MVI module will request from the CLX processor. Because the module pages data in blocks of 200 words, this number should be evenly divisible by 200.
Determines where in the 5000 register module memory to begin obtaining data to present to the CLX processor in the ReadData tags.
Sets how many registers of data the MVI module will send to the CLX processor. This value should also be a multiple of 200.
Sets the consecutive number of backplane failures that will cause the module to stop communications on the Modbus network. Typically used when the module is configured as a slave.
Also used mainly when the module is setup as a slave. This parameter places the STATUS data into the database of the module.
The sample configuration values set up the module database for WriteData[0 to
599] to be stored in the module memory at register 0 to 599, and ReadData[0 to 599] to be stored in the module memory at registers 1000 to 1599 like shown
below.
Page 26 of 159 ProSoft Technology, Inc.
July 24, 2008
Configuration as a Modbus Master MVI56-MCM ControlLogix Platform Modbus Communication Module
The following is the sample configuration layout of the tags and addressing.
The MVI56-MCM sample program is configured for 600 registers of ReadData and 600 registers of WriteData. In most applications, this is plenty of data tags for an application, but in some cases you may require more user data. To increase the array size for your application, follow the steps described below.
Because the module pages data in blocks of 200 registers at a time, you will want to keep this as a number divisible by 200.
Note: Changing the array size may zero out all tags in the MCM tag location, usually at Step 3 of this procedure. Make sure you have saved any configuration you have alrea dy done so you can reference this later in case the data values in the MCM array are reset to 0.
For example, if your application will require 1000 words of read data, instead of the default 600 words, follow the steps below to make this change.
1 Click on MCMDATA from the User-Defined data type in the Controller
Organization List.
2 Change ReadData array from INT[600] to INT[1000] as shown.
ProSoft Technology, Inc. Page 27 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module
3 Click on the Apply button located at bottom of window.
Note: You may get a message telling you that data values have been reset, make sure that you have saved a backup copy of your program if you have parameters configu r ed.
4 Next, click Controller Tags. This action opens the MVI56MCM window.
Verify that the Monitor Tags tab is selected (see Monitor/Edit tags on bottom of window).
Note: Be aware that the window parameters can be changed by clicking between Monitor and Edit tags. You can use the scroll bar to view para meter columns for each tag too.
5 Click on [+] to open the MCM.CONFIG.ModDef section and change the
ReadRegCnt parameter from the default 600 to 1000 for your application.
6 Click ReadData to open ladder file and go to rung #2 of this file. 7 Change the High Limit on the LIM statement to allow for 5 blocks of data.
(1000 registers / 200 registers per block = 5 blocks of data) This step is shown below.
8 Verify the change to this rung. Toggle the 9 Save and download ladder to the processor. 10 When Online with the ControlLogix processor, toggle the
MCM.CONTROL.WarmBoot bit to download the change made in Step 5 to the processor.
Note: Any changes made to the MCM.CONFIG array must be downloaded to the MVI56MCM module. The use of the MCM.CONTROL.WarmBoot or MCM.CONTROL.ColdB oot bit will force the MVI56MCM module to re- read the configuration from the ControlLogix processor.
object within RSLogix 5000.
This holds true for changes made to the WriteData array.
Page 28 of 159 ProSoft Technology, Inc.
July 24, 2008
Configuration as a Modbus Master MVI56-MCM ControlLogix Platform Modbus Communication Module
For modifying the WriteData array, change the High Limit value of the LIM statement in rung #3 of the WriteData ladder. Also make sure that the ReadData and WriteData arrays do not overlap in the module memory. If you have an application that requires 2000 words of WriteData, starting at register 0, then your MCM.CONFIG.ModDef.ReadStartReg should be set to a value of 2000 or greater.
4.2.1 Port Setup
The following section describes the parameters necessary within the MCM.CONFIG.PortX section of the controller tags that are used when the module is setup as a Modbus Master device. Port 1 and Port 2 each have their own set of parameters to configure.
Note: Any changes made within either the MCM.CONFIG array must be downloaded to the MVI56MCM module by setting either the WarmBoot, ColdBoot, or cycling power to the module.
Any parameters not mentioned in this section are not used when the module is configured as a Modbus Master. Parameters in BOLD are required for all applications as a master.
Verify you are in Monitor Tags mode. Then use scroll bar at bottom to view description of each parameter. The following table uses that information.
Label Description Enabled Type
FloatFlag
FloatStart
Protocol Baudrate Sets the baud rate that the port will operate at. Valid values for this field
Parity DataBits StopBits
RTSOn 0 to 65535 milliseconds delay before data RTSOff 0 to 65535 milliseconds delay after data UseCTS 0 = No, 1 = Yes to use CTS modem line CmdCount
1 = enable port, 0 = disable port Master = 0 0 = No Floating point data, 1 = Use Floating point data. See "Floating
Point Support (page 40)" for more information. Register offset in message for floating data point. See "Floating Point
Support (page 40)" for more information. 0 = Modbus RTU mode, 1 = Modbus ASCII mode
are 110, 150, 300, 600, 1200, 4800, 9600, 19200, 384 or 3840 (for 38,400 baud), 576 or 5760 (for 57,600 baud) and 115,1152, or 11520 (for 115,200 baud)
0 = None, 1 = Odd, 2 = Even Modbus RTU mode = 8 Modbus ASCII mode = 8 or 7 Valid values are 1 or 2.
Command list count
ProSoft Technology, Inc. Page 29 of 159 July 24, 2008
MVI56-MCM ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module
Label Description
MinCmdDelay 0 to 65535 milliseconds min. time between each commands
Ex: A value of 10 will cause the module to wait 10 milliseconds between the issuance of each Modbus master command.
CmdErrPtr RespTO RetryCount
ErrorDelayCntr 0 to 65535 Command cycle count if error InterCharacterDelay
Further clarification for some parameters in table above.
Parameter Description CmdCount Command count list 100 = causes the module to look at
CmdErrPtr Set Master Command Errors location. Each command will reserve one for
RespTO 1000 = 1000 milliseconds (1 second) before it will either reissue the
ErrorDelayCntr
InterCharacterDelay
Internal DB location to place command error list 0 to 65535 milliseconds response timeout for command Retry count for failed request
0 to 65535 milliseconds time between characters to signal end of message
MCM.CONFIG.PortX. MasterCommand[0]-[99]. 10 = cause commands [0]-[9] to be processed. Sets how many registers will be used for error codes as set in the CmdErrPtr value.
the command error code. See "Verifying Communications" of this manual. CmdErrPtr value should be within the range of the ReadData array, per MCM.CONFIG.ModDef of this manual.
command (as set in the RetryCount) or if the RetryCount has already been met, then it will move on to the next command in the list.
Sets consecutive commands to that slave will be skipped if a command has gone into error. For example, if a command to slave 1 has gone into error (RespTO has elapsed, and RetryCount has been met), the module will skip the next X number of commands in the list to node number 1. This can be useful in applications where a slave device is taken offline, as the module will try the first command to that slave, and then skip the next X number of commands to that slave so that time is not lost on trying to poll information from a slave device that is not on the network.
Sets the Inter Character Delay for the module. Within Modbus RTU a character gap or quiet time on the line signals the end of the message. This is typically 3.5 character widths, as specified by the Modbus protocol. In some Radio or Modem applications, there may be more of a delay between characters.
Page 30 of 159 ProSoft Technology, Inc.
July 24, 2008
Loading...
+ 129 hidden pages