Purpose

Creates a TCP/IP connection to a DoIP entity identified by its IP address. Format

Input

remote port defines the ECU's TCP port to connect to. Default is 13400.
local port defines the source TCP port to use. Default is 0, which will select an available port randomly. TCP ports may be kept in a wait state for an operating system specific time after the connection was closed, which prevents reusing that port until that time has passed. Consult your operating system's documentation on how to configure this timeout.
Diag reference in specifies the diagnostic session handle, obtained from Open Diagnostic on IP.vi and wired through subsequent diagnostic VIs. Normally, it is not necessary to manually manipulate the elements of this cluster.
address is the IP address of the DoIP entity to connect to (zero-terminated string in a.b.c.d notation).
protocol version is the protocol version of the DoIP packets. Choices are:
12010 — Initial draft version DoIP ISO/DIS 13400-2:2010
22012 — Official released version DoIP ISO 13400-2:2012

If protocol version is set to 2010, the protocol version byte of the Generic DoIP header is set to 1. If protocol version is set to 2012, the protocol version byte of the Generic DoIP header is set to 2. If the input is not connected or set to 0, the protocol version specified in Open Diagnostic on IP.vi is used.

The protocol versions used by the ECU and Automotive Diagnostic Command Set application must match or a Generic Header error will be issued.

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 status is TRUE.
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.
source identifies the VI where the error occurred.
Source Address is the DoIP source address of the tester that starts the communication. You can leave this input unwired if you are activating a route through DoIP Activate Routing.vi.
Note   If you use DoIP Activate Routing.vi at a later point to activate a route, then you must specify the source address of the tester using that VI.
Target Address is the DoIP target address of the device under test. When you are connecting directly to the device under test without using a DoIP gateway, you can leave this input unwired if you activate a route through DoIP Activate Routing.vi. If you are connecting to the device under test through a DoIP gateway, you must specify the target address of the device under test using this input.

Output

Diag reference out is a copy of Diag reference in. You can wire it to subsequent diagnostic VIs.
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.
status is TRUE if an error occurred.
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.
source identifies the VI where the error occurred.

Description

DoIP Connect.vi creates a unique TCP/IP data connection to a certain DoIP entity identified by its IP address. The IP address might be retrieved from DoIP Get Entities.vi. The TCP/IP data connection is needed to exchange diagnostic service requests.

When you connect directly to the device under test without using a DoIP gateway, you can either specify the Source Address and Target Address or leave them blank if a route is activated later using DoIP Activate Routing.vi. However, if you connect to the device under test through a DoIP gateway, you must specify the Target Address of the device under test in this VI.