Mnetrcoilarray, Mnetrutil, Modbus message data – ProSoft Technology MVI56E-MNETR User Manual

Page 84

Advertising
background image

MVI56E-MNETR ♦ ControlLogix Platform

Ladder Logic

Modbus TCP/IP Interface Module with Reduced Data Block

User Manual


Page 84 of 153

ProSoft Technology, Inc.

August 31, 2009

Name Data

Type

Description

MBOffset INT

The starting word address for the Modbus
data set

MBMsgLen

INT

The length of the Modbus message in bytes

mbdouble DINT

Reserved

MBCoil

MNETRCoilArray

Conversion from Bool to INT data types

MNETRCoilArray

Name Data

Type

Description

Boolean

BOOL[416]

Conversion from Bool to INT data types

3.1.4 MNETRUTIL

This data object stores the variables required for the data transfer between the
processor and the MVI56E-MNETR module. The following table describes the
structure of this object.

Name Data

Type

Description

LastRead

INT

Index of last read block

LastWrite

INT

Index of last write block

BlockIndex

INT

Computed block offset for data table

ReadDataSizeGet

INT

Gets ReadData Array Length.

WriteDataSizeGet

INT

Gets WriteData Array Length.

The LastRead tag stores the latest Read Block ID received from the module. The
LastWrite tag stores the latest Write Block ID to be sent to the module. The Block
Index tag is an intermediate variable used during the block calculation.

3.2

Modbus Message Data

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 Pass-Through Control Blocks (page 111) for a
full discussion on utilizing the pass-through option in an application.

Advertising
This manual is related to the following products: