|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Robot "twitching?"
I got the robot to stop twitching! Not by disabling the safety, but by moving the code I had running delays to periodic tasks. But now the joystick values don't ever get updated. Without the compressor, the sequence runs perfect, just how i wanted it
![]() Last edited by Invictus3593 : 09-02-2013 at 14:36. |
|
#2
|
|||
|
|||
|
Re: Robot "twitching?"
Quote:
Are there messages being sent to the diagnostics? Greg McKaskle |
|
#3
|
|||||
|
|||||
|
Re: Robot "twitching?"
Quote:
I don't want to thread jack. |
|
#4
|
|||||
|
|||||
|
Re: Robot "twitching?"
That probably means the Joystick Gets are misplaced.
Post the code you have now and we'll help troubleshoot that. |
|
#5
|
||||
|
||||
|
Re: Robot "twitching?"
Here are both Teleop and Periodic Tasks. Do you need begin for the compressor's start?
The sequence in periodic works great, but no relay fired. EDIT: It gave me an code of "-44027" when I put a probe on the error line in Begin.vi. I'm not sure what that means, but it told me it's an unidentified error. Last edited by Invictus3593 : 11-02-2013 at 16:23. |
|
#6
|
|||||
|
|||||
|
Re: Robot "twitching?"
No Relays were harmed in the running of this code, because those are solenoids.
What kind of solenoid are you using? The code assumes it is a single solenoid (one physical set of wires). the solenoids we've goten in the kit the past couple of years have been double solenoids (two sets of physical wires). Post your Begin so we can check that out too. P.S. to your edit. A -44027 error is "FRC: The DIO channel has already been allocated." That means you've specified the same DIO more than once in Begin.vi. Probably the default DIO 1 came up twice. You can get info on the mysterious error numbers by going to Help->Explain Error... and typing in the error number (remember to include the negative sign if appropriate). Last edited by Mark McLeod : 11-02-2013 at 16:25. |
|
#7
|
||||
|
||||
|
Re: Robot "twitching?"
Single, it's the one from the kit, but we only connected one set of wires from the double solenoid, it works great *thumbs up!*
Here's begin for ya! |
|
#8
|
||||
|
||||
|
Re: Robot "twitching?"
You're right, I was opening DIO1 twice instead of both 1 & 2! It works perfectly now! Thanks for all your help man!
|
|
#9
|
|||||
|
|||||
|
Re: Robot "twitching?"
I see the two DIO 1's in there.
The Watchdog code isn't necessary, it's pretty circa 2009. The Safety Config took over that job. Where are you feeding it? Unfed it will shut things down. A double solenoid shouldn't work treated as a single solenoid, because real singles have a spring return, while doubles do not. I'll have to try that myself at robotics tonight. Learn something new every day. Is the first green LED on the Solenoid Module going on/off when you run your sequence? That's the best verification that your code is working. Last edited by Mark McLeod : 11-02-2013 at 16:45. |
|
#10
|
|||
|
|||
|
Re: Robot "twitching?"
I don't know if you already did it. But all you need to do is put a "dead area". In other words what is happening is your joystick are actually sending a slight amount of value to the motors, even though they aren't pushed. So just create a code that says if joystick value is between -.1 and .1 don't move.
Hope this helps, Alex Guckenberger |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|