Ladder logic, Module data object: mvi69101s_moduledef, User data objects - mv69101s_data – ProSoft Technology MVI69-101S User Manual
Page 45: 3 ladder logic

Ladder Logic
MVI69-101S ♦ CompactLogix or MicroLogix Platform
IEC 60870-5-101 Slave Communication Module
ProSoft Technology, Inc.
Page 45 of 149
March 16, 2009
3 Ladder
Logic
In This Chapter
Module Data Object: MVI69101S_ModuleDef....................................... 45
Adding the Module to an Existing CompactLogix Project ...................... 49
Adding the Module to an Existing MicroLogix Project............................ 53
Ladder logic is required for application of the MVI69-101S module. Tasks that
must be handled by the ladder logic are module data transfer, special block
handling and status data receipt.
The sample ladder logic, on the ProSoft Solutions CD-ROM, is extensively
commented, to provide information on the purpose and function of each rung. For
most applications, the sample ladder will work without modification.
3.1
Module Data Object: MVI69101S_ModuleDef
All data related to the MVI69-101S module 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 structure of the object is displayed in the following table.
Name Data
Type
Description
DATA MV69101S_DATA
CONTROL MVI69101S_CONTROL
STATUS MVI69101S_STATUS
UTIL MVI69101S_UTIL
This object contains objects that define user and status data related to the
module. Each of these object types is discussed in the following topics of the
document.
3.1.1 User Data Objects - MV69101S_DATA
These objects hold data to be transferred between the processor and the MVI69-
101S module. The user data is the read and write data transferred between the
processor and the module as "pages" of data. The size of each page will depend
on the Block Transfer Size parameter value (60, 120 or 240 words). The sample
ladder logic reserves 10 points for each data type to illustrate how to copy data
using the ReadData and WriteData arrays. The array size must be re-
dimensioned for each application.