
Ladder Logic
MVI56E-MNETR ♦ ControlLogix Platform
User Manual
Modbus TCP/IP Interface Module with Reduced Data Block
Page 86 of 175
ProSoft Technology, Inc.
June 14, 2011
MNETRPASSTHRU
During pass-through operation, write messages received at the MVI56E-MNETR
server write messages through to the processor. It is the responsibility of the
ladder logic to process the message received using this feature. Two data
objects are required for this mode: a variable to hold the length of the message
and a buffer to hold the message.
This information is passed from the module to the processor using a block
identification code of 9996 if the unformatted pass-through mode (code 1) is
selected as the pass through mode in the configuration file. Word one of this
block contains the length of the message and the message starts at word 3.
Other controller tags are required to store the controlled values contained in
these messages. The Modbus protocol supports control of binary output (coils -
functions 5 and 15) and registers (functions 6 and 16).
Additionally, formatted message blocks can be sent from the module to the
processor when the pass-through option is selected using the format selection
(codes 2 or 3 in the MNET.CFG file). These blocks require less decoding than
the unformatted blocks. Refer to the user manual for a full discussion on utilizing
the pass-through option in an application.
The following table describes the structure of this object.
Name
Data Type
Description
MBControl1
CONTROL
Modbus pass thru message control
MBControl2
CONTROL
Modbus pass thru message control
MBMsg
SINT[500]
Message array
MBScratch
INT[3]
Temporary used ints
MBOffsetBit
INT
Offset bit in the message
MBOffset
INT
Start offset in the message
MBMsgLen
INT
The length of the Modbus message in bytes
mbdouble
DINT
Modbus double int tag
MBCoil
MNETRCOILARRA
Y (page 86)
Conversion from Bool to INT data types
MNETRCOILARRAY
Name
Data Type
Description
Boolean
BOOL[416]
Conversion from Bool to INT data types
MNETRIPADDRESS
Data structure to get and set the IP address of the module.
Name
Data Type
Description
IPGetTrigger
BOOL
Gets IP address
IPReceived
INT[4]
IP address received
IPSetTrigger
BOOL
Sets IP address
IPRequested
INT[4]
IP address set