6 l_candsxheartbeat - execution of "heartbeat, L_candsxheartbeat − execution of "heartbeat, Function library lenzecandsxdrv.lib – Lenze DDS Global Drive PLC Developer Studio User Manual

Page 19: 6 l_candsxheartbeat − execution of "heartbeat, Functions/function blocks

Advertising
background image

Function library LenzeCanDSxDrv.lib

Functions/function blocks

3.6

L_CanDSxHeartBeat − Execution of "Heartbeat"

3−7

L

LenzeCanDSxDrv.lib EN 1.2

3.6

L_CanDSxHeartBeat − Execution of "Heartbeat"

Function block

This FB is used for the cyclic monitoring of the CAN connection between the PLC and other system
bus devices by means of the "Heartbeat" mechanism.

·

The FB acts as "Heartbeat consumer". For this, it must be activated in the monitoring PLC.

·

Before the function is executed, the "Heartbeat" monitoring mechanism must be initialised in
the CanDSx driver by means of the function L_CanDSxOpenHeartBeat.

(

^ 3−6)

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

10 On board system bus (CAN)

byNodeAddr

Byte

Node address of the bus device to be monitored.

1 ... 128 Node address

bRun

Bool

Activation of "Heartbeat" monitoring.

TRUE Monitoring is activated.

·

The FB continuously monitors if the bus device with node address byNodeAddr
sends its "Heartbeat" message within the selected monitoring time
tHeartBeatConsumerTime via the system bus and outputs the corresponding
status at nState.

tHeartBeat
ConsumerTime

Time

Monitoring time within which the "Heartbeat" message is to be received from the bus device to be
monitored. Otherwise, a "Heartbeat" event ( nState = −10) will be activated.

·

Adapt the consumer time to the "Heartbeat producer time" in which the bus device to be
monitored sends the "Hearbeat" message.

·

Recommended setting: 200 ... 2000 ms

·

Maximum setting: 65535 ms

Advertising