Set Up: Modbus TCP/IP Multi Client/Server Enhanced Network Interface Module for ControlLogix
Articles,  Blog

Set Up: Modbus TCP/IP Multi Client/Server Enhanced Network Interface Module for ControlLogix

Welcome to another edition of Prosoft Technology video training. In this edition, I’ll be setting up the MVI56E-MNETC as a client and a server on a Modbus TCP/IP network. The MVI56E Modbus TCP/IP Multi Client-Multi Server Communication Module for the ControlLogix platform allows Rockwell Automation ControlLogix Programmable Automation Controllers to interface easily with multiple Modbus TCP/IP protocol-compatible instruments and devices. The MNETC module was created to improve performance on a Modbus TCP/IP network, by supporting up to 30 clients and 10
servers with 16 commands for each client. In this
video I’ll go over how to import and modify the ad on instruction in RS Logix
5000. Set up and configure the module in ProSoft Configuration Builder and
set up some commands. These are the IP addresses for the MVI
56E MNETC module I have in my rack. Along with t he ethernet bridge I’ll be using. My PC is connected to the rack through a switch. I’ll set up the MNETC as a client and
configure a read command to a PLC and a write command to a drive on the MBTCP network. I’ll also go over the MNETC’s server functions. To begin, you need to decide where the module will reside in your ControlLogix chassis and install it. The MVI56E-MNETC is hot-swappable so this can be done with the PLC powered up. Once the module is seated in the rack, take note of the slot number that the MNET occupies as you will need this info as you go through the setup and configuration process. With the MVI56E-MNETC installed in the ControlLogix chassis, I’ll open up RSLogix 5000 to configure the ControlLogix CPU. I can open and edit an existing project or create a new project; I’ll create a new project, so, I’ll define the processor, I have an Allen-Bradley 1756-L63 ControlLogix controller, select the revision (in order to use the add-on instruction you’ll need to set the revision to 16 or later), Give it a name, identify the chassis type and select the slot number that the processor occupies in the rack. I have a project folder already set up where I’ll save the project files, but the default location is fine. Once the project is created I’ll expand the I/O configuration in the Controller Organizer, right-click on the 1756-backplane and select “New module”. I’ll add my bridge module, which is an EN2T. I’ll give the module a name; enter the IP address and the slot number. Next, I’ll create another new module, I’ll filter by “Other” and choose a generic 1756 module and click “Create”. In the new module window, enter a name; I’m just going to name it “MNETC”. I can also add an optional description. It’s important to set the Comm Format to Data-INT so that the module can communicate over the backplane. The Slot number should be the slot the MNET occupies in the rack, and Connection Parameters should be set as seen here, these are the standard settings for the ControlLogix chassis. If you need to change the RPI, you can do so here. I’m just going to leave it at 5ms. Next, we’ll import the MVI56E-MNETC Add-on Instruction. You can download a copy of the AOI (a .LX5 file) by going to our web site at Or you can get it off the product CD that it comes with the module. In the Controller Organizer window, expand Tasks>Main Task>Main Program, and double-click on Main Routine. Once the Main Routine opens, right click on rung 0 and select “Import Rung”. Then browse for and select the .LX5 AddOn rung file, and click Import. When the import Configuration window opens, select Controller Tags and change the slot number by modifying the Local:slot# field to match the number of the slot where the MVI56E-MNETC is residing. In this case, I have the module in slot 2 of the rack so I will change each field to slot 2. Once this is done click “OK”, return to Main Routine and delete rung 0. The User Defined Data Types imported with the AddOn rung are now listed in the Data Types section of the Controller Organizer tree. Our configuration for the MVI56E-MNETC should be ready to download. I’ll go up to Communication and select Who Active. On the Who Active screen I’ll look in my Ethernet connections, locate the Ethernet module in the ControlLogix rack, open up the backplane, and select the processor and click Download. Click Download again on the download screen and the CPU will receive the configuration. Once the download is complete, we are giving the option to place the controller in Remote Run mode, I’ll do that. If the option does not come up automatically, go over to the Controller Status bar, and be sure that your online and select
Run Mode. The next task is to configure how the
module will communicate with the Modbus TCP IP devices so to do this all open up PCB with a new project and add the MVI56E-MNETC module to the project. Select the DEFAULT MODULE in the tree view, and right-click to open a shortcut menu. Select Choose Module Type , which opens the Choose Module Type dialog box. Under Product Line Filter, select the MVI56E. In the SELECT MODULE TYPE dropdown list, select MVI56E-MNETC, and then click OK to save your settings and return to the ProSoft Configuration Builder window. You can see that the configuration pane now has a long list of MNETC clients. Now is a good time to save the project and give it a name. The first thing to do is assign the temporary IP address. On the shortcut menu, right click on the module to choose diagnostics. This
should open the Diagnostics dialog box. If you get back an error saying PCB couldn’t connect to the connect to the IP address, click the Set UP Connection button to browse for the module IP address. On the Connection Setup dialog box, with Ethernet set as the connection type, hit “Test Connection” to verify that the module is accessible with the current settings. As you can see here, the module’s default IP address is and unless your network is on that same subnet, you’ll need to assign a temporary IP to connect to the module. Click the BROWSE DEVICE(S) button to open the PROSOFT DISCOVERY SERVICE. Select the module, then right click and choose ASSIGN TEMPORARY IP. Choose an unused IP within your subnet, and then click OK. If the temporary IP does not appear in the Ethernet address field automatically, just manually enter it in. Now I can connect to the module. To make changes to the Module Parameters:
1. Click on the plus sign next to the icon to expand module information. 2. Double-click the icon to open the EDIT dialog box. 3. To edit a parameter, select the parameter in the left pane and make your changes in the right pane. 4. Click OK to save your changes. Right now, we’re looking at module properties; as you can see, the read registers start at address 0, and the write registers start at address 1000. Both have a length of 600 words. We’ll need this information when we set up the client commands. Just to be clear, this is only the default configuration, you can edit the read and write data to start wherever you like for as many words as you like up to the database’s 10,000 limit. Just take care that you’re read and write addresses don’t overlap. Here is where we can edit the module’s server functions. I’ll go over these later. I’ll create a couple of client commands: one Write command and one Read command; each going to a different device on the network. Expand the Client 0 Commands section and double click on the icon. This will open the Client Commands Editor. To add a command, just click on AddRow. To edit the command, double click on the row itself, or click the EditRow button. First, I’ll create a Write command, so I’ll just go down the list. I’ll set Enable to “Yes”, for Internal Address I’ll set it to 1000, b/c if I look at my module configuration, I can see the write register start is 1000. I’ll leave Poll Interval at 0 (and as you can see, this is the minimum interval between continuous commands). And for Register Count I’ll enter 10 (registers here refer to 16bit words). No Change for Swap Code. The Node IP Address is where you enter the IP address of the device you are addressing the command to. For this example, I’ll be sending a write command to a drive on the MBTCP network at Service Port should be left at port 502. Slave address can just be left at 1, and Modbus Function is where I’ll enter my function code, which in this case will be 16, to write multiple holding registers. MB Address in Device specifies the starting Modbus register of bit address in the slave to be used by the command. For simplicity sake I’m going set it to 1000 so that it mirrors the address of the module database and you should know that the function
code will add 40001 to this value in the Modbus device. So the data will show up in the device at address 41001. There is also a Comment section where you can write a comment for your own documentation. Now, I’ll quickly set up a second command to read holding registers from a PLC. I’ll enable the command, leave internal address set to 0, since this is where the read register start is. I’ll set Reg Count to 10, that’s 10 16-bit words, Node IP will be the IP of the PLC I’m addressing the command to, I’ll enter a function code of 03 to Read Holding Registers, and the Modbus address I’ll set to begin on 0. Again, the FC will add 40,001 to this value. That should do it. To complete the configuration of the module I’ll set a permanent IP address. The temporary IP will allow us to connect to the module but it will be reset to the default IP whenever the module reboots. The permanent address is permanent. Go to the Ethernet settings under the module, double-click, and put in the IP address that your network administrator gives you. In order for the module to use the settings I’ve just configured, I must download (copy) the updated Project file from my PC to the module. In the tree view, right-click on the MVI56E-MNETC module and select DOWNLOAD from PC to Device. This opens the DOWNLOAD dialog box. Select Ethernet as the connection type. Notice that the Ethernet address field contains the temporary IP address I assigned in the previous step. ProSoft Configuration Builder will use the temporary IP address to connect to and configure the module. Once the module reboots, the module will be set to the permanent IP address. Click TEST CONNECTION to verify that the temporary IP address is working. If the connection succeeds, click DOWNLOAD to transfer the Ethernet configuration to the module. The module will reboot using the new configuration. As an alternative to connecting to the MNETC through Ethernet, you can also use CIPconnect. This meathod uses the 1756 Ethernet Bridge in the local rack to communicate with the module over the backplane. This could be handy if can’t connect to the MNETC module directly for instance if you’re Ethernet IP network is not on the same subnet as your Modbus TCP network. To use CIPconnect, on the download window, choose 1756-ENBT as the connection type, the default path will appear in the CIPconnect field. Click the CIP path Edit button to open the CIPconnect Path Editor dialog box. Here you can define the path between the PC and the MVI56E-MNETC module; If the MVI56E-MNETC is located in the same rack as the ENBT module, if the MNETC is located in the same rack
as the ENBT module than this is all you need. If the MNETC is in a remote rack, you would include that rack as well using the Add Rack button. Once I enter the IP for the bridge
module… and specify the slot number of the MNETC module; I’ll just click on Construct CIP Path to build the path in text format, and then OK to confirm the new path. Back on the Download window, click Test Connection to verify that CIP path is available. You will get a message telling you if it was successful. Click Download to download the configuration to the
module through the CIP path. At this point the client configuration for the MVI56E-MNETC module is complete. I’ll go back to RSLogix 5000 and open up the Controller Tags. I have a tag here called MNETC, this is the name I gave the module when I created the project in RSLogix. It’s not the default name for the tag, so this will be whatever name you gave the MNETC module. Under MNETC, expand MNETC.DATA and expand ReadDATA. The data from the read command we addressed to will appear here in MNETC.DATA>ReadData[0] through ReadData[9] because we specified a register count of 10 words. Staying in RSLogix, I’ll expand MNET.DATA>WriteData, and enter some values between writeData [0] and writedata [9]. The write command will write these values into the drive at and they will appear in the drive at Modbus address 41001-41010. That does it for the client commands. Another feature to point out is the ability to enable or disable commands from here in the controller tags. A disabled command has its bit in the MNETC.CONTROL.CmdControl.WriteCmdBits controller tag set to 0. It will be skipped during routine polling. An enabled command has its controller tag set to one (1) and is sent during routine polling. The state of these WriteCmdBits overrides whatever value is assigned to the Enable parameter in the configuration. by default the first two commands for
client 0 through client 9 are enabled and all other commands are disabled. you’ll have to be sure to go in and edit these tags to enable the commands. Keep this in mind. Now, back in PCB, I’ll go over the MNET Servers properties. As you can see, this is mostly database offset information that will be used by the module when accessed by external Clients, such as a SCADA systems or HMI stations. These offsets can be utilized to segment the database by datatype. The offset address corresponds to the address in the module’s internal database. Any value over 0 will enable these, otherwise, there is no offset. One thing to note, Float Start and Float Offset only kick in if Float Flag is enabled. For the vast majority of applications, this would not need to be enabled. You do not need this in order to send float information. It is only for very specific cases. The reason you might use an offset is that different data types, such as input registers and holding registers, have different Modbus Addresses in most Modbus devices, but in the MNETC they would be written to the same address in the database so and offset to one or the other is necessary to ensure that no data is overwritten. For the tutorial, I’m going to go to Holding Register Offset, and enter a value of 50, so any external Modbus clients that want to write or read holding registers from the MNET will read from 40001 and write to 41001 but actually be accessing database address 50 in read data and write data in the module. I’ll download this to the module. Notice that I’m using the permanent IP address now. Now I’ll go back to RSLogix and open up the MNETC Data>Read Data, and look under address 50. This is where the data being read from the client device will appear. We set an offset of 50 in PCB and so even though the Client is writing to address 0, its actually coming into address 50 in the MNETC database. We’ll try a write command while we’re here, just open up write data, go down to address 50 and enter some values. This data will be written starting at address 41001 in the client device. That should do it for this training session. If you have any questions about the configuration process in PCB, the user manual for the MVI56E-MNETC goes into great detail on the settings and options available for the module. You can also visit our website or give us a call. Happy training.

One Comment

  • Andrei K

    Hi, I'm currently configuring MVI56E-MNETC with AB Control Logix L73. I got a query regarding communication timeout when the slave lose comm's. The situation is that after comm's failure, the previous data on assigned registers keep the values when the slave last got comm's. I wish to seek your help on how to clear all the data to "0" when a slave lose comm's. Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *