Function library lenzecandsxdrv.lib, Functions/function blocks – Lenze DDS Global Drive PLC Developer Studio User Manual
Page 18

3.5
L_CanDSxOpenHeartBeat − Initialisation of "Heartbeat"
Function library LenzeCanDSxDrv.lib
Functions/function blocks
3−6
L
LenzeCanDSxDrv.lib EN 1.2
3.5
L_CanDSxOpenHeartBeat − Initialisation of "Heartbeat"
Function
The CANopen communication profile (CiA DS301, version 4.01) specifies two optional monitoring
mechanisms to ensure the functionality of the system bus devices: "Heartbeat" and "Node
Guarding".
This function is used to initialise the "Heartbeat" monitoring mechanism of the CanDSx driver.
·
For initialisation, the transfer parameter bOpen must be TRUE.
·
The actual monitoring is implemented by means of the FB L_CanDSxHeartBeat.
(
^ 3−7)
·
Use the function L_CanDSxCloseHeartBeat to deactivate the "Heartbeat" monitoring
mechanism.
(
Note!
It is not permitted to use the two monitoring mechanisms simultaneously!
If the transmission cycle time selected for the "Heartbeat" message of the bus device to be
monitored is unequal zero, the "Heartbeat" mechanism will have priority over the "Node Guarding"
mechanism.
Declaration
BOOL
L_CanDSxOpenHeartBeat (bOpen);
Transfer parameters
Data type
Information/possible settings
bOpen
Bool
Initialisation of "Heartbeat".
TRUE The "Heartbeat" monitoring mechanism of the CanDSx driver is initialised.
Return value
Data type
Value/meaning
Bool
Status
TRUE The "Heartbeat" monitoring mechanism has been initialised.
FALSE A The "Heartbeat" monitoring mechanism has not been initialised.
– Remedy: Call the function with transfer parameter bOpen = TRUE.
or
B The function L_CanDSxOpenNodeGuarding was activated before ("Node
Guarding" is activated).
– Remedy: Call the function L_CanDSxCloseNodeGuarding with transfer
parameter bClose = TRUE (deactivate "Node Guarding").
Example
Calling the function in ST:
bReturnOpenHeartBeat :=
L_CanDSxOpenHeartBeat(bOpen:= TRUE);