![ProSoft MVI56E-MCMR Скачать руководство пользователя страница 116](http://html1.mh-extra.com/html/prosoft/mvi56e-mcmr/mvi56e-mcmr_user-manual_1618870116.webp)
Ladder Logic
MVI56E-MCMR ♦ ControlLogix Platform
User Manual
Modbus Communication Module with Reduced Data Block
Page 116 of 223
ProSoft Technology, Inc.
4.1
MVI56E-MCMR User Defined Data Types
This section describes the controller tags that are defined in the example logic to
interface with the module. The user can extend these tags to meet the
specifications required for their application, If additional data transfer is required.
4.1.1 Module Status Data and Variables (MCMRModuleDef)
All status and variable data related to the MVI56E-MCMR is stored in a user
defined data type. An instance of the data type is required before the module can
be used. This is done by declaring a variable of the data type in the Controller
Tags Edit Tags dialog box.
The following table describes the structure of this object.
Name
Data Type
Description
DATA
MCMRDATA (page 116) Read Data and Write Data
STATUS
MCMRSTATUS (page
117)
Status information in each read block
CONTROL
MCMRCONTROL (page
118)
Command Control Object
UTIL
MCMRUTIL (page 116)
Backplane Object
This object contains objects that define variables for the module and status data
related to the module. Each of these object types is discussed in the following
topics of the document.
Backplane Object (MCMRUTIL)
The
MCMRUTIL
object stores all the variables required for the data transfer
operation between the module and the controller. The LastRead data member is
used as the handshaking byte to indicate the arrival of new data from the
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
The other members of the object are utilized in the ladder logic to assist in the
data transfer operation.
Module Data Object (MCMRDATA)
Data for the module is stored in two controller tags for the example ladder logic.
The read data (data transferred from the module to the processor) is stored in the
controller tag
MCMR.R
EAD
D
ATA
[ ]
. The write data (data transferred from the
processor to the module) is stored in the controller tag
MCMR.W
RITE
D
ATA
[ ]
.
Separate tags can be constructed for each data type used by the controlled
devices and for each device.
Name
Data Type
Description
ReadData
INT[600]
Data read from module
WriteData
INT[600]
Data to write to module