Supported platforms: CODESYS 3.5

 

List of CANVXD_API Library's Data Types

BUSSTATE (ENUM)

Name of the Member

Default value

Description

UNKNOWN

0

Bus state is not supported

NO_ERROR

1

No bus errors

ACTIVE

2

TX and RX error counters are below warning level

WARNING

3

TX or RX error counter > 96

PASSIVE

4

TX or RX error counter > 127

BUSOFF

5

TX error counter > 255

 

CANDiagnostic (STRUCT)

Name of the Member

Data Type

Description

RxMessages

DWORD

Number of rx messages.

TxMessages

DWORD

Number of tx messages.

TxErrors

DWORD

Number of tx errors

RxErrors

DWORD

Number of rx errors

BusAlarms

DWORD

Number of bus alarms

LostMessages

DWORD

Number of tx and rx buffer overruns.

BusState

BUSSTATE

Bus state.

BusLoad

BYTE

Busload (0-100%). Supported only in 5050 and 6000 series products. 

 

ERROR (ENUM)

Name of the Member

Default value

Description

NO_ERROR

0

No error

INTERNAL_ERROR

1

Internal error from lower levels

INVALID_CAN_CHANNEL

2

Invalid CAN channel

INVALID_BITRATE

3

Invalid bitrate

FLAG_NOT_SUPPORTED

4

CAN interface does not support flag

CHANNEL_NOT_INITIALIZED

5

Channel is not initialized

INVALID_RECEIVECALLBACK

6

Invalid Receive Callback function block

CALLBACK_DATA_BUFFER_FULL

7

Callback data buffer full

CALLBACK_DATA_BUFFER_EMPTY

8

Callback data buffer empty

COBID_NOT_FOUND

9

COB-ID not found

COBID_REGISTERED

10

COB-ID is already registered

NULL_POINTER

11

NULL pointer

CHANNEL_INITIALIZED

12

Channel is already initialized.

 

Msg (STRUCT)

Name of the Member

Data Type

Description

ID

DWORD

COB-ID of the message

Len

BYTE

Length of the message

Data

ARRAY[0..7] OF BYTE

Message data

Timestamp

DWORD

Message timestamp (us)

 

Timestamp is included in CANVXD API V4.0.0.X or newer.

Timestamp requires support from FW's CANL2 interface.

It is implemented by S-Series platform and used in CANopen V4 library for SRDO protocol.

 

Source file topic000855.htm

Last updated 19-Dec-2024