Installation and commissioning DATAEAGLE 3XXX Classic
Chapter 7
– Diagnostic slave
7.3.2. Data exchange between PLC program and
diagnostic slave
The system functions SFC14 (DPRD_DAT) and SFC15
(DPWR_DAT) can be used to exchange data with the
diagnostic slave.
Accessing the diagnostic slave via PLC program:
Example: Reading diagnostic data and saving in DB100
starting from DBB0.
The memory address of the diagnostic slave (see hardware
configuration) is 256 (100hex). The error code will be saved
in MW0.
CALL "DPRD_DAT"
LADDR := w#16#100
RET_VAL:=MW0
RECORD :=P#DB100.DBX 0.0 BYTE 32
Example: Send data from DB101 starting from DBB0 to the
diagnostic slave.
The memory address of the diagnostic slave (see hardware
configuration) is 256 (100hex). The error code will be saved
in MW2.
CALL "DPWR_DAT"
LADDR := w#16#100
RECORD :=P#DB101.DBX 0.0 BYTE 32
RET_VAL:=MW2
Controlling the diagnostic slave:
The byte 0 of the transmitting data (DB101.DBB0 in the
above example) can be used to select the diagnostic entries
of the DATAEAGLE (Block 0 bis 255).
Set DBB1 to “1” to clear the counters of the display page.
Call block 255 to clear all counters*
2
Additional parameters can be transferred in DBB2 - DBB30
for some blocks.