LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO with UI interface structure

Solved!
Go to solution

Hi guys,

 

I am new to Labview and about to start my first cRIO VI. My question is a bit general so I will try to make it as clear as possible.

 

My project will include a user interface screen where user initially sets some parameters which are passed to RIO via a central UI cluster. This cluster includes both controls and indicators (all sensors/controllers passing through RIO) which need to be changed/updated real time. 

 

Looking at the cRIO examples found in the developer's guide, it seems that all VIs are loaded from within the cRIO folder present in a project. Is this the standard practice? Should I also run my UI screen vi from cRIO. Wouldn't it be better if I run it locally (i.e. inside host folder in project) and call all the RIO sub-VIs from within it? Also, what about the type definition controllers? Shouldn't this also be placed in the local host folder? My problem is that running the main UI vi directly from RIO has some limitations (e.g. cannot use invoke nodes to open/close certain VIs and cannot use sub-panels).

 

Thanks for your time,

Harry

0 Kudos
Message 1 of 5
(2,902 Views)

You are on the right track. The user interface is supposed to be on the host machine. The cRIO has a real time operating system and as such, shouldn't have a UI on it, which means that it's front panel isn't supposed to be used for UI. Your host VI should communicate all information to the cRIO code through communication protocols like TCP/IP or Shared Variables.

 

So, build a VI that does UI on the host machine. Create shared variables on the host machine as well. Transfer all data on the host front panel through shared variables to the Real Time VI. And, let the real time VI take care of acquisition, control, processing etc. Hope that makes sense. If you have any questions, please don't hesitate to ask.

Real-Time VI to Host VI Communication Methods

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(2,896 Views)
Solution
Accepted by topic author charmand79

Adnan,

 

thanks for the very quick response and the very clear answer.. I feel very confident to carry on with my project now...

 

Cheers,

Harry 

0 Kudos
Message 3 of 5
(2,886 Views)

Hi again,

 

in continuation to my previous question.. There is a very large number of controls/indicators that will need to be passed from the host to RIO and then updated from RIO to host front panel. I have attached a screenshot of the front panel, as it looks on the host machine. The user must be able to update any controller value and read any indicator value in real-time (well, real-time for human standards, say at 2-3 Hz or so..).

 

How should I go on passing this data to RIO and then receiving it back? If I create a network shared variable for each controller on the front panel and passing it into RIO via a type definition cluster wouldn't it be too much for RIO?? In this case, RIO would have to read all the controllers passed on from the host, perform lots of logic (10+ PIDs) and then pass the data back to the host for front panel updating.

 

My requirement is to have a timed-loop running all RIO control and logic at less than 100 ms. I am thinking of running a parallel while loop every 500ms or so to give and get data from host to rio and back.

 

I have attached a schematic VI of how I believe it could work and would like to check for your opinions..

 

Apologies for my long message, I have no real Labview experience and I just want to make sure that I can start writing my code without realising half-way there that I am driving to a dead end...

 

Much much appeciated,

Harry

 

Download All
0 Kudos
Message 4 of 5
(2,839 Views)

I am not sure what the question is but it seems to me that you are on the right track. Network communication should always take place in a separate slower loop with respect to the control loop. You can use a cluster to transfer data back and forth and build the cluster from all the variables. These might be helpful:

How Do I Create a Shared Variable with a Cluster Data Type Using LabVIEW 8.x?

Using the LabVIEW Shared Variable

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 5 of 5
(2,823 Views)