IFM Electronic Ecomat Mobile Series System Manual page 97

Smart controller
Table of Contents

Advertisement

CAN in the ecomatmobile controller
Starting the network with START_ALL_NODES
If the network is not automatically started with GLOBAL_START of the function
CANx_Master_STATUS (→ page 123), it can be started at any time, i.e. every node one after the
other. If this is not requested, the option is as follows:
► Set the function input START_ALL_NODES of the function CANx_Master_STATUS to TRUE.
START_ALL_NODES is typically set by the application program at runtime.
>
If this input is set, nodes with status 98 (see above) are started. However, the PDOs for these
nodes remain deactivated.
Initialisation of the network with RESET_ALL_NODES
The same reasons which apply to the command START_ALL_NODES also apply to the NMT
command RESET_ALL_NODES (instead of RESET_NODES for every individual node).
► To do so, the input RESET_ALL_NODES of the function CANx_MASTER_STATUS (→ page 123)
must be set to TRUE.
>
This resets all nodes once at the same time.
Access to the status of the CANopen master
You should poll the status of the master so that the application code is not processed before the IO
network is ready. The following code fragment example shows one option:
Variable declaration
VAR
FB_MasterStatus:= CR0020_MASTER_STATUS;
:
END_VAR
program code
If
FB_MasterStatus. NODE_STATE = 5 then
<application code>
End_if
By setting the flag TIME_OUT_STATE in the array NODE_STATE_SLAVE of the function
CANx_Master_STATUS (→ page 123) the application can react and, for example, jump the non
configurable node.
The object directory of the CANopen master
In some cases it is helpful if the CAN master has its own object directory. This enables, for example,
the exchange of data of the application with other CAN nodes.
The object directory of the master is generated using an EDS file named
CRnnnnMasterODEntry.EDS during compilation and is given default values. This EDS file is stored
in the directory CoDeSys Vn\Library\PLCconf. The content of the EDS file can be viewed via the
button [EDS...] in the configuration window [CAN parameters].
Even if the object directory is not available, the master can be used without restrictions.
ifm
System Manual
ecomatmobile
SmartController (CR2500) V05
ifm CANopen library
97

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ecomat 100 cr2500

Table of Contents