Custom Functions, Filters and Triggers


Configuring User Defined PIDs

The first few PIDs in the user defined list are internal and cannot be modified.

You cannot modify user defined PIDs when you are scanning or have a log file open for playback.

For a user defined PID to function properly, the Sensors and PIDs you reference in the function must be loaded into the table display. If your user defined PID always shows a value of 0, either you reference a Sensor or PID that is not loaded into the table display or your function syntax is invalid.

Note: User defined PIDs are ALWAYS calculated, even if they are not shown in the table display. You should be careful about defining custom PIDs as sensors if they will generate bad data, as sensor's are always averaged. eg. if you create a user defined boost PID (for a boost gauge using EIO input) as a MAP sensor, this data will always be averaged with other MAP sensor PIDs, such as MAP (SAE) even if your boost gauge is not connected. This can cause problems in histograms and charting if they reference sensors for axis. The solution to this issue is not to declare user-defined PID as sensors and reference the PIDs directly in charts if needed.

You can define your own sensors using user defined PIDs as well. User defined PIDs as sensors can make up for sensors some vehicles may lack such as Cylinder Air and others.

If you define a function as a logical expression using AND OR = < or >, the result will return 1 for true and 0 for false.



Function, Filter and Trigger Help

Next to all of the function and filter boxes in VCM Scanner is a small blue question mark. Clicking the small blue question mark will load up the HPT Custom Function, Filter and Trigger Help window. This window will display all currently supported Sensors and PIDs and their respective IDs to use when defining your functions and filters.

When you have a log file open or are scanning a vehicle, any supported items in the table display are indicated as red in this help window.



Histogram Filters

If you define a filter, the filter must return a value of 1 (true) to add the current cell to the histograms data. If the filter returns 0 (false), the frame will not be added to the histograms history.

You can combine filters using AND and OR statements.

Examples of valid filters are:
[SENS.90] > 50
[PID.11.MET] < 85
[PID.11.MET] < 85 AND [SENS.90] > 50
[PID.11.MET] < 85 & [SENS.90] > 50

To define a variable as a transient, use an dy/dx delimiter.
Examples of transient variable definitions:
[SENS.20.dy/dx]
[SENS.20.mph.dy/dx]


Enhanced IO Output Triggers

Enhanced IO Outputs Triggers are defined just the same as the Histogram Filters.


Supported Binary Operations

+ Sum up two operands.
- Subtract two operands.
* Multiple two operands.
/ Divide two operands.
^ Raise to a power.


Supported Relational Operations

> If x > y result is 1 otherwise 0.
<</td> If x < y result is 1 otherwise 0.
= If x = y result is 1 otherwise 0.


Supported Conditional Operations

AND If x = 1 and y = 1 result is 1 otherwise 0.
OR If x = 1 or y = 1 result is 1 otherwise 0.
& If x = 1 and y = 1 result is 1 otherwise 0.
| If x = 1 or y = 1 result is 1 otherwise 0.


Supported Functions

sin(x) Returns the sine of x where x is in radians.
cos(x) Returns the cosine of x where x is in radians.
tan(x) Returns the tangent of x where x is in radians.
abs(x) Returns the absolute value of x.
round(x) Returns the whole number nearest x.