CAN Interaction

The PLT can be used to interact with CAN buses. The PLT can be used to send and receive CAN messages to verify CAN bus functionality.

Examples

Example: Send 4-byte CAN message with ID 0x123

- ident: ICT-T1
  title: Send a CAN message
  steps:
  # Configure CAN0 to 250 kbit/s
  - command: canCfg CAN0 250000
  - command: canSend CAN0 0x123 0x00 0x01 0x02 0x04

Example: Receive 4-byte CAN message with ID 0x123

- ident: ICT-T1
  title: Send a CAN message
  steps:
  # Configure CAN0 to 250 kbit/s
  - command: canCfg CAN0 250000
  # Clear CAN receive buffer to avoid matching against stale data.
  - command: canClear CAN0
  # Match CAN message with ID 0x123, within 1 second.
  # Save payload to user key for further interaction or reporting.
  - command: canMatch CAN0 0x123
    timeout: 1s
    extractKey: CAN_123_PAYLOAD

Example: Send CAN message, expect a response

- ident: ICT-T1
  title: Send a CAN message
  steps:
  # Configure CAN0 to 250 kbit/s
  - command: canCfg CAN0 250000
  # Clear CAN receive buffer to avoid matching against stale data.
  - command: canClear CAN0
  # Send CAN message.
  - command: canSend CAN0 0x123 0x00 0x01 0x02 0x04
  # Match CAN message with ID 0x123 with specified payload, within 1 second.
  - command: canMatch CAN0 0x123 0x00 0x01 0x02 0x04
    timeout: 1s

Commands