The function receives messages from the CAN bus with 29bit
identifiers based on the specified PGN.
This function is derived from CAN_GET and provides extended, specialized functionality for working with PGN messages.
To use this function, the following configuration must be set in the device:
Configuration
➜CAN Bus
➜Connect CAN bus1
In the function menu | On the diagram |
---|---|
![]() |
![]() |
Name | Value Type | Description |
---|---|---|
enable |
bool |
Enable data reception |
Name | Value Type | Description |
---|---|---|
state |
int32 |
Receiver status: 0 — receiver off 1 — output data not valid 2 — data received and valid 5 — settings not configured 6 — configuring settings 7 — settings configured -1 — function misconfigured or device resources unavailable |
size |
int32 |
Number of bytes received into the RXD buffer |
address |
int32 |
Source address (bits 0–7 of the identifier) |
priority |
int32 |
Priority (bits 26–28 of the identifier) |
data 0..3 |
int32 |
Lower 4 bytes of received data |
data 4..7 |
int32 |
Upper 4 bytes of received data |
size |
int32 |
Number of received bytes |
0 -> 5 -> 6 -> 7 -> 1 -> 2
[0 .. 7] -> -1 // Transition to error is possible from any status
Name | Description |
---|---|
Bus | CAN interface used:CAN1 CAN2 |
Timeout, ms | Timeout during which the output data is considered valid. If the time since the last message exceeds this value, the state output will be set to 1. |
Identifier | Identifier value |
RTR Packet | If enabled, the function will only accept messages with the RTR flag set |
Byte Order | Byte order used at data 0..3 and data 4..7 outputs when extracting data from a message. For example, message data [01,02,03,04,05,06,07,08], size = 8: “Little-endian” data 0..3 = 0x04030201 “Big-endian”data 4..7 = 0x08070605 data 0..3 = 0x01020304 “Big-endian (2 bytes)”data 4..7 = 0x05060708 data 0..3 = 0x03040102 data 4..7 = 0x07080506 |