View Full Version : Simple code not functioning correctly
ProgrammerMatt
13-02-2013, 23:21
So today i wired up our robot and went to deploy code, not only did i have trouble getting the Crio to take the code but when it did only 1 of the 4 victors where actually receiving a signal, but it was blinking extremely fast and would not react to joystick moments, sometimes it would go full power and then stop and others it would do nothing at all, i did this using my code and the project example code with both the same results, i then switched to java and coded the same functions and it worked fine, is there something im doing wrong? im also running windows 8 if that has any relevance.
propionate
14-02-2013, 00:23
Could you upload copies of your VI files? Particularly Begin and Teleop
Greg McKaskle
14-02-2013, 08:51
Be sure to check that the digital breakout has power coming from the PD. When not powered, it will often be able to send the signal to a few motor controllers but typically not four.
Greg McKaskle
ProgrammerMatt
15-02-2013, 18:23
Here is a link to the whole project
https://www.dropbox.com/sh/xidw57m3566evei/rWARwpIX-O
propionate
15-02-2013, 18:42
Here is a link to the whole project
https://www.dropbox.com/sh/xidw57m3566evei/rWARwpIX-O
The code all looks fine, so I would second Mr. McKaskle's suggestion to check the electrical configuration. Make sure your DIO board has power, check the PWM cables, etc.
Alan Anderson
16-02-2013, 00:47
I don't think it would cause the problem you report, but there's a name mismatch in your code. You renamed the "Joystick 1" and "Left and Right Motors" references in Begin and in Teleop, but you didn't track down and fix (or remove) the references in Periodic Tasks.
That would give a one-time error on the Driver Station diagnostic messages display, but it shouldn't keep your motor controllers from working.
If the example project doesn't work, the trouble is usually with the wiring. But since you say a java program functioned properly, the cause is mysterious. Are you sure you didn't correct a power problem in the meantime?
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.