The Measurement and Calibration Toolkit

The Vehicle Communication Measurement and Calibration Toolkit is an optional add-on to the Vehicle Communication Toolkit (Full version) that expands your ability to communicate with real or simulated ECUs.

If your system uses the Measurement and Calibration Toolkit for NI-VCOM, refer to the following topics for more information.

Viewing a Measurement and Calibration Database File

Complete the following steps to view a measurement and calibration database file:
  1. Launch the WebUI.
  2. Select Calibration.
  3. Upload or select a calibration database file.
  4. Select View Database File to access a detailed view.
    The following tabs appear.
    • Protocols: Displays database file protocols and related event channels.
    • Calibration Pages: Displays database file segments and pages.
    • Objects: Displays database file objects, including measurements, characteristics, functions, and groups.

Using Measurement and Calibration APIs

You can develop with the Measurement and Calibration Toolkit using the LabVIEW API. Refer to your in-product help or contact NI for more information about specific VIs.

The C API is available as an alternative development option upon request. Contact NI for more information.

The following diagram represents a typical LabVIEW API workflow for measurements and calibration.

Figure 15. Workflow of Measurement and Calibration LabVIEW API


  • The Open VI initializes a measurement and calibration session and establishes a connection with the calibration server.
    Note When initializing a measurement session and a calibration session, the connection fails if the specified port is already in use. If a failure occurs, you must specify a different port to connect to the calibration server. The default host value is localhost. The default port value is 9876. Complete the following steps to change the port value:
    1. Open the INI file, located at %Public%\Documents\PROVEtechTA\cfg\TM.ini.
    2. Locate the [gRPC1] tag and change the last four digits of the Listen line to your desired port value.
    3. Save the INI file.
  • The Add ECU VI adds ECU configurations to the calibration server. You must add each ECU separately with its configuration parameters.
    To set optional ECU configurations with the property node, use the ECU reference out parameter.
  • The Enable ECU Communication VI enables communication between the calibration server and the individual ECUs.
  • Choose from continuous measurement or a single-point measurement.
    • Continuous measurement enables you to read signal data from the measurement signal list. Read the data using either polling mode or DAQ list mode. The measurement continues until one of the following occurs:
      • You stop the measurement.
      • An error occurs.
      Polling mode acquires data through cyclic polling of each signal. A cycle takes longer the more signals it has. DAQ list mode acquires data in equidistant time intervals as defined in the A2L database. Refer to Measurement Execution Workflow for more information.
      • The Open Measurement VI adds the measurement signal list and the measurement settings to the measurement task. The measurement settings parameter includes measurement mode, buffer size, and update cycle time.
        Note This VI only supports opening and running a single measurement task at once. Do not use multiple instances of the Open Measurement VI at the same time. Since only one instance of measurement can be active, you can use the measurement operation to measure multiple signals with different sub-sampling rates.
      • The Start Measurement VI starts the measurement for the task. The Start Measurement VI also starts the transmission of the measurement signal(s) from the ECU(s).
      • The Read Measurement VI returns the measurement data for the signal list in the Open Measurement VI.
      • The Stop Measurement VI stops the measurement for the task. The Stop Measurement VI also stops the transmission of the measurement signal(s) from the ECU(s).
      • The Close Measurement VI clears the measurement task configuration.
    • Single-point measurement enables you to read and write single samples of data to and from individual ECUs. Single-point measurement uses data from the cyclic polling of each selected signal, where a cycle takes longer the more signals it has.
      • The Read Signal VI returns a single measurement value from the specified signal name. The VI only supports DBL, U64, and INT64 datatypes. The VI reads any other datatype that is 32-bit or less as a DBL datatype. Use the string datatype to read a string value from the signal.
      • The Write Signal VI writes a single value to the specified signal name. The VI only supports DBL, U64, and INT64 datatypes. The VI reads any other datatype that is 32-bit or less as a DBL datatype. Use the String datatype to write a string value to the signal.
  • The Disable ECU Communication VI disables communication between the calibration server and individual ECUs.
  • The Remove ECU VI removes ECU configurations from the calibration server.

Measurement Execution Workflow

The Measurement and Calibration Toolkit reads measurement values from an ECU, using two different modes: DAQ list mode or polling mode.

DAQ List Mode

DAQ list mode transmits data from the ECU to the calibration engine in equidistant time intervals. The intervals are based on the specified event channel parameter and signal list parameter. You can use DAQ list mode to monitor ECU data without permanently polling the values of these measurements. After setting up and initializing a DAQ list, the ECU transmits the data autonomously without any further action. The number of available DAQ lists and their sizes depend on the implementation of the ECU.

The calibration engine adds the signals in the measurement list of the Open Measurement VI to the ECU DAQ list using data acquisition commands. After you start the measurement, the ECU continues sending measurement values for each signal at the rate decided by their event channel to the calibration engine until you stop the measurement. After this measurement data is available in the calibration engine, it is streamed to the data buffer at the rate defined by the update cycle time parameter, the value of which is calculated, in seconds, as

min ( f B u f f e r S i z e I n S e c o n d s / 2 , 4 )
. The data buffer controls the throughput of the data sent from the calibration engine to the LabVIEW API.

The Read Measurement VI read duration parameter dictates how long a client reads streaming data from the calibration engine. The buffer size parameter determines the buffer size. If the data buffer fills up, the calibration engine generates an error and stops streaming data.

Note Your parameter selection and settings might affect the CPU usage of your system. Consider optimizing your system if necessary.
Figure 16. DAQ List Mode


Polling Mode

Polling mode transmits data from the ECU to the calibration engine. The data transmits through cyclic polling of each signal using the UPLOAD XCP command. This operation takes place as fast as possible based on the specified sampling rate parameter.

The measurement value for each signal added to the measurement list with the Open Measurement VI is read from the ECU. After calling the Start Measurement VI, the calibration engine requests the measurement value for each signal. The request uses the short upload command (0xF4). The ECU then responds to the calibration engine with the requested data. Each signal measurement requires both a request and a response. If more signals are in the measurement list, the longer it takes to complete a single measurement of all signals. This operation continues until the Stop Measurement VI is called.

Note Your parameter selection and settings might affect the CPU usage of your system. Consider optimizing your system if necessary.
Figure 17. Polling Mode