11-22-2024 06:43 AM
We have a system of five cRIO-9053s. One is a master and four are slaves. It uses network streams to pass basic status information from the slaves to the master. It is one direction only. Slaves 1 and 2 run identical code. Slaves 3 and 4 run identical code. The differences are minor based on the IO modules installed. The network streams code is identical in all four slaves. We packaged a custom VI to setup the network stream channels, and all 9053's use this VI.
In slave 1 (and only slave 1), the Create Network Stream Writer Endpoint function randomly generates error -314302 and will not establish communications with the master. "The remote endpoint is already connected to another endpoint. Each endpoint can connect to only one other endpoint at a time." We monitored the error output in the master's Create Network Stream Reader Endpoint function, and it is not generating any error. In the master, the reader name string for each slave's Create Network Stream Reader Endpoint function is the slave's IP address so I cannot see how the remote endpoint can be already connected to another endpoint.
Code was developed in LabVIEW 2022 Q3.
Google search finds no info on this error. Any suggestions would be greatly appreciated.
Solved! Go to Solution.
11-24-2024 04:38 PM
This is (probably) either a Hardware or Software error.
Hardware suggestions:
Software suggestions:
Bob Schor
11-25-2024 07:05 AM
We performed an IP swap between S1 and S2. The problem followed the IP address.
Attached are screen captures of setting up the Write for the four slaves and the Read for the master.
11-26-2024 08:09 AM
I've been reading the NI application note "Specifying Network Stream Endpoint URLs". I'm thinking that my reader endpoint creation is not correct for multiple writers.
The VI that contains the Create Network Stream Reader Endpoint function is called for each remote node (S1->S4 and the operator panel). The VI is set to preallocated clone reentrant execution. I pass a string containing the IP address of the writer node into the VI, but I'm not using it. The reader tag string is the same for all four writer nodes.
Therefore I'm wondering how the reader knows which of the four writer nodes it's connecting to.
11-26-2024 09:35 AM
I usually avoid network streams because of the named connection. You'll need to create a unique name for each device that would be connecting.
11-26-2024 06:14 PM
Correction to my previous: The string containing the IP address of the writer (slave) node is also wired to the reader name input on the (master) Create Reader Endpoint function. The writer URL input is not wired to anything.
11-28-2024 09:16 AM
I think we found the problem thanks to NI's ability of conditional probing of non-reentrant execution code. We set probing for all conditions (Error, Warning, Code) and stopped execution after the first iteration.
We discovered that for the slaves, the write endpoint was being created with the default writer name value from the front panel, and not the desired writer name that is determined in a different section of code. A small wait loop with a state comparison was added. Once the states matched, the rest of the code, including the network stream Create Network Stream Writer Endpoint function, executed.
So far, testing indicates that we've fixed the -314302 error.