ProSoft Technology MVI56E-MCMR User Manual

Page 118

Advertising
background image

Ladder Logic

MVI56E-MCMR ♦ ControlLogix Platform

User Manual

Modbus Communication Module with Reduced Data Block

Page 118 of 225

ProSoft Technology, Inc.

May 13, 2014

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 118) Read Data and Write Data

STATUS

MCMRSTATUS (page
119)

Status information in each read block

CONTROL

MCMRCONTROL (page
120)

Command Control Object

UTIL

MCMRUTIL (page 118)

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

Advertising