System bus (can) for lenze plc devices, Lenzecandsxdrv.lib function library – Lenze DDS System bus CAN for PLC User Manual

Page 168

Advertising
background image

11.10

L_CanDSxNodeGuarding − carrying out a "Node guarding"

System bus (CAN) for Lenze PLC devices

LenzeCanDSxDrv.lib function library

11−12

L

PLC−Systembus EN 2.0

11.10

L_CanDSxNodeGuarding − carrying out a "Node guarding"

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 "Node guarding" mechanism.

·

This monitoring mechanism first has to be initialised in the CanDSx driver using the function
L_CanDSxOpenNodeGuarding.

(

^ 11−11)

L_CanDSxNodeGuarding

tNodeGuardTime

wDrvNr

byNodeAddr

bRun

CTRL

nState

NMT Slave

(Node address =

)

byNodeAddr

System bus

(CAN)

š

byNodeLifeTimeFactor

1.

2.

š

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

Activating the "Node guarding".

TRUE Monitoring is activated.

·

The FB now sends a "remote transmission request" telegram in the
transmission cycle set via tNodeGuardTime to the node with the node address
byNodeAddr

and waits for a corresponding response. If it is not effected within

the "NodeLifeTime" monitoring time, the FB outputs a corresponding status at
the output nState.

tNodeGuardTime

Time

Transmission cycle of the remote transmission request telegram.

·

Time interval in which the PLC sends a status request to the node to be monitored (cyclic
polling).

·

This setting has to correspond to the "Guard Time" set in the PLC to be monitored (C0382).

byNodeLifeTimeFactor

Byte

Factor for the so−called "NodeLifeTime".
"NodeLifeTime" = byNodeLifeTimeFactor

ž tNodeGuardTime

·

If the node to be monitored does not respond to the status request of the PLC within the
"NodeLifeTime", a "Node Guarding" event is actuated (nState = −10).

·

This setting has to correspond to the "NodeLifeTimeFactor" set in the PLC to be monitored
(C0383).

Advertising