7 l_candsxheartbeat - carrying out a "heartbeat, 7 l_candsxheartbeat − carrying out a "heartbeat, System bus (can) for lenze plc devices – Lenze DDS System bus CAN for PLC User Manual
Page 164: Lenzecandsxdrv.lib function library

11.7
L_CanDSxHeartBeat − carrying out a "Heartbeat"
System bus (CAN) for Lenze PLC devices
LenzeCanDSxDrv.lib function library
11−8
L
PLC−Systembus EN 2.0
11.7
L_CanDSxHeartBeat − carrying out a "Heartbeat"
Function block
Use this FB to cyclically monitor the CAN connection between the PLC and other system bus nodes
by means of the so−called "Heartbeat" mechanism.
·
Here the FB assumes the function of the "heartbeat consumer" and therefore has to be called
up on the monitoring PLC.
·
The "Heartbeat" monitoring mechanism first has to be initialised in the CanDSx driver using
the function L_CanDSxOpenHeartBeat.
(
^ 11−7)
L_CanDSxHeartBeat
tHeartBeatConsumerTime
wDrvNr
byNodeAddr
bRun
CTRL
nState
Heartbeat producer
(Node address =
)
byNodeAddr
System bus
(CAN)
© © ©
FB call in:
o Cyclic task
(PLC_PRG)
Þ Time−controlled task
(INTERVAL)
o Event−controlled
task (EVENT)
o Interrupt task
Inputs
Data type
Information/possible settings
wDrv
Word
Driver number for the CAN interface of the PLC that is to be used
10 On board system bus (CAN)
byNodeAddr
Byte
Node address of the node to be monitored.
1...128 Node address
bRun
Bool
Activate "Heartbeat" monitoring.
TRUE Monitoring is activated.
·
The FB now continuously monitors whether the node with the node address
byNodeAddr
sends its "Heartbeat" message within the set monitoring time
tHeartBeatConsumerTime
via the system bus and outputs a corresponding
status at output nState.
tHeartBeat
ConsumerTime
Time
Monitoring time within which the "Heartbeat" message has to arrive from the node to be
monitored, so that no "Heartbeat" event (nState = −10) is actuated.
·
Adjust this time in accordance with the "heartbeat producer time", by which the node to be
monitored sends the "Heartbeat" message.
·
Recommended setting: 200 ... 2000 ms
·
Maximum setting: 65535 ms