Supported platforms: CODESYS 2.3, CODESYS 3.5

NM_SendNMTCommand (FUN)

Description

This function sends a CANopen NMT command to the CAN bus.

Limitations

NMT commands control nodes connected to the CAN bus. Use with caution. If this advice is ignored, it can result in personal injury or damage to software or equipment.

 

Inputs, Outputs and Code Examples

CODESYS 2.3CODESYS 2.3

Inputs

Input variable name

Data type

Range

Description

i_DrvNbr

BYTE

1..4 (1..2)

Number of CAN bus to control.

i_NMTCommand

BYTE

1,2,128,129,130

NMT command to send.

i_NodeID

BYTE

0..127

NodeID of target device.

Outputs

Output variable name

Data type

Range

Description

function return value

DINT

 

0 = SUCCESS

Example code

 

 

CODESYS 3.5CODESYS 3.5

Inputs

Input variable name

Data type

Range

Description

i_CanChannel

CANVXD_API.ICANVXD

 

CAN channel interface.

i_NMTCommand

BYTE

1,2,128,129,130

NMT command to send.

i_NodeID

BYTE

0..127

NodeID of target device.

Outputs

Output variable name

Data type

Range

Description

function return value

DINT

 

0 = SUCCESS

Example code

 

 

See also

NetworkManager Data types:Global constants

 

Source file Topic000240.htm

Last updated 13-Jun-2024