2 explicit services of the canopen library, 3 starting the canopen network, Explicit services of the canopen library – Lenze PLC Designer PLC Designer (R2-x) CANopen for Runtime Systems User Manual

Page 11: Starting the canopen network

Advertising
background image

L-force | PLC Designer - CANopen for Runtime Systems

CANopen-Master library

10

DMS 2.0 EN 05/2009 TD29

2.3.2 Explicit services of the CANopen library

In addition to the implicit services described above, the CANopen library provides the following
functions:

• Indication of the recently received PDOs via a flag which can be removed by the

Standard

application.

• Application-triggered transmission of remote telegrams for receive-PDOs

Standard

• Application-triggered transmission of SDO objects to slaves

Standard

• Application-triggered reset of slaves with subsequent reconfiguration of slaves

Standard

• Specifically still possible: The application can send and directly receive own CAN

messages to/from the bus. (Layer 2)

Standard

2.3.3 Starting the CANopen network

After a project download to the PLC or after a reset of the application the CAN network will be re-
started by the master.

The restart always is done with the same sequence of actions:

• All slaves are reset, except they are marked in the configurator as not to be reset. Resetting is

done singly by the NMT-command „Reset Node“ (0x81), always with the NodeID of the slave.
Exception: the application has set flag „bUseResetAllNodes“; in this case the command for
restarting the network is used once with NodeID 0, „Reset All Nodes“.

• All slaves get configured. For this purpose initially object 0x1000 of the slave gets polled. If the

slave responds within the wait time of 0,5 seconds, the next configuration SDO will be sent. If a
slave is marked “optional” and does not respond to the request within the wait time, it will be
marked as “not existent” and no further SDOs will be sent to it. If a slave responds on the request
for object 0x1000 with another type than configured in the lower 16 bits, it will be configured
nonetheless, but marked as wrong type.

• All SDOs (including the polling for object 0x1000) are sent repeatedly until an answer of the slave

is detected within the wait time. The application can watch the boot-up of the particular slaves and
react if necessary. (see below)

• If the master has configured a heartbeat time unequal 0, the generation of the heartbeat will start

immediately after the start of the master PLC.

• After all slaves have received their configuration SDOs, the nodeguarding will be started for those

slaves that have been configured to be guarded.

• If the master has been configured for automatic startup, now each slave will be started individually

by the master. For this purpose the NMT command “Start Remote Node“ (0x1) is used. If the
application sets the flag „bUseStartAllNodes“, the command will be used with NodeId 0 and thus all
slaves will be started with „Start all nodes“.

• At least once all configured Tx-PDOs (for the slaves these are the Rx-PDOs) will be sent. (It is

always on the application to send RTRs for RTR-PDOs. For this purpose a method of the Rx-
PDOs is available.)

Advertising