LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation of RT Project using cRIO 9053

Hello together,

 

I am currently doing my Masters Thesis (Developing a Real Time LabView Application for simulating a Throttle Valve)

Therefore, i use a cRIO 9053 Embedded Controller. I am running the GUI as a VI on the Host (PC Main) and the Simulation itself as a Real-Time VI on the Target ("RT Simulation"). Communication between host and target is implemented using network variables. I also have a second RealTime Target VI named "RT Regelung" for controlling the valve position of a real throttle valve.

Now i need to compile the whole project into an executable application (.exe).

 

My Expectation of the finished Product:

1. Start the Application --> The Host VI's Frontpanel (GUI) opens up and the Connection between Host and Target gets established.

2. Select a Target VI in the GUI/Host VI's Frontpanel ("RT Regelung" or "RT Simulation") --> The selected Target VI is started in the background.

3. After finishing the desired work you stop the Target VI by pressing a button in the GUI. (Already built in).

 

And now the question:

- How exactly does this work with a Real-Time Project like mine?

- Do i have to compile every VI on it's own? What about the library?

- How do you establish the connection between the Host and the target when executing the Application?

- Can you start the Target VI's using a button in the Host VI? (Only one Target VI should be running at a time).

 

Can anybody give me a step by step explanation of how this could work?

Thanks in advance!

 

You can find the project, all VI's and the library attached. 

 

Download All
0 Kudos
Message 1 of 8
(2,442 Views)

Hi Peet,

 

put both RT VIs as subVIs into a RTMain VI. Then use one more NSV in the host to select which of both subVIs to call…

Best regards,
GerdW


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

Hi Gerd,

have ou looked at my RT VI's? Problem is, that the Inputs, as well as the Outputs of the Sub VI's "RT Regelung" and "RT Simulation" are only NSV's. 

Do i get it right, that you suggest to include the Sub VI's into a case structure in RT Main? The Cases in which the Sub VI's are included for example are:

NSV1-change of value --> (start Sub VI1) and

NSV2-change of value --> (start Sub VI2)?

 

And how can i programmatically launch the RT Main VI on the target from my PC Main VI on the host?

 

Thank you in advance!

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

Hi Peet,

 


@Peet95 wrote:

Do i get it right, that you suggest to include the Sub VI's into a case structure in RT Main? The Cases in which the Sub VI's are included for example are:

NSV1-change of value --> (start Sub VI1) and

NSV2-change of value --> (start Sub VI2)?


That's basically my suggestion.

I would use just one NSV to select the subVI to execute like:

0 = no selection, wait

1 = start subVI1

2 = start subVI2

 


@Peet95 wrote:

And how can i programmatically launch the RT Main VI on the target from my PC Main VI on the host?


You cannot start a VI programmatically on your RT target just by starting your host PC VI.

Instead that RT VI is started when the cRIO boots up! It then waits for any remote commands from your host PC…

Best regards,
GerdW


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

Hi Gerd, 

 

thanks again for your fast reply!

 

Can you describe, how i have to compile which part of the whole project?

As i understand, you can compile all the code on your host as an executable and all the code on the target separately. Which Selections do i have to make in this process?

And how/when does the connection between the host and the target happen? When executing the host app?

 

That part is completely new to me. Sorry for that.

 

Regards,

Peter

0 Kudos
Message 5 of 8
(2,376 Views)

Hi Peter,

 

there are cRIO basics tutorials by NI, which explain the process.

Did you take them already?

Best regards,
GerdW


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

Hi Gerd,

 

already watched them, but there are no explanations regarding the Deployment into an RT Application.

 

I know that you can build an RT Application with the "RT Main" VI as Source File. But what about the two Sub VI's? Do i also have to include them in "Startup VI's" when building the app? The only VI that should start up when powering on the cRIO is the "RT Main" VI.

What I also have to mention is, that the whole Tool for controlling and simulating the Throttle Valves should be executable without any LabView Licences. Is that even possibe?

I now have implemented the RT Main VI and i am also able to execute and stop the two Sub VI's via a button in the GUI (Host VI).

 

You can find the updated VI's attached.

PC Main --> GUI VI on the Host PC, which should be executable as a desktop App.

RT Main --> Main VI on the RT Target that should startup when powering on the cRIO

RT Simulation & RT Regelung --> Sub VI's that are now included in RT Main and called/stopped via a NSV from the GUI.

 

Thanks!

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

Hi Peter,

 


@Peet95 wrote:

I know that you can build an RT Application with the "RT Main" VI as Source File. But what about the two Sub VI's? Do i also have to include them in "Startup VI's" when building the app? The only VI that should start up when powering on the cRIO is the "RT Main" VI.


Usually there is only one startup VI - and this is your RTMain! You don't need to add your subVIs as "startup VI"…

(It's the same as with an executable for your WindowsPC: there's also only one startup VI!)

 


@Peet95 wrote:

What I also have to mention is, that the whole Tool for controlling and simulating the Throttle Valves should be executable without any LabView Licences. Is that even possibe?


Yes, create an executable from your host VI. (Read the EULA to learn about the things you need to obey for distributing executables! NI wants you to include an "About…" dialog mentioning NI!)

 

Best regards,
GerdW


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