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.

Contact NI to access a beta version of the following VI:
  • Add ECU for FlexRay
The following diagram represents a typical measurement and calibration API workflow in LabVIEW:
Figure 15. Measurement and Calibration LabVIEW API Workflow


  1. The Open VI initializes a measurement and calibration session and establishes a connection with the calibration server.
    Note When initializing a measurement and calibration session, the connection fails if the specified port is already in use. If this occurs, you must specify a different port to connect to the calibration server. The default host value is localhost and 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.
  2. The Add ECU VI adds ECU configurations to the calibration server. You must add each ECU separately with its configuration parameters.
    • Use the ECU reference out parameter to set optional ECU configurations with the property node.
  3. The Enable ECU Communication VI enables communication between the calibration server and individual ECUs.
  4. Choose from continuous measurement or single-point measurement.
    • Continuous measurement enables you to read signal data from the measurement signal list using either polling mode or DAQ list mode. Measurement continues until you stop it or an error occurs. In polling mode, data is acquired through cyclic polling of each signal, where a cycle takes longer the more signals it has. In DAQ list mode, data is acquired 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 and starts transmission of the measurement signal(s) from the ECU(s).
      • The Read Measurement VI returns the measurement data for the signal list added to the Open Measurement VI.
      • The Stop Measurement VI stops the measurement for the task and stops 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 through 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. Only DBL, U64, and INT64 datatypes are supported. Any other datatype that is 32-bit or less is read 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. Only DBL, U64, and INT64 datatypes are supported. Any other datatype that is 32-bit or less is read as a DBL datatype. Use the String datatype to write a string value to the signal.
  5. The Disable ECU Communication VI disables communication between the calibration server and individual ECUs.
  6. The Remove ECU VI removes ECU configurations from the calibration server.
  7. The Close VI closes the connection to the calibration server.

Measurement Execution Workflow

The Measurement and Calibration Toolkit reads measurement values from an ECU using DAQ list mode or polling mode.

DAQ List Mode

In DAQ list mode, data is transmitted from the ECU to the calibration engine in equidistant time intervals based on the specified event channel and signal list parameters. You can use DAQ list mode to monitor ECU data without permanently polling the values of these measurements. After a DAQ list has been set up and initialized, 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(fBufferSizeInSeconds/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 is determined by the buffer size parameter. If the data buffer fills up, the calibration engine generates an error and stops streaming data.

Note Your parameter selection and settings affect the CPU usage of your system and may need to be optimized.
Figure 16. DAQ List Mode


Polling Mode

In polling mode, data is transmitted from the ECU to the calibration engine 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 the Start Measurement VI is called, the calibration engine requests the measurement value for each signal using the short upload command (0xF4) and then the ECU responds to the calibration engine with the requested data. Since each signal measurement requires both a request and a response, the 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 affect the CPU usage of your system and may need to be optimized.
Figure 17. Polling Mode