ifm
System Manual
ecomat
mobile
PDM360NG (CR1080, CR1081, CR9042) Target V01
2011-07-28
CAN in the PDM360
CAN POUs to CANopen
253
Master at runtime
Reset of all configured slaves on the bus at the system start................................................... 253
Polling of the slave device type................................................................................................. 253
Configuration of all correctly detected devices ......................................................................... 254
Automatic configuration of slaves ............................................................................................. 254
Start of all correctly configured slaves ...................................................................................... 254
Cyclical transmission of the SYNC message............................................................................ 254
Nodeguarding with lifetime monitoring...................................................................................... 254
Heartbeat from the master to the slaves................................................................................... 254
Reception of emergency messages.......................................................................................... 254
8019
Here you find information about the functionality of the CANopen master libraries at runtime.
The CANopen master library provides the CoDeSys application with implicit services which are
sufficient for most applications. These services are integrated for users in a transparent manner and
are available in the application without additional calls. In the following description the function blocks
for using the network diagnostic, status and EMCY functions are described. For this, the
library
ifm_CANopen_NT_Vxxyyzz.LIB
is accessed.
Services of the CANopen master library:
Reset of all configured slaves on the bus at the system start
8020
To reset the slaves, the NMT command "Reset Remote Node" is used as standard explicitly for every
slave separately. (NMT stands for
N
etwork
M
anagemen
t
according to CANopen. The individual
commands are described in the CAN document DSP301.) In order to avoid overload of slaves having
less powerful CAN controllers it is useful to reset the slaves using the command "All Remote Nodes".
Reset
all
configured slaves:
►
Call FB CANOPEN_NMTSERVICES (
→
):
- NODE = 0
- NMTSERVICE = 3
Reset one slave
individually
:
►
Call FB CANOPEN_NMTSERVICES:
- NODE = node number
- NMTSERVICE = 3
Polling of the slave device type
8021
Polling of the slave device type using SDO (polling for object 100016) and comparison with the
configured slave ID:
Indication of an error status for the slaves from which a wrong device type was received. The request
is repeated after 0.5 s if ...
- no device type was received
- AND the slave was
not
identified as optional in the configuration
- AND the timeout has
not
elapsed.