LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

cvi network vaiable user interface bug

I'm having an issue where my program stops updating, and is basically setting at the runuserinterface() function if I update a numeric control that is bound to a network variable.  If I operate the control from the front panel, it's ok.  If I use SetCtrlVal it hangs the program up.

 

I'm working on a progra developed by a colleague, and it's quasi multithreaded, but I'm not that familiar with it yet.  The control updates fine with no problems as long as it's not bound to the network variable.

0 Kudos
Message 1 of 6
(3,952 Views)

Hi TerryMoss,

 

When using the network variable, are you attempting to pass data to somewhere on another computer, or a different application on the same computer? Have you ever been able to transfer data using the network variable, or has this problem always occurred? Are there any callback functions in your code which interact with this particular numeric control?

Tom D.
Staff Software Engineer
NI
0 Kudos
Message 2 of 6
(3,926 Views)

Hi Tom,

 

The communication is only on the local PC, not accross any network.  There is no callback function associated with it.

 

It works fine if I use a Data Socket variable.

 

Thanks,

 

Terry Moss

0 Kudos
Message 3 of 6
(3,906 Views)

Hi TerryMoss,

 

Are you able to successfully transfer data using network variables in any of the LabWindows/CVI shipping examples? You can find them in the Example Finder, which is located at Help -> Find Examples... There are network variable examples located in Networking -> Network Variable.

 

I have attached, at the bottom of this post, a link to a tutorial which brings up a few other ideas. Most notably, I am wondering whether there may be a network variable resource somewhere in your code which is not being closed?

 

Tips for Using the Network Variable Library: http://zone.ni.com/reference/en-XX/help/370051V-01/cvi/libref/cvinetvartips/

Tom D.
Staff Software Engineer
NI
0 Kudos
Message 4 of 6
(3,876 Views)

I have other network variables that work in this program.

 

They are declared programatically, the one I'm have an issue is only connected with the bind option in the control itself.

 

I did the data socket the same way, and it works.

 

Terrry Moss

0 Kudos
Message 5 of 6
(3,828 Views)

Hi Terry,

 

Can you create a simple test application that has a single control bound to a network shared variable on the local host? If that works, there may be other code variable causing issues. Do you know if the callback for that control does any other processing?

 

I recommend putting break points in your code to find exactly where the application is hanging.

JD B.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,798 Views)