Purpose

Starts a background thread for the current diagnostic session that periodically transmits a TesterPresent message. Format

Input

period [sec] is the transmit period of the periodic message. Note that the periodic message is inhibited while the user sends regular messages.
diag ref in specifies the diagnostic session handle, obtained from Open Diagnostic on CAN FD.vi and wired through subsequent diagnostic VIs. Typically, it is not necessary to manipulate the elements of this cluster manually.
message type defines the periodic message to be sent. Choices are:
KWP2000 TesterPresent0A TesterPresent service request according to the KWP2000 protocol as defined in ISO 14230-3. The response required? parameter determines whether the message is configured to have a response.
UDS TesterPresent1A TesterPresent service request according to the UDS protocol as defined in ISO 14229-1. The response required? parameter determines whether the message is configured to have a response.
User Defined2Any user defined request message can be transmitted periodically. Specify the message with the user message parameter. The response required? parameter determines whether the message is configured to have a response. If the response required? parameter does not match the behavior of the message given, the behavior is undefined.
response required? specifies whether the periodic message will have a response.
error in is a cluster that describes error conditions occurring before the VI executes. If an error has already occurred, the VI returns the value of the error in cluster to error out.
status is TRUE if an error occurred. This VI is not executed when the status is TRUE.
code is the error code number identifying an error.

A value of 0 indicates success.

A negative value indicates an error; the VI did not execute the intended operation.

A positive value indicates a warning; the VI executed the intended operation, but an informational warning is returned.

For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.

source identifies the VI where the error occurred.
user message defines the periodic service request message to be sent to the ECU as a stream of bytes for the User Defined message type.

Output

diag ref out is a copy of diag ref in. You can wire it to subsequent diagnostic VIs.
error out describes error conditions. If the error in cluster indicates an error, the error out cluster contains the same information. Otherwise, error out describes the error status of this VI.
status is TRUE if an error occurred.
code is the error code number identifying an error.

A value of 0 indicates success.

A negative value indicates an error; the VI did not execute the intended operation.

A positive value indicates a warning; the VI executed the intended operation, but an informational warning is returned.

For a description of the code, wire the error cluster to a LabVIEW error-handling VI, such as the Simple Error Handler.

source identifies the VI where the error occurred.

Description

Often it is necessary to transmit a TesterPresent service to keep a diagnostic session alive in the ECU. This VI automatically transmits a periodic TesterPresent message in the context of the current diagnostic session, as long as no other communication takes place. The automatic transmissions do not interfere with the regular diagnostic communication the user initiates.