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: 

How to run rtexe from console terminal output of CRIO

Solved!
Go to solution

Hello

I want to run the rtexe application in CRIO (9014) from the console output terminal. In my application the availabe lan port is connected to other device using cross cable. Hence i would like to change appliation using console terminal. i have tried taskspawn  command but the crio reboots. Is there any command so that i can run the application from console terminal.

0 Kudos
Message 1 of 5
(3,660 Views)

Hey,

 

I didn't try it before but I would suggest two different ways.

One thing would always be the same, you have to communicate with the serial interface (the console out) in the different executables.

 

1) Create the different RT startup executables for the cRIO. When getting the command via the serial interface to change the executable, edit the ni-rt.ini of the cRIO to start with the other executable after rebooting. Then programmatically reboot it.

In the ni-rt.ini its the"RTTarget.ApplicationPath=/c/ni-rt/startup/startup.rtexe" where you would change the name of the .rtexe.

 

2) Build just one RT startup executable which handles all the other applications as SubVIs. So when a command via the serial interface arrives you dynamically load the corresponding VI.

 

 

Hope this helps,

Christian

0 Kudos
Message 2 of 5
(3,647 Views)
Yes changing application path in ni-rt.ini is an option but for doing this i don't know  how to get any keyboard input (the new application  path) from console terminal. Moreover i have to reboot the controller everytime i change the path. Iam not able to use subvi because i have to change fpga code also at different instances.
0 Kudos
Message 3 of 5
(3,631 Views)
Solution
Accepted by topic author pk_crl

...... i don't know  how to get any keyboard input (the new application  path) from console terminal........

you can use the serial interface for standart RS232 communication. So e.g. you send 1, 2 or 3 as string to the cRIO and then you programmatically edit the ni-rt.ini to change the path between an startup1.rtexe, startup2.rtexe and startup2.rtexe.

 

Moreover i have to reboot the controller everytime i change the path.

When you use the method with more then one executable, then yes.

 

Iam not able to use subvi because i have to change fpga code also at different instances.

I don't understand why using SubVIs on RT doesn't give you the ability to change the fpga code.

So the second method e.g. would have Sub1.vi, Sub2.vi and Sub3.vi. When you get the command 2 from the serial interface you close the Reference to the FPGA1.vi which is used in Sub1.vi and you stop Sub1.vi. Then you programmatically start Sub2.vi where you open and run the FPGA2.vi.

 

 

Christian

Message 4 of 5
(3,624 Views)
Thanks for your reply. As of now iam pursuing option2. let me know if anyone come across any command for running rtexe from console prompt
0 Kudos
Message 5 of 5
(3,605 Views)