Using
LabView To Send Data Over A Network Connection
This sub-vi sends a single string from over the connection. Here
is the sequence of events.
-
The first block takes
the input string - to be transmitted - and computes the length of the string.
It is assumed that the string length can be specified by two integers,
or in other words that the string length is 10 to 99.
-
The string length is itself
an integer, and it forms the input to the TCP/IP Send block - which assumes
that the string lenght data is itself two bytes long.
-
Then, the string itself
is sent.
-
The
front panel for this sub-vi is shown below.

Note the following here.
-
There are two inputs to
the sub-vi.
-
The Connection ID
-
The Error Status signal
-
The string that was sent.
-
There are three outputs
from the sub-vi.
-
The Connection ID
-
The Error Status signal
All of this leads to the following icon - with
inputs and outputs indicated - and which has been stored as TCPIP1.vi.
Comments
This page shows a LabView
program implemented as a sub-vi. However, you can use the parts shown
here without building a sub-vi as long as you watch the data you need to
provide and the outputs as shown above.