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

3.8
L_CanDSxOpenNodeGuarding − Initialisation of "Node Guarding"
Function library LenzeCanDSxDrv.lib
Functions/function blocks
3−10
L
LenzeCanDSxDrv.lib EN 1.2
3.8
L_CanDSxOpenNodeGuarding − Initialisation of "Node Guarding"
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 "Node Guarding" 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_CanDSxNodeGuarding.
(
^ 3−11)
·
Use the function L_CanDSxCloseNodeGuarding to deactivate the "Node Guarding"
monitoring mechanism.
(
^ 3−14)
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_CanDSxOpenNodeGuarding (bOpen);
Transfer parameters
Data type
Information/possible settings
bOpen
Bool
Initialisation of the "Node Guarding" monitoring mechanism.
TRUE The "Node Guarding" monitoring mechanism of the CanDSx driver is initialised.
Return value
Data type
Value/meaning
Bool
Status
TRUE The "Node Guarding" monitoring mechanism has been initialised.
FALSE A The "Node Guarding" monitoring mechanism has not been initialised.
– Remedy: Call the function with transfer parameter bOpen = TRUE.
or
B The PLC has not been configured as "master with Node Guarding".
– Remedy: Set code C0352 to "2" to configure the PLC as "master with Node
Guarding".
Example
Calling the function in ST:
bReturnOpenNodeGuarding :=
L_CanDSxOpenNodeGuarding(bOpen:= TRUE);