From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running and stopping RT and FPGA through User Interface

We are trying to figure out a way to control the RT and the FPGA in the User Interface. Sorry we are fairly new to Labview. We are using a cRIO 9074 and a 9213 thermocouple module and 2 9205 analog inputs.

 

So we already have a running FPGA that acquires AC data and sends them to our RT which reads that data and also gathers data for the DC and Thermocouple portion of the project. Now we have it all communicating to our User interface and showing the indicators and graphs as how they are suppose to. We want to be able for user to just come in and run the UI and stop the UI without having to go to the RT or FPGA. Any help on how to do that?

 

Thanks.

0 Kudos
Message 1 of 3
(3,718 Views)

Hi catcher,

 

the cRIO should run your VI(s) on startup - after you create the RTEXE and deploy it. It should run 24/7…

 

All you need is a host VI (on your PC) that uses some network communication to get data from cRIO and send commands to it.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(3,686 Views)

As Gerd notes, the current "model" for LabVIEW RT (including RT with FPGA) is for the RT Target to run its code automatically when it starts up, and to keep running its code (essentially forever).  At the same time, you have Host code that you run from the PC as a "normal" program, one that you Start by double-clicking its Icon (if an executable) or hitting the Run Arrow (if in LabVIEW Development Mode).

 

One of the first things the Host has to do is to establish connection with the Remote RT program through some communication method (which you presumably have already worked out).  Often RT systems work by the Host sending "commands" to the RT and collecting "Results".  At some point, the Host decides to Stop (you push the Stop button) -- the Host needs to first tell the RT "I'm stopping, reset yourself", and then it can go through an orderly shutdown process, closing files, destroying Queues, stopping Asynchronous Call VIs, etc.

 

The RT Target, when it gets the notification that the Host is stopping, needs to put itself back in a state where it can again respond to a new "Initial Host Command".  Sometimes the easiest way to do this is to simply execute the commands on the Target to cause it to reboot, which will force the Startup routine to run again.  Otherwise, you can programmatically "close down" the running code and go back to whatever State the Target was in when it first began executing (if your target is very slow to reboot, then this latter option might be preferable, but the reboot is surely the simplest ...).

 

Bob Schor

Message 3 of 3
(3,645 Views)