Function - Send a CANbus message.

Inputs

Input

Data type

Description

PORT

STRING

CAN port identification (see remarks).

ID

DWORD

CAN message ID.

LEN

DINT

CAN message data length.

DATA

USINT[]

CAN data.

RTR

BOOL

Send in RTR mode.

Outputs

Output

Data type

Description

OK

BOOL

TRUE if successful.

Remarks

This function sends an asynchronous message on the specified CAN port. The message will be sent at the end of the current cycle.

The number of messages possibly sent within one cycle is limited by the FIFO size defined in the CANbus configuration.

The PORT input defines a CAN bus configured:

- if you specify an empty string, then the first CAN port configured is selected

- if you specify a string containing a number, it relates to the corresponding port. For instance, '2' means the second port

- you can also specify the string entered as "port settings" in the CANbus configuration, e.g. 'CAN0'


Created with the Personal Edition of HelpNDoc: Free EBook and documentation generator