![]() |
Robot Disabled, yet I can still actuate a Cylinder- HELP!
All-
I witnessed something very scary last night- I was demonstrating to a student how to trigger the actuator and the cylinder fired. I then checked the disable switch, and it was set correctly. I enabled, disabled, and it STILL fired. I'm very confused- here's the relevant code section: (global variable) unsigned char ucGripperPosition = 1; //currently actuated meaning CLOSED Code:
//ucGripperPosition = 0 is NON actuated, meaning OPENSuggestions? This code runs inline with the rest of our code. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
My response is under the assumption that the piston fired when enabled and then retracted when you disabled. If all movement took place while disabled, then you have a far more serious problem.
I don't know your level of expertise so I will explain this completely so that others may learn from it. When the robot is disabled, all OI inputs get to the RC and are processed by your code. However, in that situation, the RC sets all of the outputs to neutral. What it doesn't do is clear any internal variables. So with your code, you initialize position to closed. With the robot disabled, you press both trigger and top. Your internal variables are now set to the open position, but nothing moves because you're disabled. Now if you enable, you will open because your internal state variable (currently open) is getting mapped to an output. The way to fix this is to clear your state when you're disabled. Something like this should be what you want. Code:
if(disabled_mode == ROBOT_DISABLED)Hope that helps. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
All movement of the robot is disabled and the victors are flashing their 0.5hz flicker (neutral blink). The OI shows a solid orange 'disabled' LED, and the robot's controller is flickering "disabled'. I can move the joysticks around and no movement occurs. If I hit the two buttons to fire the claw, the claw actuates. I can continuously open and close the claw while still not being able to drive the robot. I'll review the code some more... I think the compressor runs automatically too but I'm not certain. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Can you show us how you have this wired? What inputs and outputs are you using for the one that is still moving when the robot is disabled?
Is it one of the PWM / Relay ports? If not, that's the first part of your problem. I'm pretty sure everything that moves has to be on one of those ports, and not an I/O line. ttyl, --buddy |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
I agree with DaveF's suggestion to check the wiring.
Quote:
Is this reproducible? Were you using a radio or were you tethered when this happened? |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
I swear the OI disabled light is solid orange. If the robot wasn't crated I'd put a video up. Could you, uhhh, kindly relate why the IO might be triggering it this way? (Wired, from memory, from the student that told me this is how: Digital IO pin 16 to SPIKE relay, relay to valve, vale to cylinder. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
The OI is solid. When I hit autonomous with the OI, it goes to a maybe 20hz flicker. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
Digital I/O are always active! |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
Your robot is wired illegally. Move the Spike to a relay output NOW (or as soon as you get your robot out of its crate at a competition). |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
Thanks all. I'm guessing that the compressor shouldn't be wired to the digital IO either... ? Limit switches OK? |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Limit switch good for Digital I/O.
Compressor bad for Digital I/O. What is the Spike output wiring going to the compressor? The compressor is not fond of being driven in reverse... |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
We've used the OI digital inputs to select autonomous modes. It works when disabled. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
When disabled, all OI inputs are transmitted to the RC and are processed. Your robot will still try to drive the motors (but it can't because output is disabled). Fire up the Dashboard, disable your robot, and watch the PWM values as you try to drive (with it disabled). They should still change. |
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
|
Re: Robot Disabled, yet I can still actuate a Cylinder- HELP!
Quote:
I have to be more careful about that. |
| All times are GMT -5. The time now is 00:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi