UV Command — User Triggers
Creates custom triggers that monitor any internal device variable and generate events when specific conditions are met.
What is it for?
| Use case | Description |
|---|---|
| 🎯 Variable monitoring | Supervises any internal device parameter |
| ⚡ Change detection | Triggers events when values enter/exit ranges |
| 📈 Delta mode | Detects abrupt changes in speed, fuel, etc. |
| 🔗 Rules integration | UV00-UV47 signals available for event engine |
| 🔧 Response parsing | Extracts specific fields with delimiters |
Supports 32 triggers (indices 00-31), expandable up to 47 in some firmwares.
Syntax
| Action | Command | Description |
|---|---|---|
| Query | QUVnn | Queries trigger nn configuration |
| Configure | SUVnnabb.bb,cc,dd,ee,ff | Configures complete trigger |
| Delete one | SUVnn* | Deletes trigger nn |
| Delete all | SUV*55AA | Deletes all triggers |
| Reset signal | SUVnnR | Sets UVnn signal to 0 |
Parameters
| Param | Description | Values |
|---|---|---|
nn | Trigger index | 00 to 31 (or 47) |
a | Conversion type | See table below |
bb.bb | Internal command to monitor | Ex: QIO, QVR |
cc | First character index | Position in response |
dd | Character count | Data length |
ee..ee | Minimum value (≥) or delta time | Depends on type |
ff..ff | Maximum value (<) or delta | Depends on type |
Conversion Types
| Type | Description | Range |
|---|---|---|
/ S | Signed decimal | -2147483648 to +2147483647 |
U | Unsigned decimal | 0 to 4294967295 |
F | Floating point | Decimals |
H | Hexadecimal Big Endian | 0x00 to 0xFFFFFFFF |
h | Hexadecimal Little Endian | 0x00 to 0xFFFFFFFF |
A | ASCII string | Text |
X | Delta (abrupt change) | From v1.08.07 |
Delta Mode (X) - Detail
Delta mode accumulates changes in the monitored value over a time window and triggers if the accumulated variation exceeds the configured threshold.
Parameters in X mode:
| Param | Function |
|---|---|
ee | Time window in seconds |
ff | Delta threshold (see modes below) |
Comparison modes:
ff format | Behavior | Triggers when |
|---|---|---|
ff positive (e.g.: 20) | Increments only | If accumulated delta ≥ ff |
ff negative (e.g.: -20) | Decrements only | If accumulated delta ≤ ff |
*ff (e.g.: *20) | Absolute value | If |accumulated delta| ≥ |ff| |
Internal operation:
- At the start of each window, saves the current value and resets the accumulator
- On each evaluation, adds the difference:
delta += current_value - previous_value - When time
eeis reached, compares the accumulated delta with thresholdff - If the condition is met, triggers the corresponding UV signal
- Restarts the time window and accumulator
The ff value (delta) cannot be zero. If delta = 0 is configured, the trigger will not be processed.
Split Field (Optional)
Format: \XXnn where:
XX= Delimiter character in hexadecimal (ex:3B=;)nn= Field number to extract
// Example: \3B1 separates by ";" and takes field 1Associated Signals
| Property | Value |
|---|---|
| Signal | UV |
| Index | 00 - 47 |
| Conditional use | ✅ Yes |
| Edges | + positive, - negative, * any |
Practical Examples
Example 1: Ignition Monitoring
Captures IGN state from QIO command:
>SUV00UQIO,7,1,1,2< // Unsigned, position 7, 1 character, range 1-2Create rules to detect ignition changes:
>SRL00E;TRG=UV00+;ACC={STX UV00+ ;@TRM}< // Positive trigger (IGN ON)
>SRL01E;TRG=UV00-;ACC={STX UV00- ;@TRM}< // Negative trigger (IGN OFF)Example 2: GPS Antenna Status
Detect if GPS antenna is connected, open, or short-circuited:
// Configure query buffer
>SCXXB04G0000000,STATUS=,\2A,A<
// Create triggers for each state
>SUV00AQXB04,5,2,OK,< // GPS Antenna OK
>SUV01AQXB04,5,4,OPEN,< // GPS Antenna open
>SUV02AQXB04,5,5,SHORT,< // GPS Antenna short
// Rules to report status
>SRL90E;TRG=UV00+;ACC={STX GPS ANTENNA CONNECTED;@TRM}<
>SRL91E;TRG=UV01+;ACC={STX GPS ANTENNA OPEN;@TRM}<
>SRL92E;TRG=UV02+;ACC={STX GPS ANTENNA SHORT;@TRM}<Expected result:
>RTX GPS ANTENNA CONNECTED;ID=039129;*5B<
>RTX GPS ANTENNA OPEN;ID=039129;*47<
>RTX GPS ANTENNA SHORT;ID=039129;*61<Example 3: Using Delimiter (Split)
Extract IGN from response delimited by ;:
>SUV04FQIO,\3B1,3,1,1,2< // Delimiter ; (0x3B), field 1QIO Response:
RIO;IGN1;IN1111111;XP000;V000;VBU464
↑
Field 1, position 3, 1 character = "1"Query UV trigger value with: >QSSUV04<