From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM 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.
From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM 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.
06-13-2016 05:09 PM
On a traditional blank project, the code below works... I am able to get readings from my joystick. However, when I try to run the same code on a myRIO template, the code never gets to run because of error -363031 (from Highlight Execution).
How can I fix this?
Solved! Go to Solution.
06-13-2016 06:04 PM
Well, according to the Error Message, the myRIO didn't "see" the Joystick. What makes you think that it can? [I actually have a myRIO, but my Joystick device has a Device Number > 7, and NI's implementation of the DirectInput "hooks" don't go high enough -- I've filed a suggestion to fix this on the Idea Exchange, which you can find and Kudo if you want NI to look into fixing this].
Bob Schor
06-14-2016 10:59 AM - edited 06-14-2016 11:11 AM
I think that my problem might have to do with the myRIO not being able to see the joystick. In the image attached, the Computer Joystick.vi under My Computer works. The same code, saved as Joystick RIO.vi under NI-myRIO does not run. The joystick is connected to the computer and not the myRIO.
06-14-2016 01:17 PM
Are you saying you still have the joystick connected to the PC, and you are wondering why the cRIO's VI won't run because it can't see the joystick on the PC? A completely different target?
06-14-2016 01:26 PM - edited 06-14-2016 01:27 PM
No, the idea is to keep the joystick connected to the computer (later to be used to control the myRIO which will be mounted to a rover over wifi). Can a My Computer vi be imported over to a myRIO vi?
(The code works when I plug the joystick into the myRIO but this does nothing to help me.)
06-14-2016 01:36 PM
No.
A cRIO can't see hardware that is connected to the PC.
06-14-2016 11:11 PM
Thanks for the response!
06-14-2016 11:30 PM
Background: I want to mount a myRIO to a RC Robot and control it with a joystick connected to my computer.
Is this possible?
I'm unable to use the joystick VIs on the myRIO project since the joystick is connected to my computer and not the myRIO.
I've tried creating a shared variable that contains the joystick information, but it will only work for VIs that are on My Computer and not on myRIO.
In the picture attached, Computer Joystick is the vi with all of the code. Variable 3 contains the output of Computer Joystick. Shared Var Test reads Variable 3.
"Shared Var Test" only works on My Computer and not myRIO.
06-15-2016 11:50 AM
Fix:
Create the shared variables under the myRIO target rather than under My Computer.
06-15-2016 11:52 AM
In order to keep the required hardware set up (joystick into computer & myRIO controlled via wifi), shared variables must be created under the myRIO target which is written into by VIs under the My Computer target. This allows data to be passed between different targets.