• No results found

Network management state machine (NMT state machine)

The CANopen NMT state machine is used to control the network communication. The network management is node-oriented and follows a master/slave structure. It requires one device in the network, which fulfills the function of the NMT master, the other nodes are NMT slaves. The network management provides the follow- ing functions:

• Device control services for initialization and start-up of NMT slave nodes that want to take part in the dis- tributed application.

• Node Guarding of NMT slave nodes.

Figure 9: CANopen network state machine (CSM)

The CANopen network management (NMT) state machine must not be mistaken with the device state machine. 'Initialization' 'Reset Application' 'Reset Communication' 'Init' 'Pre-Operational' 'Operational' 'Stopped' (2) (10) (9) (3) (4) (5) (7) (6) (8) (1) Power on or hardware reset

The master controls the state transitions of each device in the network. After power-on, the device is initialized and set to the state 'Pre-Operational' automatically. In this state reading and writing to its object dictionary via the service data objects (SDO) is possible. The device can be configured by setting values and by preparing the PDO transmission.

Afterwards the device can be switched into the 'Operational' state by the NMT command "Start Remote Node" in order to start PDO communication. PDO communication can be stopped by the network master by simply switching the remote node back to 'Pre-Operational' by using the command "Enter Pre-Operational".

With the "Stop Remote Node" command the master can force the slave(s) to the state 'Stopped'. In this state no services besides network and error control mechanism are available. The NMT command "Reset Commu- nication" resets the communication of the node. All communication parameters will be set to their defaults. The application will be reset by the NMT command "Reset Node". This command resets all application param- eter. All NMT commands use the COB-ID 0. The different NMT commands are distinguished by a command specifier (CS) located in the first data byte of the message.

NMT state transitions are caused by

• Reception of an NMT node control service • Hardware reset, or

• Node control services locally initiated by application events.

Services on the listed communication objects may only be executed if the CANopen device is in the appropri- ate NMT state.

2.9.1 Network management (NMT) protocol (COB-ID: 0x000, 0x700)

The NMT master controls the NMT slave nodes using the following commands:

• Device control services for initialization and start-up of NMT slave nodes that want to take part in the dis-

Transition Description

(1) At Power on the NMT state initialization is entered autonomously.

(2) NMT state initialization finished - enter NMT state Pre-operational automatically (Boot-up message will be sent).

(3) Receive NMT command "start remote node" or by local control. (4), (7) Receive NMT command "enter pre-operational".

(5), (8) Receive NMT command "stop remote node". (6) Receive NMT command "start remote node". (9) Receive NMT command "reset node".

(10) Receive NMT command "reset communication". Table 23: NMT state transitions

NMT states

Available services

SDO PDO EMCY NMT

NMT Node Guarding 'STOPPED' x x 'Pre-Operational' x x x x 'Operational' x x x x x Table 24: NMT states

2.9.2 Start remote node command (COB-ID:0, CS:1)

This command requests the selected slave node(s) to enter the state 'Operational'.

2.9.3 Stop remote node command (COB-ID:0, CS:2)

This command requests the selected slave node(s) to enter the state 'Stopped'.

2.9.4 Enter 'Pre-Operational' command (COB-ID:0, CS:128)

This command requests the selected slave node(s) to enter the state 'Pre-Operational'.

2.9.5 Reset node command (COB-ID:0, CS:129)

This command requests the selected slave node(s) to enter the state 'Reset Application'.

All application parameters will be set to their default. The valve application will be re-started. After restarting the application, the reset node calls the reset communication command.

2.9.6 Reset communication command (COB-ID:0, CS:130)

This command requests the selected slave(s) to enter the state 'Reset Communication'.

The PDO communication will be stopped. After re-initialization of the network communication, the NMT state 'Pre-Operational' will be entered.

2.9.7 Bootup message (COB-ID: 0x700)

After a digital servo valve has finished its own initialization and entered the node state 'Pre-Operational' the digital servo valve sends the boot-up message. This message indicates that the slave is ready for operation.

2.9.8 Node guarding (COB-ID: 0x700, RTR:1)

The node guarding is the periodical monitoring of certain network nodes. Each node can be checked by the NMT master with a certain period <GuardTime> (0x100C). A second parameter <LifeTimeFactor> (0x100D) defines a factor after the connection will be detected as lost. The resolution of the guarding time is 1 ms. To enable the node guarding on a slave device, the guard time and life time factor must be set. The guarding is started with the first guarding telegram of the master. During node guarding the master sends a remote trans- mit request (RTR) frame to each guarded slave. The slave answers with its actual NMT state and a toggle bit. This toggle bit alternates in each cycle.

2.9.8.1 Object 0x100C: Guard time

This parameter contains the guarding time in milliseconds. The value 0 disables the life guarding.

CANopen

Index Sub-index Parameter name Data type Access Persistence Value range Default

2.9.8.2 Object 0x100D: Life time factor

This parameter contains the life time factor in milliseconds. The value 0 disables the life guarding.

Related documents