05-20-2015 05:25 PM
Hi all,
My company has recently moved an old piece of equipment to my current location and asked for it to get running in the current location. The piece of equipment uses a desktop (running Windows 2000 and Labview 6) and a laptop (running Windows XP and LabView 7). The laptop is connected via VI Server to the desktop and previously was able to set controls and run VIs on the desktop.
After correcting the filepaths and ip address (used to be on a network, now connected directly with crossover cable), I am able to set controls on the VI running on the desktop from the laptop as in the following:
This works, in the example above setting the value of A to 77 on the vi 'Add A&B.vi' running on the desktop. Add A&B.vi is a VI I wrote that literally just adds 2 doubles, A & B.
However, when I try to run Add A&B.vi as shown below, LabView gets grumpy.
Essentially atfter the Run VI method in the Invoke node, LabView responds with an 'Error 1 Occurred at Invoke node' message (An input parameter is invalid). I'm obviously using the same reference for the Set Control method as the Run VI method, but for some reason the Run VI method won't function.
The desktop (LV6) is running a simple server that looks like this:
Not sure it's working correctly, though it doesn't have any errors, and again I can set controls on the desktop from the laptop, just not run the VI. Hoping someone might have some suggestions to try as I'm pretty stuck. I do not enjoy inherited code, especially 10+ year old code. : (
Thanks in advance,
Patrick
05-22-2015 03:53 PM
So, I think I have solved my own question. Between LV6 and LV7 it looks like several of the invoke node methods were changed significantly. RunVI, for instance went from 1 input (Wait until Done) in LV6 to 2 inputs (Wait Until Done & Auto Dispose Ref). This causes the error I was seeing, and also explains why certain methods like Set Control Value were apparently not changed and so had no error.
My bigger mistake was simply clicking on the VI on the laptop which automatically loaded up LV7 instead of LV6 which would have prevented this mess. I now have to undo the damage I caused by "fixing" several of the subvis.
For anyone reading this in the future that needs to run a LV6 VI on a remote computer from a different LV7 computer, it does appear I could have worked around this problem by using the call by reference node to run the VI which worked fine on my test case, but would have required rewriting a bunch of spaghetti code, so wasn't a great answer for me.
05-22-2015 04:08 PM
Congratulations on getting this working. I similarly "inherited" a LabVIEW 7.0 RT system, with the Host on Windows XP and the Remote on a PXI chassis. The code was pretty messy (the main RT loop took about 30-40 "screens" to view), so I was reduced to "fixing bugs" and "making minor enhancements". I recently finish Version 2.0, written in LabVIEW 2012 and 2014 and Windows 7 (instead of LabVIEW 7!) -- code is much simpler, more modular, runs several times faster, and (best of all!) we don't mysteriously lose data, even though we're sampling at twice the data rate with more channels! And we are streaming the data to the Host and thereby to disk in real-time!
[I was about to fire up my VMWare Windows XP system and see how we handled VI Server on the (now obsolete) system, but you got it figured out, first. What you showed looked very familiar ...].
Bob Schor