A broken wire between UDP Open and a UDP communication node indicates a refnum type mismatch, not a network fault. Before anything else, inspect every primitive in the data path. Legacy example code can contain a TCP-typed UDP primitive, while current UDP primitives use a distinct UDP reference.
Resolution-path comparison
Choose the path according to the refnum types required by the complete call chain. The socket reference must pass from open through read or write to close without changing type.
| Approach | Use case | Confirmation | Primary risk |
|---|---|---|---|
| Replace mismatched primitives | Maintained applications using the current UDP reference type |
UDP Open wires directly to every UDP operation |
A legacy node can remain hidden in another case or subVI |
| Retain the complete legacy set | A frozen application that must remain in its original LabVIEW environment | All open, read, write, and close nodes accept the same legacy refnum | Mixing one current node into the chain breaks the wire |
| Type-cast the reference | Diagnostic experiment only | The cast changes wire compatibility | Compile-time acceptance does not prove that the receiving primitive can use the underlying reference safely |
For active maintenance, replace the mismatched primitive and standardize the chain on the current UDP reference. Do not use a type cast as the production repair. A refnum is a typed handle to an internal resource; changing its apparent type does not convert the resource or validate its ownership and lifetime rules.
Reference-type mechanism
LabVIEW validates wire types while editing and compiling the diagram. A UDP refnum and a TCP refnum represent different reference classes, even when both ultimately identify network sockets. When the output terminal supplies a UDP reference and the destination terminal declares a TCP reference, LabVIEW breaks the wire before any packet is transmitted.
Older UDP functions were implemented as VIs that called C code. LabVIEW 5.1 had that VI-based implementation and did not expose separate TCP and UDP refnum types. Later primitive sets distinguish the protocols. Code derived from an old example, upgraded across versions, or cross-linked to an unintended VI can therefore display UDP-oriented names while carrying incompatible connector types.
Two observed forms of the defect must be checked separately: an example UDP Receive VI can carry a TCP reference while the current node carries a UDP reference, and a legacy UDP Write can expect a TCP reference while the other UDP primitives expect a UDP reference. The label alone cannot identify which implementation is on the diagram; the terminal type and resolved node identity decide.
Primitive and dependency checks
- Open the smallest diagram containing
UDP Openand the first node with the broken wire. Remove unrelated logic only in a disposable test copy. Confirm that the wire breaks with those two nodes alone before investigating addresses, firewalls, or remote equipment. - Inspect the output type of
UDP Openand the input type of the receiving node. Do not move on until both terminals identify the same protocol reference type. - Check whether the suspect node came from an example, a copied legacy diagram, or a project library. Replace it temporarily with the corresponding primitive from the currently installed LabVIEW palette. A successful direct wire confirms that the original node resolved to a different implementation or connector definition.
- Repeat the type check for
UDP Read,UDP Write, and the closing operation used by the application. Search every case, event, and subVI that receives the reference; fixing only the visible call can leave another broken branch. - If replacement does not change the terminal type, inspect project dependencies for duplicate or unexpectedly resolved VIs. Cross-linking can cause a diagram to load a same-named legacy implementation instead of the intended primitive.
Current-primitive replacement procedure
- Create a controlled copy of the affected VI and record the existing node configuration, including wired inputs, unwired defaults, error-flow order, and any data conversions around the node.
- Place a fresh
UDP Openfrom the current palette. Wire its UDP reference directly to a freshly placed UDP read or write primitive. Confirm that the wire remains solid before recreating the surrounding logic. - Replace each suspect legacy node individually. Reconnect data and error wires by function, not merely by terminal position, because connector layouts can differ between VI-based and primitive implementations.
- Carry one UDP reference through the complete lifecycle. Branch it only to operations designed to accept that UDP type, and route execution so the close operation cannot run before the final read or write completes.
- Save, close, and reopen the VI. Confirm that LabVIEW resolves the same nodes after reload and that no broken-run indicator remains.
This repair changes the type boundary, not the network configuration. Do not alter destination addressing or other communication settings merely to clear a compile-time wire break. Those values matter only after the diagram has a valid UDP reference chain and can execute.
Legacy-set containment
If a validated legacy application cannot yet be migrated, keep its UDP functions as a complete, version-controlled set. Retrieve them from the application's known-good source archive or its original LabVIEW installation; the installation-specific location must be taken from that environment rather than inferred from a current palette.
| Containment check | Required result |
|---|---|
| Open-to-operation wiring | Every node accepts the legacy refnum type without casting |
| Dependency resolution | Each VI resolves to the archived legacy implementation |
| Migration boundary | No current UDP primitive is inserted inside the legacy reference chain |
| Maintenance test | The application reloads without relinking or broken wires |
Keep legacy and current implementations out of the same socket lifecycle. If migration is required, replace the entire open/read/write/close chain in one controlled change and retest behavior at the application boundary.
Compile-time and runtime verification
- Run the broken-VI analysis and confirm that no reference-type errors remain.
- Exercise each operational path that contains a UDP node, including cases that are inactive during the normal startup sequence. Confirm that every path uses the same UDP refnum type.
- Open and close the socket repeatedly while watching the error chain. Confirm that the application does not use the reference after close or close it while another operation still depends on it.
- Perform a local or controlled endpoint test. Send a known payload, verify that the receiving operation returns the expected bytes, and confirm that no network error replaces the original compile-time problem.
- Restart LabVIEW, reload the project, and repeat the controlled send-and-receive test. This final reload check detects unresolved cross-links that can be masked during an editing session.
Frequently asked questions
What happens if UDP Open is wired to a TCP-typed UDP node?
LabVIEW breaks the wire because the terminal types are incompatible. Replace the suspect node with the current UDP primitive and verify the terminal accepts the UDP reference.
What happens if I type-cast the UDP reference?
The diagram may become wire-compatible, but the cast does not convert the underlying resource or prove that the destination primitive can use it safely. Use a coherent UDP primitive set instead.
What happens if one legacy UDP primitive remains after migration?
That node can preserve the old TCP-typed or undifferentiated boundary and break the reference chain. Reload the project, inspect every UDP path, and complete a controlled send-and-receive test as the final verification step.