LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Network Shared Variable closing slowly

I have an application that is dynamically opening shared variable in subpanel applications, and then closing them using the Close Variable Connection Function prior to exiting the VI. After the VI in the subpanel has run for a few hours it takes a few seconds for the next step (a property node) to complete after exiting the subpanel. Logging shows that the calls to the Close Variable Connection Function completes and that the subpanel closes almost immediately. This only occurs if the subpanel has network published shared variables. The shared variables are hosted on the real-time controller of a cRIO and the application is running in Windows 10 Enterprise. My thoughts are that the Close Shared Variable Connection is actually not completing the close until later, and that it is locking the UI thread. I'm not sure why it takes longer if the subview has been running longer. Has anyone else experienced something similar to this and have any suggestions? This application is in LabVIEW 2021 SP1 f2

0 Kudos
Message 1 of 2
(92 Views)

When I first started using LabVIEW Real-Time (more than a decade ago), I tried Shared Variables, but they were too "flakey" and sometimes just hung the code.  I've been using Network Streams for Host-to-Target (and Target-to-Host) communication, which works very well for me.  Others on the Forum have advocated using the TCP and UDP LabVIEW functions, but I find Network Streams easier to set up and maintain (and they are similar in speed to TCP).

 

Since Channel Wires were introduced as a "hidden feature" in LabVIEW 2015, I have been using them almost exclusively in communication between VIs running on the same platform, rarely using Queues or Notifiers.

 

Bob Schor

0 Kudos
Message 2 of 2
(42 Views)