PISO-CPM100(U) / PCM-CPM100 user manual (ver. 2.02) Dec/03/2012 ----------------- 54
4.5.20. CPM100_NMTChangeState
Description:
The function CPM100_NMTChangeState is used to change the NMT
state of a slave. If the node parameter of this function is set to 0, the
state of all nodes on the same CANopen network will be changed.
Syntax:
WORD
CPM100_NMTChangeState(
BYTE
BoardNo,
BYTE
Node,
BYTE
State,
BYTE
BlockMode)
Parameter:
BoardNo:
[input] CPM100 board number (0~7).
Node:
[input] Slave device Node-ID (1~127). Set this parameter to 0 to
indicate all slave devices.
State:
[input] NMT command specifier.
1:
start
2:
stop
128:
enter PRE-OPERATIONAL
129:
Reset_Node
130:
Reset_Communication
BlockMode:
[input] 0 means this function is non-block-function, and 1
means this function is block-function. If set this parameter to 1, the
running procedure of the users’ application will be held in the
function until return. If set to 0, this function will return “CPM_
Processing” directly. This function will return its process status
while users apply it with the same “BoardNo” and “Node” again. If
the procedure is still not complete, it will return “CPM_Wait”.