LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open Application Reference - no errors but still does not work

Hi,

I have a problem and I have no idea why as I have no errors.

 

I am writing a DAQ system (science) and I want to connect to VIs in the Main Program through "Open VI Reference". It works very well while I am on the same computer. However, when I try to do the same thing from another computer it does not work.

 

Generally the idea is to change some values in the Main Program from VIs on other computers. Attached you will find two VIs which I use to connect to the Main Program (only test.vi is important). When I change a value of "enum" it should change a value of "command" in the Main Program. 

test1.png

I have no errors. It even read the value of "Command" when I changed to "Ctrl Val. Get". However, it read it only once. 

Also, when I write and read value of "Command" in test.vi I see change, but only in that .vi. I do not see any change in the Main Program.

 

Any ideas?

 

This is the scrren of VI Sercer. Properties in the Main Program are very similar (also a lot of "*" and the same things are checked).

CIServer.png

 

Thank you in advance!

Download All
0 Kudos
Message 1 of 6
(3,027 Views)

A decade ago (with LabVIEW 7.0), we passed data between machines doing something like what you are attempting -- I recall it as very clumsy and confusing to use.  For the last 4-6 years, we've been using Network Streams and Producer/Consumer architectures to do this, with much better results.

 

When I get back to work next week, I'll see if I can dig up some of the old code and figure out what we did ...

 

Bob Schor

0 Kudos
Message 2 of 6
(2,996 Views)

Hi,

 

thank you for your response. I will be grateful if you may tell me more about what you have done.

Actually, we thought that maybe Open VI Reference will be better than Network variables and things like that, but after your response I am going to check it better.

 

Best,

Basia

0 Kudos
Message 3 of 6
(2,975 Views)

When LabVIEW 8.something came out with Shared Network Variables, I got very excited and said "This is what I need to use!".  Every time I tried, it took about a month for me to rip them out of my code.  As recently as two years ago, when I was doing almost everything else with Network Streams (I had a LabVIEW RT Project that had four Streams going -- two being Message Handler Channels, Host to Remote and Remote to Host, one being an Analog Stream Data to Host, and the last being a Stream of "episodic Data" (button pushes, state transitions, etc.) from Remote to Host.

 

I'll go look for the LabVIEW 7 code and how we did things back then ...

 

Bob Schor

0 Kudos
Message 4 of 6
(2,965 Views)

Saved by Subversion!  Instead of trying to fire up an XP VM my student and I used for developing this old code, I downloaded it from Subversion, opened it with LabVIEW 2012 (since I didn't need to actually run it in LabVIEW 7), and found the "pieces" that are relevant.

 

We actually had 4 of these systems running, each shuttling a different type of data from Remote-to-Host (as in this example) or Host-to-Remote.  There are four VIs that handle this, two on each end.  Open PC-PXI Com Queues and you'll see a diagram of the four VIs that handle transferring User Events (a typed Enum) from the Remote to the Host.  To send an Event to the Host, the Remote puts it on a User Com Event Queue (there are multiple instances of this VI scattered throughout the Remote program, one for every place where we want to send an Event to the Host).  The Dequeuer of this Queue is VIG Remote User Com Queue -- it gathers the Events and transmits them using a VI Server Call to the VIG User Com Queue running on the Host.  Finally, the VIG User Queue, also running on the Host, dequeues these Events.  Thus Events placed on the User Com Event Queue on the Remote ultimately get dequeued (in order!) on the VIG User Queue running on the Host.

 

A note about the structure of these four Queue VIs/VIGs.  These are, in reality, Action Engines (I kept the name we used -- it was given to these routines more than a decade ago) that create something I call a "Wireless Queue", as the Queue "wire" remains inside the Action Engine.  Note that there's a "logical flaw" in this implementation, but that's irrelevant to the "How do you communicate between machines using VI Server" question.

 

Hope this is helpful.  Again, I don't do it this way any more, I use Network Streams instead.

 

Bob Schor

0 Kudos
Message 5 of 6
(2,958 Views)

Did you set the VI server options in the project not just the default server?

 

Try to set the FP as open just to make sure that you are targeting the VI in the context you think it is running in. Could be its working but in the wrong context so you never see it.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,952 Views)