100
model 2000 DeviceNet Module Manual (DN611/DN611A)
Chapter 5 Example of Use of the DN611
5
5.3 Slave Data Input/Output
(1) Structure declaration
TYPE
(*========================================================
Structure(User0)
========================================================*)
TypeP_LOCAL:STRUCT(*Local node parameter set value*)
PORT
:WORD; (*Port number*)
LOCAL_ADR
:WORD; (*Local node address*))
POL_TRMODE
:WORD; (*Polling transmission mode*)
SCAN_INTERVAL
:WORD; (*Scan interval*)
BGPOL_RATIO
:WORD; (*Background poll ratio*)
RETR_CNT
:WORD; (*Retransmission counter*)
TR_TIMING
:WORD; (*Transmission timing*)
END_STRUCT:
typeDEV:STRUCT(*Slave device parameter set value*)
PORT
:WORD; (*Port number*)
SLAVE_ADR
:WORD; (*Slave node address*)
VENDOR_ID
:WORD; (*Vendor ID*)
P_TYPE
:WORD; (*Product type*)
P_CODE
::WORD; (*Product code*)
SCANTYPE
:WORD; (*Scan type*)
POL_BK
:WORD; (*Poll background*)
BS_RCVSIZE
:WORD; (*Bit strobe receive size*)
POL_RCVSIZE
:WORD; (*Polling receive size*)
RESERVED1
:WORD; (*Reserved 1*)
POL_SNDSIZE
:WORD; (*Polling send size*)
RESERVED2
:WORD; (*Reserved 2*)
MAJOR_REV
:WORD; (*Major revision*)
NINOR_REV
:WORD; (*Minor revision*)
RESERVED3
:WORD; (*Reserved 3*)
RESERVED4
:WORD; (*Reserved 4*)
END_STRUCT:
typeP_SLAVE:STRUCT(*Slave device parameter set value*)
DEV
:ARRAY [0..9] OF typeDEV; (*Slave device parameter set value*)
END_STRUCT:
typeASREADDAY:STRUCT(*Slave device input data*)
RDAT
:ARRAY [0..5] OF WORD; (*Slave device input data*)
END_STRUCT:
typeASWRITEDAT:STRUCT(*Slave device output data*)
WDAT
:ARRAY [0..5] OF WORD; (*Slave device output data*)
END_STRUCT:
typeWRITEDAT:STRUCT(*Slave device output data*)
WPOL
:ARRAY [0..377] OF WORD; (*Slave device output polling data*)
WBS
:ARRAY[0..3]OF WORD; (*Slave device output BS data*)
END_STRUCT:
typeREADDAT:STRUCT(*Slave device input data*)
RPOL
:ARRAY[0..377]OF WORD; (*Slave device input data*)
END_STRUCT: