00 ·01 ·02 ·03 ·
Home/Documentation / VCU+ / Plugin Reference Manual
- VCU+ · Plugin reference manual

VCU+ plugin reference.

The VCU+ Lua plugin API. Every function, constant, and signal supported by the firmware.

DL-DOCS · PLUGIN API v1 · FW ≥ 1.1.6 · SEPTEMBER 22, 2026SCROLL ↓
PLUGIN API v1 · FW ≥ 1.1.6◆EMBEDDED RUNTIME◆36 FUNCTIONS · 12 CATEGORIES◆77 SIGNALS◆PLUGIN API v1 · FW ≥ 1.1.6◆EMBEDDED RUNTIME◆36 FUNCTIONS · 12 CATEGORIES◆77 SIGNALS◆
AI ·
- / AGENT SKILL
/documentation/vcu/plugin-reference-manual/skill.md

Add this URL as an agent skill. It tells the agent how to write a plugin and to read the live manual.

- / MARKDOWN
/documentation/vcu/plugin-reference-manual.md

Drop this URL into the agent for the full manual: every function, signal, and firmware gate.

- FIRMWARE
v3.0.1
LATEST GATED API
- RUNTIME
Embedded
SANDBOXED ON-DEVICE
- FUNCTIONS
36
ACROSS 12 CATEGORIES
- CONSTANTS
59 + 77
CONSTANTS + SIGNALS
/ 02
- Function index

Browse every Plugin function.

36 functions across 12 categories. Click any signature to expand for parameters, firmware gating, and a copy-paste sample.
IDXSIGNATURECATEGORYFIRMWARETAG
- DESCRIPTION

This function is called repeatedly by the VCU firmware. Implement your main control logic inside this function.

- SAMPLE · PLUGIN CODE
-- This function will be called on every tick of the plugin execution cycle
function onTick()
    local temp = getSignal(BatteryTemp)
    if temp == nil then
        return
    end
    if temp > 80 then
        setOut(HS1) -- Turn on cooling fan
    else
        clearOut(HS1) -- Turn off cooling fan
    end
end
/ 03
- Constants

Named values the runtime understands.

Pins, PWM channels, buses, gear states, drive modes, GPS types, analog outputs, CAN encodings. All available as plain globals in your plugin.
Output Pins
/ outputPins
- HIGH-SIDE OUTPUTS
HS1HS2HS3HS4HS5HS6HS7HS8
- LOW-SIDE OUTPUTS
LS1LS2LS3LS4LS5LS6LS7LS8LS9LS10LS11LS12
- CAN KEYPAD LEDS
CAN-KEY1CAN-KEY2CAN-KEY3CAN-KEY4CAN-KEY5CAN-KEY6CAN-KEY7CAN-KEY8
PWM Channels
/ pwmChannels
- STANDARD
PWM1PWM2PWM3PWM4PWM5PWM6PWM7
- HARDWARE REVISION V1 ONLY
PWM8PWM9PWM10
CAN Buses
/ canBuses
CAN1
typically reserved for the inverter
CAN2
free for general use, but is automatically reserved for the secondary inverter when one is configured
CAN3
general-purpose bus shared by other VCU features and plugins
Gear Selection
/ gearSelection
GEAR_P
Park
GEAR_R
Reverse
GEAR_N
Neutral
GEAR_D
Drive
Drive Modes
/ driveModes
CHILL
relaxed throttle response, softer acceleration
NORMAL
default balanced response
SPORT
aggressive throttle response, full power
VALET
reduced-power limited mode
GPS Data Types
/ gpsDataTypes
LATITUDE
latitude in degrees
LONGITUDE
longitude in degrees
ALTITUDE
altitude in meters
GROUNDSPEED
ground speed in km/h
HEADING
heading in degrees
TIME
unix timestamp (seconds since epoch)
Analog Outputs
/ analogOutputs
AOUT1AOUT2
CAN Encoding
/ canEncoding
CAN_INTEL
little-endian
CAN_MOTOROLA
big-endian
/ 04
- Signals · 77 signal IDs

Everything you can read.

Pass any of these IDs to getSignal(). Values come from the VCU's signal bus. Always check for nil before arithmetic.
- / 01
Accelerator Pedal
3 signals
AcceleratorPedalaccelerator pedal position (0-100%)
AcceleratorPedalPrimaryprimary accelerator pedal sensor (0-100%)
AcceleratorPedalSecondarysecondary accelerator pedal sensor (0-100%)
- / 02
High-Voltage Battery
4 signals
BatteryCurrenthigh-voltage pack current reported by the BMS (A)
BatteryVoltagehigh-voltage pack voltage reported by the BMS (V)
BatteryTemphighest cell/module temperature reported by the BMS (°C)
BatteryChargepack state of charge reported by the BMS (%)
- / 03
Primary Drive Inverter
6 signals
DI_inverterTempprimary inverter module temperature (°C)
DI_statorTempprimary motor stator temperature (°C)
DI_heatSinkTempprimary inverter heat-sink temperature (°C)
DI_inletTempprimary inverter coolant inlet temperature (°C)
DI_InverterCurrprimary inverter DC current (A)
DI_coolingFanprimary motor cooling fan/pump command state (1 = running, 0 = off)
- / 04
Secondary Drive Inverter
6 signals
DIS_inverterTempsecondary inverter module temperature (°C)
DIS_statorTempsecondary motor stator temperature (°C)
DIS_heatSinkTempsecondary inverter heat-sink temperature (°C)
DIS_inletTempsecondary inverter coolant inlet temperature (°C)
DIS_InverterCurrsecondary inverter DC current (A)
DIS_coolingFansecondary motor cooling fan/pump command state (1 = running, 0 = off)
- / 05
Auxiliary Temperatures
4 signals
Temp1auxiliary temperature sensor 1 (°C)
Temp2auxiliary temperature sensor 2 (°C)
Temp3auxiliary temperature sensor 3 (°C)
Temp4auxiliary temperature sensor 4 (°C)
- / 06
Motor Speed
3 signals
RPMdrive motor speed (rpm)
RPMPrimaryprimary drive motor speed (rpm)
RPMSecondarysecondary drive motor speed (RPM)
- / 07
Digital Inputs
31 signals
Din1state of digital input 1 (0 or 1)
Din2state of digital input 2 (0 or 1)
Din3state of digital input 3 (0 or 1)
Din4state of digital input 4 (0 or 1)
Din5state of digital input 5 (0 or 1)
Din6state of digital input 6 (0 or 1)
Din7state of digital input 7 (0 or 1)
Din8state of digital input 8 (0 or 1)
Din9state of digital input 9 (0 or 1)
Din10state of digital input 10 (0 or 1)
Din11state of digital input 11 (0 or 1)
Din12state of digital input 12 (0 or 1)
Din13state of digital input 13 (0 or 1)
Din14state of digital input 14 (0 or 1)
Din15state of digital input 15 (0 or 1)
DINL1alias for Din1 (connector label DINL1, 0 or 1)
DINL2alias for Din2 (connector label DINL2, 0 or 1)
DINL3alias for Din3 (connector label DINL3, 0 or 1)
DINL4alias for Din4 (connector label DINL4, 0 or 1)
DINL5alias for Din5 (connector label DINL5, 0 or 1)
DINL6alias for Din6 (connector label DINL6, 0 or 1)
DINL7alias for Din7 (connector label DINL7, 0 or 1)
DINL8alias for Din8 (connector label DINL8, 0 or 1)
DINL9alias for Din9 (connector label DINL9, 0 or 1)
DINL10alias for Din10 (connector label DINL10, 0 or 1)
DINH1alias for Din11 (connector label DINH1, 0 or 1)
DINH2alias for Din12 (connector label DINH2, 0 or 1)
DINH3alias for Din13 (connector label DINH3, 0 or 1)
DINH4alias for Din14 (connector label DINH4, 0 or 1)
DINH5alias for Din15 (connector label DINH5, 0 or 1)
DinNoneplaceholder for unused digital input
- / 08
System
4 signals
LVBattlow-voltage (12 V) battery voltage (V)
Ignitionignition / key-on input state (0 or 1)
Gearcurrently selected gear
Noneplaceholder for an unassigned signal
- / 09
CAN Keypad Buttons
8 signals
CAN_KEYPAD_B1state of CAN keypad button 1 (0 or 1)
CAN_KEYPAD_B2state of CAN keypad button 2 (0 or 1)
CAN_KEYPAD_B3state of CAN keypad button 3 (0 or 1)
CAN_KEYPAD_B4state of CAN keypad button 4 (0 or 1)
CAN_KEYPAD_B5state of CAN keypad button 5 (0 or 1)
CAN_KEYPAD_B6state of CAN keypad button 6 (0 or 1)
CAN_KEYPAD_B7state of CAN keypad button 7 (0 or 1)
CAN_KEYPAD_B8state of CAN keypad button 8 (0 or 1)
- / 10
Analog Inputs
8 signals
Ain1analog input 1 voltage (V)
Ain2analog input 2 voltage (V)
Ain3analog input 3 voltage (V)
Ain4analog input 4 voltage (V)
Ain5analog input 5 voltage (V)
Ain6analog input 6 voltage (V)
Ain7analog input 7 voltage (V)
Ain8analog input 8 voltage (V)
/ 05
- Quick start

Your first plugin, in 12 lines.

Battery-temperature-controlled cooling fan, monitored over CAN, running on every tick. Write it in Bolt's Plugin editor and flash straight to the VCU+. No build step.
- EDITOR · cooling.plugin
-- Battery thermal monitor + fan controller
local FAN      = HS1
local MAX_TEMP = 55  -- deg C

function onTick()
  local t = getSignal(BatteryTemp)
  if t == nil then return end

  if t > MAX_TEMP then setOut(FAN)
  else                 clearOut(FAN) end

  setLogEntry(1, t)                -- expose to log
  sendCAN(CAN3, 0x420, {math.floor(t)})
end
- BREAKDOWN
onTick()called every execution cycle by the firmware scheduler
getSignal(BatteryTemp)returns pack temperature in °C or nil if the BMS is silent
setOut(FAN) / clearOut(FAN)drives high-side output HS1 on/off
setLogEntry(1, t)writes t to plugin log slot 1, visible in Bolt
sendCAN(CAN3, 0x420, …)broadcasts the rounded temperature on CAN3