LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening and running subVI on the RT of CompactRIO

Hi,

 

         I would like to open the Front panel of a subVI in a new window, run it and close it. As you can see in the attached file, I already did it with the propertie node. But since I use the RT of the it is not working (I think that the propertie node is not supported by the RT. I would like to find an alternative to do this that is working with the RT of the COmpactRIO.

 

Thank you

 

0 Kudos
Message 1 of 8
(3,013 Views)

The basic thing to keep in mind is that on RT you are coding for an embedded processor.  Many of the UI functions are not supported.  I do believe that subpanels and some control properties are supported but things like FP.Open cannot be supported since there is not UI to display the front panel.  I suppose there might be some confusion because NI does offer remote panels to a RT target but this is limited in UI functionality also.  The most general way to get UI functionality is to use network shared variables to communicate data between the RT app and your PC HMI app.

You can even bind HMI controls directly to NSV's without any programming at all.  Also, look at the extended help for any property and you will see a table that show whether it is supported by LVRT.

0 Kudos
Message 2 of 8
(2,997 Views)

Property nodes generally are not supported on RT. This is because RT is NOT supposed to be a user interface, but a layer in which data is taken. After this data is acquired it should be passed via some sort of network communication to a computer running a host. On this computer is where the user interacts.

 

I am assuming you are running the RT in the development environment and that is why there is the illusion you have a front panel. This should be used for debugging only.

 

In order to do things correctly, I'm sorry but you are going to have to rearchitect your code 😞

 

 

0 Kudos
Message 3 of 8
(2,985 Views)

Hi,

 

        Thank you for the answer. I'm relatively new to Labview, acquisition, control, FPGA, RT, CompactRIO. Honestly, here is what I understand with the CompactRIO :

 

 - The FPGA communicate with the RT. (I did it, and it is working).

 - The RT isn't made to be used as a user interface, so you need to add an other layer to the existing layers FPGA-RT. This new layer is the User Interface layer that runs on my PC.

 

Physically, how do I add this layer? Is there any example of that? How do I talk between the RT and UI interface?

 

Thank you

 

 

0 Kudos
Message 4 of 8
(2,977 Views)

Have a look at this tutorial.

 

Typical structure (modify as needed)

 

Set up RT program to have 3 threads (while loops)

 

FPGA -> put data in a DMA Target to Host FIFO -> Read Target to Host FIFO on RT in while loop 1. Put data in a queue to while loop 2

 

Read the queue in While loop 2 and process the data.

 

Take the process data and put it in another queue and pass it to while loop 3

 

In while loop 3 send the data to your host application via TCP/IP, UDP, shared variables, etc. You pick based on your application.

 

On your PC, you have a host application which reads the TCP/IP data and displays it to the user

 

 

0 Kudos
Message 5 of 8
(2,973 Views)
0 Kudos
Message 6 of 8
(2,967 Views)

@sachsm wrote:

or this...

 

http://decibel.ni.com/content/docs/DOC-9302


 

True, but it should be noted that shared variables do have their drawbacks. I don't use them for anything critical, such as a recent project where I was taking audio data at 51.2 kHz, because one lagging read from the host and you may miss some data points. It was better to put them in a queue and send them via TCP/IP so I didn't lose data. Network streams is also now an option (essentially lossless shared variables).  However, for non critical stuff like reading a single data point a few times a second, there is nothing wrong with shared variables.

0 Kudos
Message 7 of 8
(2,960 Views)

NSV's were originally designed to support the MVC (Model View Controller) architecture.  Think of the RT target is the Controller, the NSV libraries as the Model and any HMI's as the VIEW.

NSV's use the NI Publish Subscribe Protocol (PSP) which allow you to have One-One or One to Many data source/sink relationships and handles all of the events (data value changes) for you, propogating published variables to all registered subscribers - very powerful.  I use NSV for all my RT to HMI communications and also 24/7 data logging to a citadel DB at up to 20hz across 100's of channels and it has never missed a beat.  For command response you will need to add some sort of return notification for critical messages, but that would also be the case with DIY TCPIP.

0 Kudos
Message 8 of 8
(2,946 Views)