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.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Running an .exe from cRIO

Solved!
Go to solution

Hey, thanks in advance for any help given.

 

 We are currently trying to open an executable file(such as minesweeper) which is on the computer through the cRIO, however we can't use the System Exec.vi to do this (maybe we are using it wrong and we can?) Is there another way to do this? We are trying to use our robot as a joystick to play games, and so need to send keystrokes to this .exe we are trying to open. I can get it to keystroke when running off the pc, but can't open the .exe when running through the cRIO.

 

Regards

Alim Guy

 

 

0 Kudos
Message 1 of 5
(4,146 Views)
Solution
Accepted by topic author aguy004@aucklanduni.ac.nz

Hi there,

 

What I would do here is have two VIs, one on the robot and one on the computer.  The robot one will send commands to the computer (host) through shared variables, tcp/ip, UDP, or network streams (basically any network communication method).  The host vi will take those commands and start the game and actually input the "keystrokes."

 

Are you trying to do this without having any code running on the computer?  If so that will be much more difficult.

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 2 of 5
(4,141 Views)

Hey, thanks for the suggestion that definately seems do able.

 

Ideally both will be running off the cRIO. How would I go about doing this?

 

Regards

Alim Guy

0 Kudos
Message 3 of 5
(4,133 Views)

Apart from actually having the robot use the keyboard and mouse, it may be tough to have the robot control the game without some extra software running on the computer.  The thing to think about is how you would be sending commands to the computer, serial, tcp/ip, etc.  You would need something to interpret those commands into something meaningful.  A VI on the host computer is probably the easiest solution, but you can probably come up with some other creative ones.

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 4 of 5
(4,123 Views)

Hey Scott, thanks again for answering my question.

 

How would I go about sharing a real time value(i.e from a .vi running on the cRIO), to a .vi that isn't runnning off the cRIO (i.e one that is running off the computer).

 

Regards

Alim Guy

0 Kudos
Message 5 of 5
(4,101 Views)