ifm
System Manual
ecomat
mobile
SmartController (CR2500, CR2502) V05
CAN in the ecomatmobile controller
ifm CANopen library
97
Starting the network with START_ALL_NODES
If the network is not automatically started with GLOBAL_START of the function
CANx_Master_STATUS (
→
page
), 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
)
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
) 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.
Содержание Ecomat 100 ecomatmobile SmartController CR2500
Страница 1: ...System Manual SmartController CR2500 CR2502 CoDeSys V2 3 Target V05 7390667 00 03 2009 ...
Страница 6: ......
Страница 282: ......