Skip to main content

Calculated PIDs - Knowledgebase / V8 Scan and Tune Software - EFILive Service Desk

Calculated PIDs

Authors list

When data logging, a controller outputs its data to be logged as a set of PIDs (Parameter IDentifiers). Each PID contains discrete data that describes (one or maybe a number of) operating conditions within the controller (e.g. throttle position or engine speed). Sometimes a tuner may want to process and/or present some of that PID data in ways that are not available with the standard EFILive software. In that case, user defined calculated PIDs can be created that compute and present new data using arithmetic expressions based on existing PID data.

When a calculated PID is defined that uses one or more existing PIDs in its arithmetic expression, those existing PIDs must already be selected, otherwise the calculated PID's arithmetic expression cannot be evaluated.

This example shows how to create a calculated PID that can be used for searching and filtering data in the EFILive V8 Scan Tool.  Calculated PIDs used for searching and filtering differ from numeric calculated PIDs in that they must be defined with units of type boolean. Boolean means the calculated PID's value will be either true or false, which is necessary when using the PID to control a filter or to search for specific data in the log file.

To create a calculated PID:

  1. Open the EFILive V8 Scan and Tune software and select the [F2: Scan] option.
  2. Click on the drop down arrow on the [Config] button and select "Calculated PIDs" or press the Ctrl+K hot key.
  3. First, you must create a group in which you can save your calculated PID(s).
  4. Click on the "Add new item" (green plus sign) icon in the top right corner of the window and change the new group's name from New to USER. You can use any name you like that is 4 characters or less, for this example we'll use the group name USER. Add a description for the group, "User Defined PIDs".
  5. With your newly added group highlighted, click on the second "Add new Item" (green plus sign) icon half way down the window and change the new PID name from New to WOT. Add a description for the PID, "Wide Open Throttle".
  6. Select the units "boolean". Boolean means the PID value is either true or false, indicating the throttle is wide open or it is not. All filter and search PIDs must be defined with units of boolean.
  7. Precision is not important and may be left at 0 because the boolean value that is returned by the calculated PID is not displayed as a number.

To edit the calculated PID:

  1. Click on the [Edit] button to open the Function Editor window.
  2. Enter the calculated PID script as shown in the image below. The text in scripts are case sensitive, so be sure to use the correct upper and lower case characters.
  3. Line 1 is a comment and is ignored by EFILive. Comment lines start with two dashes and are displayed in green text.
  4. Line 2 is the return value of the calculated PID. All calculated PID scripts must return a value, either a number, some text or a boolean (true/false) value.
  5. The pid() function returns the value of the PID shown in the quotes. So pid("TP") will return the value of the throttle position.
  6. The entire expression: return pid("TP")>80 will return true if the value of the TP PID is greater than 80% and false if it is 80% or less.
  7. Click the [Test] button to test the script.
  8. If everything is correct you will see the following message:

  9. If you've made a mistake, for example if you used upper-case for the pid () function (i.e. return PID("TP">80), then you will see an error message telling you that the global name PID is nil (or empty), which means the function named "PID" is unknown.
  10. Click [Ok] to dismiss the dialog box.
  11. Click [Ok] to exit the function editor.
  12. Click [Ok] to exit the Calculated PIDs editor. 
Helpful Unhelpful

3 of 5 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?