CANopenDevice_Diag.SetCommunicationState (METH)ΒΆ
METHOD SetCommunicationState : DED.ERROR
Starts, stops or resets the device. Following table defines the mapping between CAA Device Diagnosis
DED.DEVICE_TRANSITION_STATE
and CANopen NMT command:
CAA Device Diagnosis |
CANopen NMT command |
|
NMT Start (CANopenDevice.SwitchToOp) |
|
NMT Stop (CANopenDevice.SwitchToStopped) |
|
If current state is CANOPEN_STATE.POWERDOWN:
else NMT Reset (CANopenDevice.Reset)
|
Note
Use CANopenDevice_Diag.CheckCurrentSupportedCommunicationState to check which transitions are possible in the current state!
- InOut:
Scope
Name
Type
Comment
Return
SetCommunicationState
DED.ERROR
DED.ERROR.NO_ERROR
if device transition was successful.Input
eRequestedState
DED.DEVICE_TRANSITION_STATE
desired transition