ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
ifm CANopen library
93
Start the network
Here you find information about how to start the CANopen network.
After downloading the project to the controller or a reset of the application the master starts up the
CAN network again. This always happens in the same order of actions:
•
All slaves are reset unless they are marked as "No initialization" in the configurator. They are reset
individually using the NMT command "Reset Node" (81
16
) with the node ID of the slave. If the flag
GLOBAL_START was set via the function CANx_MASTER_STATUS (
→
page
), the
command is used once with the node ID 0 to start up the network.
•
All slaves are configured. To do so, the object 1000
16
of the slave is polled.
If the slave responds within the monitoring time of 0.5 s, the next configuration SDO is
transmitted.
If a slave is marked as "optional" and does not respond to the polling for object 1000
16
within the monitoring time, it is marked as not available and no further SDOs are
transmitted to it.
If a slave responds to the polling for object 1000
16
with a type other than the configured
one (in the lower 16 bits), it is configured but marked as a wrong type.
All SDOs are repeated as long as a response of the slave was seen within the monitoring time. Here
the application can monitor start-up of the individual slaves and possibly react by setting the flag
SET_TIMEOUT_STATE in the NODE_STATE_SLAVE array of the function
CANx_MASTER_STATUS.
•
If the master configured a heartbeat time unequal to 0, the heartbeat is generated immediately
after the start of the master controller.
•
After all slaves have received their configuration SDOs, guarding starts for slaves with configured
nodeguarding.
•
If the master was configured to [Automatic startup], all slaves are now started individually by the
master. To do so, the NMT command "Start Remote Node" (1
16
) is used. If the flag
GLOBAL_START was set via the function CANx_Master_STATUS, the command is used with the
node ID 0 and so all slaves are started with "Start all Nodes".
•
All configured TX-PDOs are transmitted at least once (for the slaves RX-PDOs).
•
If [Automatic startup] is deactivated, the slaves must be started separately via the flag
START_NODE in the NODE_STATE_SLAVE array or via the function input GLOBAL_START of
the function CANx_MASTER_STATUS.