2 nodeguarding / heartbeat errors, 3 node does not respond in configuration phase – Lenze PLC Designer PLC Designer (R2-x) CANopen for Runtime Systems User Manual

Page 19

Advertising
background image

L-force | PLC Designer - CANopen for Runtime Systems

CANopen-Master library

18

DMS 2.0 EN 05/2009 TD29

After having run through the configuration phase, the slave can change to the following states:

• It always changes to status 4, with the following exceptions: It is an optional slave not detected as

being available at the bus (request object 0x1000). It is available but on the request of object
0x1000 it has responded with a different type in the lower 16 bits than expected by the
configurator.

• It changes to status 97 if it is optional (option „Optional device“ in the CAN configuration) and has

not reacted on the SDO request for object 0x1000.

• It changes to status 98 if the device type (object 0x1000) does not match the configured one, after

nevertheless having got all configuration-SDOs. (Concerning starting the nodes in this case please
see add-on in 2.4.4.2, Boot-up of the network without automatic start.)

If the master is configured for automatic start, the slave will be started in status 4 (i.e. a „Start Node“-
NMT-messages will be generated) and the slave will automatically change to status 5. Status 5 is the
normal operation mode of the slave. If the master flag bUseStartAllNodes has been set by the
application, then it will be waited until all slaves are in status 4 and after that all slaves will be started
with NMT command „Start All Nodes“.

If the slave is in status 4 or higher, nodeguard messages will be sent to the slave, if nodeguarding is
configured.

2.4.3.2 Nodeguarding / heartbeat errors
In case of a nodeguarding timeout the variable nStatus of the node will be set to 99. In order to restart
the slave it is sufficient to reset the state of the node to 4. Therewith the node gets sent a „Start
communication“ and the CANopen-Master restarts communicating. For this the method „NodeStart“ is
used.

The master autonomously will do this as soon as the node restarts to react on nodeguard requests
and if option „Autostart“ is activated. Thereby the node will be reconfigured or just restarted,
depending on its status, which is contained in the response on the nodeguard requests.

If option Autostart is not activated, the application must call method NodeStart. Depending on the last
saved status (which always is transmitted with the Heartbeat-/nodeguard message), the node will be
restarted or reset.

For heartbeat errors the same proceeding is applicable.

2.4.3.3 Node does not respond in configuration phase
The application can time-guard the configuration phase of a slave and can set nodes, which remain in
status 3, to „TimeOut“. The application can achieve this by calling method „NodeSetTimeoutState“ of
the node (e.g. pCanOpenNode[0]. NodeSetTimeoutState();).

With NodeSetTimeoutState the status of the node will be set to 97. Thus subsequently the node can
be treated like an optional node.

As soon as all configured nodes have reached a status > 4, the master changes to status 5, normal
operation, where an exchange of process data via PDOs is done.

Advertising