LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I totaly control my application in my PXI-RT from my Windows application

I am trying to control the load, run, stop and unloading of my RT application from my remote PC GUI application over TCP/IP. The app works fine now but I have to manually load and start the RT app on the PXI system, exit without closing, switch to my Windows GUI and then start it. Then shutting down is painful, also because I have to close my windows GUI, switch back to the RT system and stop the RT app. I want to be able to stop and restart from my GUI, also. I have looked at vi server examples,etc. but do not find what I am looking for. Mostly they lack the ability to load the vi onto the remote system automatically (without some server app running already). I also would like this control t
o be independant of the type of vi (no specific vi server class) so I can load and run any vi remotely but this is not critical because the GUI currently uses the VI server refum to communicate with the normal priority thread of my RT app using Invoke Node.
0 Kudos
Message 1 of 5
(3,024 Views)
To fire it up;
Use Open VI reference to open VI that is already loaded on RT platform.
USe Invoke node "Run VI" with wait until done set false. I believe if the VI is configured to "run when opened" this step can be skipped.

To shutdown, I would suggest coding your VI to watch for a message from the windows app and act acordingly.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(3,024 Views)
Thanks. This helps me get it running but still doesn't address loading/unloading of the vis on the RT system. How do I push vis onto the RT system from my Windows LabVIEW application?
0 Kudos
Message 3 of 5
(3,024 Views)
FTP is the standard way of loading code onto tthe RT platform.

This is probably not what you are looking for because it soundes like you want to do this programmatically.

I do NOT have a quick answer on how to do that.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(3,024 Views)
You want to FTP your files down, then start them using the VI server. You can close them through one of several methods -- TCP/IP command, VI server Abort, or by setting some flag via VI server and Set Control Value. If you want to programmatically FTP your files, I recommend investing in the Internet Developers' Toolkit. If you don't have the funds available, you can use the Windows command line FTP program using System Exec.vi. The problem with that is that you won't have proper error checking, and it's a pain to generate FTP scripts or repeatedly call System EXec to handle a group of files. Also, remember that PharLap insists on 8.3 filenames, so you'll probably want to do a Save-with-Options (Application Distribution) of the appropriate VIs into a VI Library
that has a PharLap-acceptable filename.

Best of luck... RT is a strange (but powerful) beast...
0 Kudos
Message 5 of 5
(3,024 Views)