📦 Archived documentation: r1 (committed 2026-07-24) View current documentation →
Available on: Flexs Q5 Pro

can.tx()

can.tx(id, payload, extendedId, canFD, remoteFrame)

Transmits a CAN frame.

Arguments

NameTypeRequiredDefaultDescription
id number yes Frame identifier.
payload string yes Frame payload — pack binary data with the bin functions.
extendedId boolean yes true for a 29-bit extended identifier.
canFD boolean yes true to send as a CAN FD frame.
remoteFrame boolean yes true to send a remote (RTR) frame.

Example

can.tx(
  12,             // id
  "Test Payload", // payload
  false,          // extended id
  false,          // canFD
  false           // remote frame (RTR)
);