NMT (FB)¶
FUNCTION_BLOCK NMT EXTENDS CiA405Base
This function block provides NMT services.
The NMT request will be sent to the NodeID specified in input DEVICE.
If NMT request should be addressed to all devices (including NMT master and sending device)
set DEVICE to 0 . If all devices but not NMT master and sending device should be addressed
use the additional flag TRANSITION_STATE.ALL_EXCEPT_NMT_AND_SENDER.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
NETWORKUSINT1
CAN network number the function block should operate on. Note: It is not the same like the network number in CANBus configurator. The CiA405
NETWORKis calculated by NetID + 1. Example: 1 = CAN0, 2 = CAN1, 3 = CAN2, …CiA405Base
ENABLEBOOLFALSE
Enables the function block on rising edge. Aborts operation on falling edge.
CiA405Base
TIMEOUTUDINT0
Timeout in ms; 0 means no timeout
CiA405Base
Output
CONFIRMBOOLFALSE
TRUE: function block finished without errorCiA405Base
ERRORCANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR
Error code: see CANOPEN_KERNEL_ERROR for further details
CiA405Base
Input
DEVICE0
NodeIDof destination device (local or remote). 0 means all devices.STATE0
The NMT transition which should be performed.