CAN Bus

CAN Bus

ID: uniflow.plugin.canbus Category: Network & Communication Protocols Version: v1.3.0 Min Uniflow Version: Uniflow ≥ v1.4.0

CAN Bus Plugin Reference Manual

1. Overview

Plugin Name: CAN Bus

Type: Hardware Protocol

Identifier: uniflow.plugin.canbus

Description

Receive and transmit data from vehicle networks and industrial CAN buses.


2. Technical Architecture

The CAN Bus plugin interfaces with Controller Area Network (CAN 2.0A/2.0B) physical layers via SocketCAN (Linux) or hardware CAN adapters (PeakCAN/Kvaser/USB-CAN). It handles bitrate configuration (125K-1M bit/s), processes standard 11-bit and extended 29-bit CAN arbitration IDs, decodes raw byte frames and OBD-II PID parameters into catalog signals, and provides high-speed frame transmission capabilities.

System Interaction & Exposed Catalog Routes

The CAN Bus plugin interfaces with vehicle OBD-II/J1939 and industrial CAN networks using SocketCAN or PEAK PCAN hardware. It filters CAN IDs, processes 11-bit standard and 29-bit extended frames, decodes payload bytes, and transmits raw CAN frames.

Catalog Routes & Node Integration

Input Event Triggers (Input Nodes):

  • canbus.frame_received - Emitted when a CAN frame matching filters is received.
  • canbus.bus_status_changed - Emitted on CAN bus state changes (Error Warning / Bus-Off).
  • Executable Actions (Action Nodes):

  • canbus.transmit_frame - Transmits a raw CAN frame onto the bus.
  • canbus.set_bitrate - Reconfigures adapter bitrate (e.g., 250k, 500k).
  • canbus.reset_adapter - Resets the CAN hardware controller.
  • Architecture Diagram

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    3. Configuration Parameters

    The following configuration fields are available in the User Interface for this plugin:

    Configuration SettingDescription
    Adapter TypeSpecifies the adapter type.
    Device Handle / COM PortNumeric value specifying the device handle / com port.
    Bitrate (Kbps)Specifies the bitrate (kbps).
    OBD2 Polling Interval (ms)Numeric value specifying the obd2 polling interval (ms).
    Reconnect Delay (ms)Specifies the reconnect delay (ms).

    4. Exposed Routes & Data Types

    This plugin exposes catalog fields across the following rule graph nodes:

    Input Source

    The Input Source node reads interface connection status and parsed DBC signal values.

    Human-Readable Field NameData TypeDescription
    Connection Status  Bool
    Status flag indicating whether the socketCAN or hardware CAN interface is active (True).
    Configured DBC Signal  Double` / `Int32` / `Bool` / `String
    Scaled engineering value decoded from inbound CAN message payloads (e.g., Engine RPM, Speed).

    Event Input

    The Event Input node listens for raw CAN frame arrival events.

    Human-Readable Field NameData TypeExposed Event Fields & Data TypesDescription
    Raw CAN Frame Event  Event Object
    CanId (String)
    Data (String)
    IsExtended (Bool)
    Timestamp (DateTime)
    Real-time event triggered whenever a raw CAN frame is captured on the bus.

    Output Target

    The Output Target node acts as an action sink node to transmit raw CAN frames or encoded DBC signals on the bus interface.

    Target NameData TypeAssociated ParametersParameter Data TypeRequiredDescription
    Send Raw CAN Frame  Variant
    CAN ID (hex) (canId)StringTrueHexadecimal CAN identifier (e.g. 0x18DAF100).
    Payload (hex) (data)StringTrueRaw frame payload hex string (up to 8 bytes, e.g. 02010C0000000000).
    Extended Frame (isExtended)BoolFalseExtended 29-bit identifier flag (True / False).
    Send Signal  Variant
    Signal (signalId)StringTrueTarget DBC signal identifier.
    Value (value)StringTrueEngineering value to encode into CAN frame and transmit.

    5. Usage Examples

    Scenario A: CAN J1939 Engine Coolant Temperature High Triggers Modbus Siren & Avigilon Bookmark

    Workflow Overview:

    The CAN Bus plugin decodes J1939 engine telemetry (EngineCoolantTemp > 105.0°C). When the coolant temperature exceeds 105.0°C, Uniflow evaluates the decoded signal and executes two actions:

    1. Writes a Modbus TCP coil (Coil 2 = True) to activate a physical emergency siren.

    2. Creates an alert bookmark in Avigilon Control Center.

    Rule Node Configuration:

    1. Input Source Node: CAN Bus Signal Poller

  • Signal Name: EngineCoolantTemp (Double)
  • 2. Logic Filter Node: GreaterThan

  • Expression: EngineCoolantTemp > 105.0
  • 3. Output Target Node A: Modbus Client Writer

  • Action Target: Direct Access
  • Type: Coils
  • Address: 2
  • Value: True
  • 4. Output Target Node B: Avigilon ACC Action

  • Action Target: Alarms / Get Media / Bookmark
  • Notes: J1939 Engine Overheat - Coolant > 105C
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...

    Scenario B: Modbus Emergency Stop Signal Transmits Raw CAN Frame to Heavy Machinery ECU

    Workflow Overview:

    When a Modbus TCP master PLC writes True to local Modbus holding register or coil (Coil 0 == True), Uniflow immediately formats and transmits a raw 29-bit extended CAN frame (canId: 0x18FF0100, data: FF00000000000000) over SocketCAN to command an immediate emergency halt on connected hydraulic ECU hardware.

    Rule Node Configuration:

    1. Event Input Node: Modbus Server Listener

  • Filter Event: Master Write Received (modbus.master_write_received)
  • Exposed Schema Fields: Address (Int32), Value (String), Timestamp (DateTime)
  • 2. Logic Filter Node: And Condition

  • Expression: Address == 0 AND Value == "True"
  • 3. Output Target Node: CAN Bus Writer

  • Action Target: Send Raw CAN Frame
  • canId: 18FF0100
  • data: FF00000000000000
  • isExtended: True
  • Logic Flow Diagram:

    VISUAL ARCHITECTURE FLOW DIAGRAM
    Rendering Flow Architecture Diagram...
    Architecture Flow Diagram — Full Preview