ProSoft Technology MVI56-MCM User Manual

ProSoft Technology MVI56-MCM User Manual

Controllogix platform modbus communication module
Table of Contents

Advertisement

MVI56-MCM
ControlLogix Platform
Modbus Communication Module
User Manual
July 24, 2008

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MVI56-MCM and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for ProSoft Technology MVI56-MCM

  • Page 1 MVI56-MCM ControlLogix Platform Modbus Communication Module User Manual July 24, 2008...
  • Page 2: Please Read This Notice

    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.
  • Page 3: Battery Life Advisory

    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...
  • Page 4: Your Feedback Please

    +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.
  • Page 5: Table Of Contents

    PLEASE READ THIS NOTICE........................ 2 Warnings............................2 Battery Life Advisory.......................... 3 ProSoft® Product Documentation ..................... 3 Your Feedback Please ........................4 GUIDE TO THE MVI56-MCM USER MANUAL ................7 START HERE............................ 9 System Requirements ......................9 Deployment Checklist......................10 Package Contents ......................11 Setting Jumpers........................
  • Page 6 MVI56-MCM Database Definition ..................111 MVI56-MCM Configuration Data..................111 MVI56-MCM Status Data Definition ................. 119 MVI56-MCM Command Control..................121 MVI56-MCM User Defined Data Types ................121 Modbus Protocol Specification..................127 8.10 Using the Sample Program - RSLogix Version 15 and earlier ........137 SUPPORT, SERVICE &...
  • Page 7: Guide To The Mvi56-Mcm User Manual

    Guide to the MVI56-MCM User Manual MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Guide to the MVI56-MCM User Manual Function Section to Read Details → Introduction Start Here (page 9) This Section introduces the customer to the module. Included are: package contents,...
  • Page 8 MVI56-MCM ♦ ControlLogix Platform Guide to the MVI56-MCM User Manual Modbus Communication Module Page 8 of 159 ProSoft Technology, Inc. July 24, 2008...
  • Page 9: Start Here

    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.
  • Page 10: Deployment Checklist

    Most applications can use the Sample Ladder Logic without any edits to the Sample Program. ____________ 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.
  • Page 11: Package Contents

    Note: Most applications can use the Sample Ladder Logic without any edits to the sample program. 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.
  • Page 12: Setting Jumpers

    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.
  • Page 13 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.
  • Page 14: Connect Your Pc To The Processor

    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 modules connected to the PCI bus, the peripheral modules will not have holding clips. Make sure all of the modules are aligned with their respective slots before you snap them into place.
  • Page 15: Using The Rslogix 5000 V16 Add On Instruction

    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 16: Add Module To Rack Configuration

    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.
  • Page 17 Module Properties dialog box. 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.
  • Page 18: Import Add On Instruction

    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...
  • Page 19 Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Select the MVI56MCM_AddOnRung.L5X file The following window will be displayed showing the controller tags to be created during the import procedure: Click OK to confirm the import. RSLogix will indicate that the import is under progress: ProSoft Technology, Inc.
  • Page 20 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 21: Download The Sample Program To The Processor

    Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 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 If you are not already online to the processor, open the Communications menu, and then choose Download.
  • Page 22 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: Open RSLinx. Open the Communications menu, and choose Configure Drivers.
  • Page 23 Using the RSLogix 5000 v16 Add On Instruction MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Click to select the driver, and then click Configure. This action opens the Configure Allen-Bradley DF1 Communications Device dialog box. Click the Auto-Configure button. RSLinx will attempt to configure your serial port to work with the selected driver.
  • Page 24 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...
  • Page 25: Configuration As A Modbus Master

    Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 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...
  • Page 26: Moddef Settings

    MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module 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.
  • Page 27 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.
  • Page 28 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module 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 configured.
  • Page 29 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...
  • Page 30 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.
  • Page 31 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 4.2.2 Master Command Configuration The following section describes the communications with the master port and the slave devices that are connected to that port. Verify you are in Monitor Tags mode. Then use the scroll bar at bottom to view description of each parameter.
  • Page 32 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module Label Description Swap Typically used when reading floating point data, swaps the data read from the slave device before it is placed into the module memory. For instance, you receive 4 bytes of data from the slave (ABCD).
  • Page 33 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Label Description DevAddress Used to indicate the modbus slave address for the register or registers associated with that command. This is the offset address for the modbus slave device. With modbus, to read an address of 40001, what will actually be transmitted out port is Function Code 03 (one byte) with an address of 00 00 (two bytes).
  • Page 34: Master Command Samples

    MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module Q. My slave shows addressing like 400,001 or 301,345? For the 6 digit addressing, you will want to use the same function codes and configuration as setup above, just the starting address has changed.
  • Page 35 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Label Description Enable = 1 Causes the module to send the command every time it goes through the command list. IntAddress = 1000 Places the data read from the slave device into the module at address 1000.
  • Page 36 IntAddress = 16320 16320. IntAddress 16320 of the module memory will be copied into the tag MCM.DATA.ReadData[20] because 16320 represents a bit address within the memory of the MVI56-MCM module (16320 / 16 = register 1020). Count = 160 Reads 160 consecutive bits from the slave device.
  • Page 37 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Label Description Enable = 1 Causes the module to send the command every time it goes through the command list. IntAddress = 16480 Places the data read from the slave device into the module at address 16480.
  • Page 38 Description Enable = 2 Causes the module to send the command to the slave device only when the data associated within the IntAddress of the MVI56-MCM module memory has changed. IntAddress = 320 Writes the data in bit 320 of the module memory to the slave device.
  • Page 39 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Label Description Enable = 1 Causes the module to send the command every time it goes through the command list. IntAddress = 5 Writes the data from address 5 of the module memory to the slave device.
  • Page 40: Floating Point Data Handling

    MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module Floating Point Data Handling In many applications, it is necessary to read or write floating point data to the slave device. The ProSoft sample ladder only provides an INT array for the ReadData and Write Data array (16 bit signed integer value).
  • Page 41 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Along with the FC 3, DevAddress 256 will read Modbus address 40257 of the slave device.The above command will read 40257 and 40258 of the Modbus Slave #1 and place that data in MCM.DATA.ReadData[0] and [1].
  • Page 42 Float. upper 16 bits A COP statement must be used to copy the data from floating point data tags within the ControlLogix processor, into the MCM.DATA.WriteData array used by the MVI56-MCM module. Below is an example. Page 42 of 159 ProSoft Technology, Inc.
  • Page 43 Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module The length of this COP statement must now be 14. This will COP as many of the MCM_Float_Data values required to occupy the MCM.Data.WriteData array for a length of 14. This will take 7 registers, MCM_Float_Data[0]-[6], and place that data into MCM.DATA.WriteData[0]-[13].
  • Page 44 Therefore a count of 1 will send 4 bytes of data, instead of the normal 2 bytes of data to a non Enron/Daniel floating point register. First, Copy the floating point data from the ControlLogix processor into the MCM.DATA.WriteData array used by the MVI56-MCM module. Below is an example. Page 44 of 159 ProSoft Technology, Inc.
  • Page 45: Command Control And Event Command

    Configuration as a Modbus Master MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module The length of this COP statement must now be 14. This will COP as many of the MCM_Float_Data values required to occupy the MCM.Data.WriteData array for a length of 14. This will take 7 registers, MCM_Float_Data[0]-[6], and place that data into MCM.DATA.WriteData[0]-[13].
  • Page 46 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module 4.5.1 Command Control Command Control will give you the ability to issue a command already defined in the master command list (but disabled) and enable that command for a single pass.
  • Page 47 MCM.CONFIG.PortX.CmdErrPtr value but Event Commands do not have to be defined in the regular command list. Event command is a way of adding a command to the top of the MVI56-MCM modules command queue that is not defined within the command list.
  • Page 48 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Master Modbus Communication Module Note: Event Command blocks can only send 1 command to the command queue per block. Note: Event Commands (like Command Control) will take priority over commands that are defined in the normal command list.
  • Page 49: Configuration As A Modbus Slave

    Pass Thru must be used. This allows the MCM.DATA.WriteData array to be used for all data transfer to the master. Because the data transfer of the MVI56-MCM module cannot be bidirectional, in Pass Thru mode when a Modbus Write command is issued by the Master, the MVI module builds a special block of information.
  • Page 50: Moddef Settings

    To configure Modbus Slave mode of operation use the MCM.CONFIG.ModDef settings. This section determines which of the MVI56-MCM module's 5000 registers of memory will be sent from the CLX processor out to the MVI module (WriteData) and which of the 5000 registers will be sent from the MVI module to the CLX processor (ReadData).
  • Page 51 Configuration as a Modbus Slave MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module With the sample configuration, the following is the layout of the tags and addressing. 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 above.
  • Page 52 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Slave Modbus Communication Module MVI Address 0xxx 1xxxx 3xxxx 4xxxx Tag Address 1601 to 1616 11601 to 11616 30101 40101 WriteData[100] 3201 to 3216 13201 to 13216 30201 40201 WriteData[200] 8001 to 8016...
  • Page 53 Description BitInOffset Defines the starting address within the module for 1xxxx Modbus addressing. A value of 0 sets 10001 to 10016 as address 0 in the MVI56-MCM module. WordInOffset Defines the starting address within the module memory for 3xxxx registers.
  • Page 54: Read And Write Same Modbus Address (Pass Thru)

    The basic theory of pass thru is that the ladder logic will constantly be updating values in the MVI56-MCM module memory using the WriteData array. When the master issues a Write command, the module will build a special block of data.
  • Page 55 Configuration as a Modbus Slave MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Pass Thru should only be used when required. If a master issues a Write command to the module, the module must build a special block of information. Then, it waits for confirmation from the ladder logic that the block has been processed.
  • Page 56: Slave Configuration

    MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Slave Modbus Communication Module Slave Configuration 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 slave.
  • Page 57: Further Clarification For Some Parameters In Table Above

    Configuration as a Modbus Slave MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Further clarification for some parameters in table above. Parameter Description This allows for a write message to this slave to be passed through the Type 2 = module database, and go directly into the ladder logic. The module will set the MCM.CONTROL.BPLastRead value to 9996 and the Modbus write...
  • Page 58 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Slave Modbus Communication Module To copy data from the MVI module to a floating point tag within the CLX processor. Setup a tag within the CLX processor as shown. Then setup the COP statement to move data from the MCM.DATA.ReadData array, and over to the new tag MCM_Read_Floats tag as shown here.
  • Page 59 Configuration as a Modbus Slave MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module With the above configuration, this would be the addressing for the module. Module Address Modbus Address Tag Address 47001 MCM.DATA.WriteData[100] 47002 MCM.DATA.WriteData[102] 47003 MCM.DATA.WriteData[104] 47006 MCM.DATA.WriteData[110] 47011 MCM.DATA.WriteData[120] 47051 MCM.DATA.WriteData[200]...
  • Page 60 MVI56-MCM ♦ ControlLogix Platform Configuration as a Modbus Slave Modbus Communication Module Page 60 of 159 ProSoft Technology, Inc. July 24, 2008...
  • Page 61: Verify Communications

    You have followed our instructions and installed the software ladder, made changes, but you are not sure if you are communicating properly. This chapter provides an overview of how the MVI56-MCM module communicates using the MCM protocol. MVI56-MCM Status Data Definition as a Master This section contains a description of the members present in the MCM.STATUS...
  • Page 62: Verify Master Communications

    The Modbus Master commands are setup, now it is time to verify that these commands are working correctly. Within the MVI56-MCM module, there are a couple of ways of checking to see if the commands that have been configured in the previous location are working correctly.
  • Page 63 MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 6.2.1 Command Error Codes The MVI56-MCM module will return an individual error code for every command configured within the MCM.CONFIG.PortXMasterCmd section. The location of these error codes are determined by the parameter MCM.CONFIG.PortX.CmdErrPtr. This parameter determines where in the module's 5000 register database the error codes for each command will be placed.
  • Page 64 MVI56-MCM ♦ ControlLogix Platform Verify Communications Modbus Communication Module Below is a list of the error codes for the module: Standard Modbus Protocol Errors Code Description Illegal Function Illegal Data Address Illegal Data Value Failure in Associated Device Acknowledge Busy, Rejected Message The "Standard Modbus Protocol Errors"...
  • Page 65 Verify Communications MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module "Module Communication Errors" are generated by the MVI56-MCM module, and are an indication that the communications with the slave device is not occurring correctly. Error Code -11 indicates that the module is transmitting a message on the communications wire.
  • Page 66: Verify Slave Communications

    Modbus master. 6.3.1 MVI56-MCM Status Data Definition as a Slave Refer to MVI56-MCM Status Data Definition (page 119) for complete listing of Status information. Page 66 of 159 ProSoft Technology, Inc.
  • Page 67: Diagnostics And Troubleshooting

    Reading Status Data from the Module The MVI56-MCM module returns a 29-word Status Data block that can be used to determine the module's operating status. This data is located in the module's database at registers 6670 to 6698 and at the location specified in the configuration.
  • Page 68 You can connect directly from your computer's serial port to the serial port on the module to view configuration information and perform maintenance. ProSoft Technology recommends the following minimum hardware to connect your computer to the module: 80486 based processor (Pentium preferred)
  • Page 69 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Verify that RSLinx is not controlling the COM port. Refer to Disabling the RSLinx Driver for the Com Port on the PC (page 105). Verify that your communication software is using the correct settings for baud rate, parity and handshaking.
  • Page 70: Main Menu

    Only use these commands if you are specifically directed to do so by ProSoft Technology Technical Support staff. Some of these command keys are not listed on the menu, but are active nevertheless. Please be careful when pressing keys so that you do not accidentally execute an unwanted command.
  • Page 71 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Opening the Data Analyzer Menu Press [A] to open the Data Analyzer Menu. Use this command to view all bytes of data transferred on each port. Both the transmitted and received data bytes are displayed.
  • Page 72 Only use these commands if you are specifically directed to do so by ProSoft Technology Technical Support staff. Some of these command keys are not listed on the menu, but are active nevertheless. Please be careful when pressing keys so that you do not accidentally execute an unwanted command.
  • Page 73 Only use these commands if you are specifically directed to do so by ProSoft Technology Technical Support staff. Some of these command keys are not listed on the menu, but are active nevertheless. Please be careful when pressing keys so that you do not accidentally execute an unwanted command.
  • Page 74 MVI56-MCM ♦ ControlLogix Platform Diagnostics and Troubleshooting Modbus Communication Module Displaying Timing Marks in the Data Analyzer You can display timing marks for a variety of intervals in the data analyzer screen. These timing marks can help you determine communication-timing characteristics.
  • Page 75 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Character Definition Data enclosed in these characters represent data received on the port. < > Data enclosed in these characters represent data transmitted on the port. <R+> These characters are inserted when the RTS line is driven high on the port.
  • Page 76 MVI56-MCM ♦ ControlLogix Platform Diagnostics and Troubleshooting Modbus Communication Module From this menu, you can select the "Port", the "format", and the "ticks" that you can display the data in. For most applications, HEX is the best format to view the data, and this does...
  • Page 77 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module To begin the display of the communications data, you will then want to press 'B' to tell the module to start printing the communications traffic out on the debug port of the module. After you have pressed 'B', you should see something like the following: The <R+>...
  • Page 78 MVI56-MCM ♦ ControlLogix Platform Diagnostics and Troubleshooting Modbus Communication Module 7.1.8 Modbus Message Structure Refer to Modbus Protocol Specification (page 127) for information on the structure of Modbus messages. 7.1.9 Modbus Database View Press [D] to open the Modbus Database View menu. Use this command to view the module's internal database values.
  • Page 79 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Viewing the Next 100 Registers of Data Press [N] from the Database View menu to select and display the next 100 registers of data. Viewing Data in Decimal Format Press [D] to display the data on the current page in decimal format.
  • Page 80: Led Status Indicators

    Modbus Port 2. No data is being transferred on the port. Amber The MVI56-MCM is working normally. The MVI56-MCM module program has recognized a communication error on one of its Modbus ports. BP ACT Amber The LED is on when the module is performing a write operation on the backplane.
  • Page 81 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module During module configuration, the OK will be red and the APP and BP ACT LEDs will be on. If the LEDs are latched in this mode for a long period of time, look at the configuration error words in the configuration request block.
  • Page 82 Note: If the APP, BP ACT and OK LEDs blink at a rate of every one-second, this indicates a serious problem with the module. Call ProSoft Technology Support to arrange for repairs. 7.2.1 Clearing a Fault Condition Typically, if the OK LED on the front of the module turns red for more than ten seconds, a hardware problem has been detected in the module, or the program has exited.
  • Page 83 Diagnostics and Troubleshooting MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Processor Errors Problem Description Steps to take Processor Fault Verify that the module is plugged into the slot that has been configured for the module. Verify that the slot in the rack configuration has been set up correctly in the ladder logic.
  • Page 84 MVI56-MCM ♦ ControlLogix Platform Diagnostics and Troubleshooting Modbus Communication Module Page 84 of 159 ProSoft Technology, Inc. July 24, 2008...
  • Page 85: Reference

    ControlLogix processors to interface easily with Modbus protocol-compatible devices and hosts. The MVI56-MCM module acts as an input/output module between the Modbus network and the ControlLogix processor. The data transfer from the ControlLogix processor is asynchronous from the actions on the Modbus network. A 5000- word register space in the module exchanges data between the processor and the Modbus network.
  • Page 86: General Specifications

    MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module 8.1.2 General Specifications Single Slot - 1756 backplane compatible Local or remote rack The module is recognized as an Input/Output module and has access to processor memory for data transfer between processor and module Ladder Logic is used for data transfer between module and processor.
  • Page 87: Functional Overview

    1, 2, 3, 4, 5, 6, 8, 15, 16, 17, 22 and 23 from an attached Modbus master unit. Master Specifications A port configured as a virtual Modbus master device on the MVI56-MCM module actively issues Modbus commands to other nodes on the Modbus network. One hundred (100) commands are supported on each port.
  • Page 88 MODBUS is a master/slave protocol. The master establishes a connection to the remote slave. When the connection is established, the master sends the MODBUS commands to the slave. The MVI56-MCM module works both as a master and as a slave.
  • Page 89 The following illustration shows the data transfer method used to move data between the ControlLogix processor, the MVI56-MCM module and the Modbus Network. ProSoft Technology, Inc.
  • Page 90 Modbus). The following illustration shows the layout of the database: Data contained in this database is paged through the input and output images by coordination of the ControlLogix ladder logic and the MVI56-MCM module's program. Up to 248 words of data can be transferred from the module to the processor at a time.
  • Page 91 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Offset Description Length 218 to 224 Port 2 Error Status 225 to 230 Data Transfer Status Port 1 Current Error/Index Port 1 Last Error/Index Port 2 Current Error/Index Port 2 Last Error/Index...
  • Page 92 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Module Configuration Data This block sends general configuration information from the processor to the module. The data is transferred in a block with an identification code of 9000. The structure of the block is displayed in the following table:...
  • Page 93 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Offset Description Length 73 to 80 Command Definition 81 to 88 Command Definition 89 to 96 Command Definition 97 to 104 Command Definition 105 to 112 Command Definition 113 to 120 Command Definition...
  • Page 94 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Block ID Description 3002 Request for first 128 slave status values for Modbus Port 1 3003 Request for last 128 slave status values for Modbus Port 1 3102 Request for first 128 slave status values for Modbus Port 2...
  • Page 95 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Offset Description Length 3001 or 3101 Number of Slaves in Block 2 to 201 Slave indexes 202 to 247 Spare The module will respond with a block with the same identification code received and indicate the number of slaves acted on with the block.
  • Page 96 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module remote slave device to be associated with the command. When the command receives the block, it will process it and place it in the command queue. The module will respond to each event command block with a read block with the...
  • Page 97 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module The module responds to a command control block with a block containing the number of commands added to the command queue for the port. The following table describes the format for this block.
  • Page 98 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Offset Description Length 74 to 81 Command Definition 82 to 89 Command Definition 90 to 97 Command Definition 98 to 105 Command Definition 106 to 113 Command Definition 114 to 121 Command Definition...
  • Page 99 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 8.2.11 Pass-Through Control Blocks Unformatted Pass-Through Control Blocks If one or more of the slave ports on the module are configured for the unformatted pass-through mode, the module will pass blocks with identification codes of 9996 to the processor for each received write command.
  • Page 100 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module The ladder logic will be responsible for parsing and copying the received message and performing the proper control operation as expected by the master device. The processor must then respond to the pass-through control block with a write block with the following format.
  • Page 101 Slave Driver The Slave Driver Mode allows the MVI56-MCM module to respond to data read and write commands issued by a master on the Modbus network. The following flow chart and associated table describe the flow of data into and out of the module.
  • Page 102 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Step Description After the module accepts the command, the data is immediately transferred to or from the internal database in the module. If the command is a read command, the data is read out of the database and a response message is built.
  • Page 103 Modbus Communication Module Master Driver Mode In the Master mode, the MVI56-MCM module issues read or write commands to slave devices on the Modbus network. These commands are user configured in the module via the Master Command List received from the ControlLogix processor or issued directly from the ControlLogix processor (event command control).
  • Page 104 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Master Command List In order to function in the Master Mode, the module's Master Command List must be defined. This list contains up to 100 individual entries, with each entry containing the information required to construct a valid command. This includes...
  • Page 105: Cable Connections

    Data (MCM.ModDef.ReadStartReg and MCM.ModDef.ReadRegCnt). Cable Connections The application ports on the MVI56-MCM module support RS-232, RS-422, and RS-485 interfaces. Please inspect the module to ensure that the jumpers are set correctly to correspond with the type of interface you are using.
  • Page 106 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Open RSLinx and go to Communications>RSWho Make sure that you are not actively browsing using the driver that you wish to stop. The following shows an actively browsed network: Notice how the DF1 driver is opened, and the driver is looking for a processor on node 1.
  • Page 107 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module If you see the status as running, you will not be able to use this com port for anything other than communication to the processor. To stop the driver press the "Stop" on the side of the window:...
  • Page 108 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module RS-232: Modem Connection This type of connection is required between the module and a modem or other communication device. The "Use CTS Line" parameter for the port configuration should be set to 'Y' for most modem applications.
  • Page 109 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module RS-232: Null Modem Connection (No Hardware Handshaking) This type of connection can be used to connect the module to a computer or field device communication port. Note: If the port is configured with the "Use CTS Line" set to 'Y', then a jumper is required between the RTS and the CTS line on the module connection.
  • Page 110 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module 8.3.4 RS-485 The RS-485 interface requires a single two or three wire cable. The Common connection is optional and dependent on the RS-485 network. The cable required for this interface is shown below: Note: Terminating resistors are generally not required on the RS-485 network, unless you are experiencing communication problems that can be attributed to signal echoes or reflections.
  • Page 111: Mvi56-Mcm Database Definition

    MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module MVI56-MCM Database Definition This section contains a listing of the internal database of the MVI56-MCM module. This information can be used to interface other devices to the data contained in the module. Register Range...
  • Page 112 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Register Content Description 5003 Read Reg Count This parameter specifies the number of registers to be transferred from the module to the processor. Valid entry for this parameter is 0 to 5000.
  • Page 113 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Register Content Description 5017 Parity This is the parity code to be used for the port. Values are None, Odd, Even. 5018 Data Bits This parameter sets the number of data bits for each word used by the protocol.
  • Page 114 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Register Content Description 5028 Holding Reg Offset This parameter specifies the offset address in the internal Modbus database that is to be used with network requests for Modbus function 3, 6, or 16 commands.
  • Page 115 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Register Content Description 5042 Float Flag This flag specifies if the floating-point data access functionality is to be implemented. If the float flag is set to 1, Modbus functions 3, 6, and 16 will interpret floating-point values for registers as specified by the two following parameters.
  • Page 116 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Register Content Description 5054 Slave ID This parameter defines the virtual Modbus slave address for the internal database. All requests received by the port with this address are processed by the module. Verify that each device has a unique address on a network.
  • Page 117 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Register Content Description 5064 Error Delay Counter This parameter specifies the number of polls to skip on the slave before trying to re-establish communications. After the slave fails to respond, the master will skip commands to be sent to the slave the number of times entered in this parameter.
  • Page 118 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Register Content Description 6681 Port 1 Command List This field contains the number of command errors Errors processed on the port. These errors could be due to a bad response or command.
  • Page 119: Mvi56-Mcm Status Data Definition

    Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Register Content Description 6701 Port 2 Current Error For a slave port, this field contains the value of the current error code returned. For a master port, this field contains the index of the currently executing command.
  • Page 120 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Offset Content Description Port 1 Requests This field contains the total number of messages sent out of the port. Port 1 Responses This field contains the total number of messages received on the port.
  • Page 121: Mvi56-Mcm Command Control

    MVI56-MCM Command Control Command Control data is received from other nodes on the network that can control the MVI56-MCM module. Specific values are written to regions of this block to control the module. Currently, the module is programmed to handle the receipt of the following requests: write configuration to processor, warm boot and cold boot.
  • Page 122 Modbus Communication Module 8.8.2 MCMCONFIG This object contains the data types that apply to the configuration of the module. Refer to MVI56-MCM Configuration Data Definition (page 111) for a complete description of each element in this object. Tag Name Data Type...
  • Page 123 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Tag Name Data Type Description RTSOff 0-65535 milliseconds delay after data MinResp 0-65535 milliseconds minimum time before response to request UseCTS 0=No, 1=Yes to use CTS modem line SlaveID 1-255 Modbus Node Address (Slave)
  • Page 124 Port2LastErr Last command index that received an error on Port 2 Port2PreviousErr Previous Command index that received an error on Port MCMPortErrors This object stores the port statistics for an MVI56-MCM port. Tag Name Data Type Description CmdReq Total number of command list requests sent...
  • Page 125 TriggerCmdCntrl BOOL activate this trigger NumberOfCommands Number of commands per block (1 to 6) PortNumber MVI56-MCM Port Number of master port (1 or 2) CommandIndex INT[6] Stores the command indexes for command control CmdsAddedToQueue Number of commands added to queue...
  • Page 126 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module Tag Name Data Type Description InternalDBAddress Internal database address PointCount Number of points for this command SwapCode Swap code (0= no swap, 1=swap words, 2=swap words and bytes, 3=swap bytes) ModbusFunctionCode Modbus function code...
  • Page 127: Modbus Protocol Specification

    Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module _CoilArray Conversion to INT values Tag Name Data Type Description Boolean BOOL[416] Conversion from Bool to INT data types Modbus Protocol Specification 8.9.1 Read Output Status (Function Code 01) Query This function allows the user to obtain the ON/OFF status of logic coils used to control discrete outputs from the addressed slave only.
  • Page 128 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module The status of coils 20 to 27 is shown as CD(HEX) = 1100 1101 (Binary). Reading left to right, this shows that coils 27, 26, 23, 22, and 20 are all on. The other coil data bytes are decoded similarly.
  • Page 129 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Due to the quantity of input statuses requested, the last data field which is shown as 35 HEX = 0011 0101 (binary) contains the status of only 6 inputs (10213 to 102180) instead of 8 inputs. The two left-most bits are provided as zeros to fill the 8-bit format.
  • Page 130 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module The example below requests the contents of register 3009 in slave number 11. Adr Func Data Start Reg Hi Data Start Reg Lo Data #of Regs Hi Data #of Regs Lo Error Check...
  • Page 131 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module The forcing of a coil via MODBUS function 5 will be accomplished regardless of whether the addressed coil is disabled or not. (In ProSoft products, the coil is only affected if the necessary ladder logic is implemented).
  • Page 132 Here the list of sub-function codes supported by the serial line devices. Each sub-function code is then listed with an example of the data field contents that would apply for that diagnostic. Sub-functions supported by the MVI56-MCM module are highlighted in BOLD. Sub-function code Name...
  • Page 133 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Sub-function code Name Return Bus Character Overrun Count RESERVED Clear Overrun Counter and Flag N.A. 21..65535 Reserved 00 Return Query Data The data passed in the request data field is to be returned (looped back) in the response.
  • Page 134 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module 8.9.8 Force Multiple Coils (Function Code 15) Query This message forces each coil in a consecutive block of coils to a desired ON or OFF state. Any coil that exists within the controller can be forced to either state (ON or OFF).
  • Page 135 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Response The normal response to a function 16 query is to echo the address, function code, starting address and number of registers to be loaded. Func Hi Addr Lo Addr Quantity Error Check Field 8.9.10 MODBUS Exception Responses...
  • Page 136 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module In this example, the client addresses a request to server device. The function code (01) is for a Read Output Status operation. It requests the status of the output at address 1245 (04A1 hex). Note that only that one output is to be read, as specified by the number of outputs field (0001).
  • Page 137: Using The Sample Program - Rslogix Version 15 And Earlier

    8.10.1 Using the Sample Program in a New Application Open the Sample Program in RSLogix The sample program for your MVI56-MCM module includes custom tags, data types and ladder logic for data I/O, status and command control. For most applications, you can run the sample program without modification, or, for advanced applications, you can incorporate the sample program into your existing application.
  • Page 138 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 (http://www.prosoft- technology.com/support/downloads)
  • Page 139 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module On the Connected To Go Online dialog box, click the General tab. This tab shows information about the processor, including the Revision (firmware) version. In the following illustration, the firmware version is 11.32...
  • Page 140 MVI56-MCM ♦ ControlLogix Platform Reference Modbus Communication Module On the shortcut menu, choose Properties. This action opens the Controller Properties dialog box. Click the Change Controller button. This action opens the Change Controller dialog box. Open the Type: dropdown list, and then select your ControlLogix controller.
  • Page 141 RSLogix will automatically apply the slot number change to all tags, variables and ladder logic rungs that use the MVI56-MCM slot number for computation. Download the Sample Program to the Processor To download the sample program from RSLogix 5000 to the ControlLogix processor: Note: The key switch on the front of the ControlLogix module must be in the REM position.
  • Page 142 Start another instance of RSLogix 5000, and then open your existing application. You will be adding the MVI56-MCM module definition, and then copying controller tags, ladder logic, and user defined data types from the sample application into your existing application.
  • Page 143 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module In the Select Module Type dialog box, select 1756-Module (Generic 1756 Module) from the list and, and then click OK. This action opens the Module Properties dialog box. In the Module Properties dialog box, enter the Name, Description and Slot options for your application, using the examples in the following illustration.
  • Page 144 Note: Data types prefixed with an underscore [_] are used in optional routines, and need not be copied unless your application requires them. Refer to MVI56-MCM User Defined Data Types for a description of the usage for each data type.
  • Page 145 Reference MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module In the Controller Organization pane in the Sample Program, expand the Tasks folder until the list of program routines is visible. In the Sample Program window, select one routine at a time, and then drag the routine to the MainProgram folder in your existing program.
  • Page 146 PortX.Type = 2 to 4, then this rung and ladder routine is required. WriteData. The WriteData task sends data from the processor to the MVI56-MCM module. Data is transferred from the processor to the module using the module's output image (Local:1:O:Data[ ]). This task should store the currently requested data set in the module's MCM.BP.LastWrite data object.
  • Page 147 _ReadControl This optional task is used to get status and event data from the Modbus devices connected to the MVI56-MCM module. Special command blocks requested from the module in the _WriteControl routine are processed and handled in this routine. If command control, event command, or slave status blocks are not going to be used in the application, then this rung and the _ReadControl and _WriteControl ladder files may be removed.
  • Page 148 Controller folder, and then double-click Controller Tags. This action opens Controller Tags - MVI56MCM, as shown in the following illustration. To configure a Modbus Master, refer to Configuring the MVI56-MCM as a Modbus Master. To configure a Modbus Slave, refer to Configuring the MVI56-MCM as a Modbus Slave.
  • Page 149: Support, Service & Warranty

    How to Contact Us: Technical Support..........149 Return Material Authorization (RMA) Policies and Conditions..... 150 LIMITED WARRANTY................. 152 ProSoft Technology, Inc. (ProSoft) is committed to providing the most efficient and effective support possible. Before calling, please gather the following information to assist in expediting this process:...
  • Page 150: Return Material Authorization (Rma) Policies And Conditions

    MVI56-MCM ♦ ControlLogix Platform Support, Service & Warranty Modbus Communication Module North America/Latin America (excluding Brasil) (location in California) +1.661.716.5100, support@prosoft-technology.com (mailto:support@prosoft- technology.com) Languages spoken include: English, Spanish For technical support calls within the United States, an after-hours answering system allows pager access to one of our qualified technical and/or application support engineers at any time to answer your questions.
  • Page 151: Product

    Support, Service & Warranty MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 9.2.2 Procedures for Return of Units Under Warranty: A Technical Support Engineer must approve the return of Product under ProSoft's Warranty: a) A replacement module will be shipped and invoiced. A purchase order will be required.
  • Page 152: Limited Warranty

    MVI56-MCM ♦ ControlLogix Platform Support, Service & Warranty Modbus Communication Module 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, and all related services provided by ProSoft, including maintenance, repair, warranty exchange, and service programs (collectively, "Services").
  • Page 153: Product

    Support, Service & Warranty MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module b) This Warranty does not cover the failure of the Product to perform specified functions, or any other non-conformance, defects, losses or damages caused by or attributable to any of the following: (i) shipping; (ii) improper installation or other failure of Customer to adhere to ProSoft's specifications or instructions;...
  • Page 154: Product

    MVI56-MCM ♦ ControlLogix Platform Support, Service & Warranty Modbus Communication Module a) Any documentation included with Product purchased from ProSoft is protected by copyright and may not be duplicated or reproduced in any form without prior written consent from ProSoft.
  • Page 155 Support, Service & Warranty MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module 9.3.7 Time Limit for Bringing Suit Any action for breach of warranty must be commenced within 39 months following shipment of the Product. 9.3.8 No Other Warranties Unless modified in writing and signed by both parties, this Warranty is...
  • Page 156 MVI56-MCM ♦ ControlLogix Platform Support, Service & Warranty Modbus Communication Module Page 156 of 159 ProSoft Technology, Inc. July 24, 2008...
  • Page 157: Index

    Command Control Blocks • 95 General Specifications • 86 Command Error Codes • 63 Guide to the MVI56-MCM User Manual • 7 Command List Entry Errors • 65, 104 Communication Status (Ports 1 and 2) • 72 Configuration as a Modbus Master • 25 Hardware Specifications •...
  • Page 158: Product

    Redisplaying the Current Page • 78, 79 MVI56-MCM Database Definition • 111 Reference • 7, 85 MVI56-MCM Status Data Definition • 66, 67, 111, 119 Removing Timing Marks in the Data Analyzer • 74 MVI56-MCM Status Data Definition as a Master • 61 Required Hardware •...
  • Page 159: Prosoft Technology, Inc

    Index MVI56-MCM ♦ ControlLogix Platform Modbus Communication Module Setting Jumpers • 11, 12 Write Block • 91 Skipping 500 Registers of Data • 78 Write Configuration • 97 Slave Configuration • 56 Write Floats to Slave Device • 42 Slave Driver • 101 Write Holding Register 4xxxx (Modbus Function Code Slave Status Blocks •...

Table of Contents