Command Control Management on the MVI56E-MNET with a Custom AOI

The MVI56E-MNET is one of ProSoft Technology's InRax solutions connecting Modbus TCP/IP devices to Allen Bradley's 1756 platform. The card can operate as a Modbus Client and/or Server, simultaneous, making it an ideal solution to connect to multiple Modbus TCP/IP field devices. It comes with a number of features, one of which is the ability to load and unload Modbus commands when operating as a Modbus TCP/IP client. This feature is referred to as Command Control and will be explored in this post.

A generic square placeholder image with rounded corners in a figure.
A typical network architecture.

A Modbus TCP/IP network will comprise of devices designated as Clients or Servers. The Client is initiates communication and, hence, is responsible for send out requests to either Read data from or Write data to the Servers. These request are known as Modbus Commands and the transferring of data is known as polling. The MVI56E-MNET allows you to configure 100 commands to poll a single or multiple Servers. These commands can be configured to poll continuously or conditionally if any data associated with that command changes. Command Control (and the Event Command feature not explored here) allows you to bypass the ordinary operation of the unit by loading specific commands into the command execution queue regardless of their configured state.

A generic square placeholder image with rounded corners in a figure.
Command Control on the MVI56E-MNET

The most useful application of command control is when you have multiple commands to multiple devices and you intend to control command execution from the PLC. Command control will allow you to disable the ordinary operation of the commands and load them for execution on demand. This allows the operator to control things like network traffic overhead, request loading at the servers and database data management.

Custom Command Control AOI

To make the implementation of this feature easier, I have created a Custom AOI that will allow you to load commands into the execution queue without having to worry about cycling the load process (on the current MNET_AOI you can only load 6 commands at a time) or indexing. The AOI also has an error checking mechanism that allows you to monitor if the loaded commands where executed without error. You can download that AOI Here. Some caveats, you must be running v1.62 of the Add-On for MVI56-MNET and MVI56E-MNET modules, you must be mapping the Client and Command status values to the Read Data Block of the unit.

The first thing you want to do to implement this AOI is to adjust your configuration in ProSoft Configuration Builder (PCB). You want to change the Error Pointer configuration to a location in the Read Block of the module. This may require adjusting the size of the block to accommodate the status data in addition to all the Modbus data currently in use. 

A generic square placeholder image with rounded corners in a figure.
Implementing Client and Command Offsets

Once you have the configuration sorted, you want to import the Command Control AOI into Studio5000. You want to run it in the same rung that you are running the MVI56E-MENT AOI (AOI56_MNETv1.62 or higher). Point to the correct tags based on the status configuration in PCB and your existing MNET Tags and you are good to go.

A generic square placeholder image with rounded corners in a figure.
Importing the AOI into Studio5000/RSLogix5000

Test the logic by loading commands into the execution queue. Specify a start index and command count. Trigger the AOI by changing the TRIGGER bit to HIGH and monitor the DN bit and the ERR bit for successful execution or an error respectively.

A generic square placeholder image with rounded corners in a figure.
Loading command into the execution queue.