Automotive Diagnostic Command Set Toolkit Help

UDS TransferData.vi

  • Updated2024-08-07
  • 4 minute(s) read

UDS TransferData.vi

Purpose

Transfers data to/from the ECU in a download/upload process.

Format

diagram

Input

byte unsigned integerblock sequence counter in is used to number the data blocks to be transferred to/from the ECU. The block sequence counter value starts at 01 hex with the first UDS TransferData.vi request that follows the UDS RequestDownload.vi or UDS RequestUpload.vi service. Its value is incremented by 1 for each subsequent UDS TransferData.vi request. At the value of FF hex, the block sequence counter rolls over and starts at 00 hex with the next UDS TransferData.vi request.

The block sequence counter is updated automatically and returned in the block sequence counter out parameter.
numeric clusterdiag ref in specifies the diagnostic session handle, obtained from Open Diagnostic on CAN FD.vi or Open Diagnostic on IP.vi and wired through subsequent diagnostic VIs. Normally, it is not necessary to manually manipulate the elements of this cluster.
data in defines the data block to be written to the ECU.

For a download, this is a memory data block to be downloaded to the ECU.

For an upload, the meaning is implementation dependent; in most cases, it is sufficient to leave the parameter empty (default).
cluster 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.
boolean status is TRUE if an error occurred. This VI is not executed when status is TRUE.
long signed integer code is the error code number identifying an error. A value of 0 means success. A negative value means error: the VI did not execute the intended operation. A positive value means warning: the VI executed 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.
string source identifies the VI where the error occurred.

Output

byte unsigned integerblock sequence counter out returns the updated value of the block sequence counter.
numeric clusterdiag ref out is a copy of diag ref in. You can wire it to subsequent diagnostic VIs.
data out returns the memory data from the ECU.

For a download, this might contain a checksum or similar verification instrument; the meaning is implementation dependent.

For an upload, this is a memory data block uploaded from the ECU.
booleansuccess? indicates successful receipt of a positive response message for this diagnostic service.
cluster error out describes error conditions. If the error in cluster indicated an error, the error out cluster contains the same information. Otherwise, error out describes the error status of this VI.
boolean status is TRUE if an error occurred.
long signed integer code is the error code number identifying an error. A value of 0 means success. A negative value means error: the VI did not execute the intended operation. A positive value means warning: the VI executed 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.
string source identifies the VI where the error occurred.

Description

UDS TransferData.vi executes the data transfer of a download process (initiated with a previous UDS RequestDownload.vi request) or an upload process (initiated with a previous UDS RequestUpload.vi request). The data transfer must occur in blocks of the size returned in the block size parameter of the respective request service. After the data transfer has completed, terminate the operation by calling the UDS RequestTransferExit.vi service.

Log in to get a better experience