Diag Set Property.vi

Automotive Diagnostic Command Set Toolkit Help

Edition Date: November 2018

Part Number: 372140J-01

»View Product Info
Download Help (Windows Only)

Purpose

Sets a diagnostic global internal parameter.

Format

diagram

Input

numeric cluster diag ref in specifies the diagnostic session handle, obtained from Open Diagnostic on CAN FD.vi and wired through subsequent diagnostic VIs. Normally, it is not necessary to manually manipulate the elements of this cluster.
word unsigned integer property ID defines the parameter whose value is to be retrieved. You can create the values using an Enum control.
0Timeout Diag Command is the timeout in milliseconds the master waits for the response to a diagnostic request message. The default is 1000 ms. This is the P2 timeout from the ISO 15765-3 specification.
1Timeout FC (Bs) is the timeout in milliseconds the master waits for a Flow Control frame after sending a First Frame or the last Consecutive Frame of a block. The default is 250 ms.
2Timeout CF (Cr) is the timeout in milliseconds the master waits for a Consecutive Frame in a multiframe response. The default is 250 ms for CAN and 1000 ms for LIN.
3Receive Block Size (BS) is the number of Consecutive Frames the slave sends in one block before waiting for the next Flow Control frame. A value of 0 (default) means all Consecutive Frames are sent in one run without interruption.
4Wait Time CF (STmin) defines the minimum time for the slave to wait between sending two Consecutive Frames of a block. Values from 0 to 127 are wait times in milliseconds. Values 241 to 249 (Hex F1 to F9) mean wait times of 100 µs to 900 µs, respectively. All other values are reserved. The default is 5 ms.
5Max Wait Frames (N_WFTmax) is the maximum number of WAIT frames the master accepts before terminating the connection. The default is 10.
6Wait Frames to Send (N_WAIT) is the number of WAIT frames the master sends every time before a CTS frame is sent. If this value is set to a negative number (for example, 0xFFFFFFFF = –1), the master sends an OVERLOAD frame instead of a WAIT, and reception is aborted. The default is 0 for maximum speed.
7Time between Waits (T_W) is the number of milliseconds the master waits after sending a WAIT frame. The default is 25.
8Fill CAN Frames specifies whether a CAN frame is transmitted with 8 bytes or less.
0:Short CAN frames are sent with DLC < 8.
1:Short CAN frames are filled to 8 bytes with Fill Byte (default).
9Fill Byte specifies the CAN frame content, filled with defined data or random data.
0–255:Byte is used optionally to fill short CAN frames.
256:Short CAN frames are filled optionally with random bytes.

The default is 255 (0xFF).

10Invalid Response as Error specifies how the toolkit handles an invalid ECU response.
0:Invalid response is indicated by success? = FALSE only (default).
1:Invalid response is returned as an error in addition.
11Max RspPending Count defines the number of times a ReqCorrectlyRcvd-RspPending (0x78) Negative Response Message will be accepted to extend the command timeout (default 5). If this message is sent more often in response to a request, an error –8120 is returned. If the ECU implements commands with a long duration (for example, flash commands), you may need to extend this number.
12VWTP Command Time Out sets the time in milliseconds the host waits for a VWTP 2.0 command to be executed (default 50 ms). The specification states this as 50 ms plus the network latency, but some ECUs may require higher values.
13STmin sets the minimum time in seconds between the end of transmission of a frame in a diagnostic request message and the start of transmission of the next frame in the diagnostic request message for LIN-based diagnostic communication. The default is 0.
14P2min sets the minimum time in seconds between reception of the last frame of the diagnostic request and the response sent by the node for LIN-based diagnostic communication. The default is 0.05.
15Termination sets the NI-XNET Termination property. Reflections on the CAN and LIN bus can cause communication failures. To prevent reflections, termination can be present as external resistance or resistance the XNET CAN or LIN board applies internally. This property determines whether the XNET board uses termination to the bus. For further information about appropriate terminations of a CAN or LIN network, refer to the NI-XNET Hardware and Software Manual. The default is 0.
16Timeout RspPending is the timeout in milliseconds the master waits for the response to a diagnostic request message after receiving an RspPending Negative Response Message (0x78). The default is 1000 ms. This is the P2* timeout from the ISO 15765-3 specification.
17LIN Sleep is available for LIN only and controls the sleep state of the LIN bus. Allowed values are:
0:Remote Sleep. The complete LIN bus is sent to the Sleep state.
1:Remote Wakeup. The LIN bus is woken up.
18Actual CAN IO Mode is a read-only property. Diag Set Property.vi with this parameter value has no effect.
19Response Plausibility Check defines whether the first byte of the diagnostic response is checked to contain the + 0x40 offset (positive response) or whether the first byte is 0x7F (negative response).
0:Response Plausibility Check is disabled.
1:Response Plausibility Check is enabled (default).

The default is 1, which is compatible with previous versions of the Automotive Diagnostic Command Set. Set this property to 0 only if you use non-standard diagnostic services.

long unsigned integer property value is the value of the property to be set.
cluster error in is a cluster that describes error conditions occurring before the VI executes. It is copied unchanged to error out and has no other effect on the VI. It is provided for sequencing purposes only.

Output

numeric clusterdiag ref out is a copy of diag ref in. You can wire it to subsequent diagnostic VIs.
clustererror out describes error conditions. It is copied unchanged from the error in cluster. It is provided for sequencing purposes only.

Description

Use this VI to set several internal diagnostic parameters such as timeouts for the transport protocol. Use Diag Get Property.vi to read them out.

WAS THIS ARTICLE HELPFUL?

Not Helpful