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
SetCommunicationStateDED.ERRORDED.ERROR.NO_ERRORif device transition was successful.Input
eRequestedStateDED.DEVICE_TRANSITION_STATEdesired transition