Ladder logic, Module data object (dfcmmoduledef), 3 ladder logic – ProSoft Technology MVI69-DFCM User Manual

Page 35

Advertising
background image

Ladder Logic

MVI69-DFCM ♦ CompactLogix or MicroLogix Platform

DF1 Interface Module

ProSoft Technology, Inc.

Page 35 of 117

November 3, 2008

3 Ladder

Logic

In This Chapter

™ Module Data Object (DFCMModuleDef)................................................ 35

™ Adding the Module to an Existing CompactLogix Project ...................... 38

™ Adding the Module to an Existing MicroLogix Project............................ 42

Ladder logic is required for application of the MVI69-DFCM module. Tasks that
must be handled by the ladder logic are module data transfer, special block
handling and status data receipt. Additionally, a power-up handler may be
needed to handle the initialization of the module's data and to clear any
processor fault conditions.

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 (DFCMModuleDef)

All data related to the MVI69-DFCM 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

BlockTransferSize

INT

60, 120 or 240

ReadData

INT[720]

Data read from MVI69-DFCM

WriteData INT[720]

Data

written to MVI69-DFCM

BP

DFCMBackplane

Variables for BP logic

ModuleStatus DFCM_STATUS Module

Status

BlockRequest

DFCMBlockRequest

Bits to request special blocks

ReadClock

DFCMClock

Time read from MVI69-DFCM

WriteClock

DFCMClock

Time written to MVI69-DFCM

CommandControl

DFCMCommandControlPorts

Used for Command Control operation

EventCommand DFCMEventCommandPorts Used for Event Command operation

SlavePollingControl DFCMSlavePollingControlPorts

Slave polling control

SlaveStatus

DFCMSlaveStatusPorts

Status codes for each slave

This object contains objects that define the configuration, user data, status and
command control data related to the module. Each of these object types is
discussed in the following topics of the document.

Advertising