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

Page 165

Advertising
background image

System bus (CAN) for Lenze PLC devices

LenzeCanDSxDrv.lib function library

11.7

L_CanDSxHeartBeat − carrying out a "Heartbeat"

11−9

L

PLC−Systembus EN 2.0

Outputs

Data type

Information/possible settings

nState

Integer

Status

300 FB is deactivated (bRun= FALSE).

127 Node to be monitored is in the Pre−operational CAN status.

5 Node to be monitored is in the Operational CAN status.

4 Node to be monitored is in the Stopped CAN status.

0 Node to be monitored is in the Boot−up CAN status, or the FB is not called up.

−5 The monitoring time tHeartBeatConsumerTime is set to the value "0".

−10 "Heartbeat" event:

No "Heartbeat" message was received from the node to be monitored within the
monitoring time tHeartBeatConsumerTime.

−12 The node address set (byNodeAddr) is invalid.

−120 The monitoring mechanism has not been initialised in the CanDSx driver.

·

Initialise the monitoring mechanism using the function
L_CanDSxOpenHeartBeat.

−121 The set driver number (wDrvNr) is invalid.

Settings required for the PLC to be monitored

(valid for 9300 Servo PLC, Drive PLC, ECSxA as of V6.2)

The following settings are required for the PLC to be monitored, thus causing the PLC to take over
the function of the "Heartbeat producer":

1. Set code C0352 in the PLC to be monitored to the value "3" to configure the corresponding

PLC as a "slave and heartbeat producer":

Code

LCD

Possible settings

Information

Lenze

Selection

C0352 CAN mst

0

System bus: master/slave
configuration of the PLC

0

Slave (boot−up not active)

1

Master (boot−up active)

2

Master with node guarding
(SyncReceived no longer possible)

3

Slave and heartbeat producer

4

Slave with node guarding

2. Set the time interval for sending the "Heartbeat" message in the PLC to be monitored via

C0381; according to the bus load, we recommend a setting in the range of 200 ... 2000 ms:

Code

LCD

Possible settings

Information

Lenze

Selection

C0381 HeartProTime

0

System bus: heartbeat (slave):
heartbeat producer time

0

{1 ms}

65535

3. Set code C0003 in the PLC to be monitored to the value "1" to save the effected changes safe

against mains failure.

4. Set code C0358 in the PLC to be monitored to the value "1" to carry out a CAN reset node.

– Alternatively, the CAN reset node can also be carried out by mains switching.

After carrying out the CAN reset node, the PLC to be monitored as a "heartbeat producer"
continuously sends the "Heartbeat" telegram via the system bus within the time interval set under
C0381. Then, by means of this FB, the "heartbeat" monitoring can be activated within the monitoring
PLC.

Advertising