Solution
Network streams do not support enums, numerics with units, subarrays and substrings. Defining a network stream endpoint with one of these data types will cause this error. There are ways of working around this problem as described below.
EnumsYou will get
error -314304 when trying to set the network stream data type as shown in the image below.
You can work around this by setting the data type to an integer and casting the enum to an integer before sending it. On the receiving end you can cast the integer back to an enum as shown below.
Numerics with Units
Units can be added to numerics by right-clicking the numeric and selecting Visible Items»Unit Label. Passing data of this type will throw an error (see setup below).
To pass data of this type you need to cast the data as either a integer or a double, as shown below. The opposite can be done in the reader VI.
Subarrays
Setting the network stream data type with the output of the Array Subset VI, as shown below, will throw this error.
This can be avoided by setting the data type with an empty array constant as shown below.
Substrings
Similarly, setting the data type with the output of the String Subset VI, as shown below, will throw an error.
Again, this can be avoided by setting the data type with an empty string constant (see below).
Using the above mentioned workarounds will throw error -314220 at the Read Element from Stream VI or Write Element to Stream VI after the partner VI has stopped. For example, if you stop the reader VI, the writer VI will throw the error. This error can simply be cleared since communication has finished.