![]() |
Re: 8 volts over talons
I have never come across a problem that's baffled me as much as this has. Is it possible to calibrate the talons while applied on a button, or does it have to read Y-axis for it to work.
|
Re: 8 volts over talons
To calibrate the Talons, you should bring them through the full -1 to 0 to 1 range.
Code:
1. Press and hold the button labeled “CAL” with a paper clip. The |
Re: 8 volts over talons
To answer the electrical questions. The shooter is composed of two CIMs, brand new. Talons, out of the box, and PWMs from AndyMark. The solder-less terminals that connect the wiring are all solid. The raceway for ALL these wires are not ran in a configuration that runs against the chassis or may have been cut, all clean, short, out in the open runs. Instead of having the load on the motors, the multimeter replaced the terminals on the talons so when the actions are live, we have the 12V and the 8V read outs on the display and the Talon LED indicator light.
With this program are two limit switches that prevent the arm to destroy it's self when it fires, and when it returns back to loading position. They work fine, we get zero volts when they are depressed. |
Re: 8 volts over talons
Quote:
|
Re: 8 volts over talons
I'm not sure that reading the output of the Talon with a voltmeter is the correct approach to understanding what is happening. You see the output of a speed controller is a pulsed output that switches between 0 and 12 VDC.
It's the duty cycle (ratio of on to off time) that determines the speed of the motor. What you are probably seeing is the average voltage that the meter is reading over time. An oscilloscope is a better tool to use for this application. Now having set that straight, I am also puzzled why you are reading a different average voltage output based on whether the joystick axis or the programmed button is providing the controlling input to the Talon's PWM input. If you have access to an oscilloscope can you see a difference in the pulse width of the PWM output to the Talon? |
Re: 8 volts over talons
Quote:
|
Re: 8 volts over talons
One problem I see with your code, although it shouldn't cause the problem you are seeing, is that the motor will not turn off if you release the button. You should probably change it to something like:
Code:
if(js.getRawButton(11)){ |
Re: 8 volts over talons
Quote:
What happens if you bind it to another button? |
Re: 8 volts over talons
Quote:
|
Re: 8 volts over talons
Quote:
I thank everyone for trying to get to the bottom of this problem.. |
Re: 8 volts over talons
Quote:
Or maybe a limiter was implemented that lowered it if it went too high, and getY() would return values like 0.99583953 which would go through, but having it be 1.0 will get it artificially lowered in the program to say 0.7? Just throwing ideas out there. |
Re: 8 volts over talons
Quote:
|
Re: 8 volts over talons
Quote:
Grasping at straws maybe but I really think the problem lies elsewhere. |
Re: 8 volts over talons
Quote:
Button state gets pulled directly from the control structure that gets set by the FRCComms library, so it's not like you can accidentally reset the state of the button in code. As far as I know, when you drop comms, the robot uses the last recieved values, so unless it's dropping long enough to fault things (which you'd notice driving), I don't think it's a comms problem. A comms problem that severe should affect things if you're using GetAxis anyways. No, I'm betting it's a windows driver/joystick setup issue. I'm going to bet that (somehow) your joystick is setup to treat holding down that button like rapidly pressing the button. So you think you're holding it, but it's actually flickering off and on, and that's getting reflected in the data from the driverstation. So if you have code for turning the motor off when the button is released, you're actually constantly turning the motor on full speed, then off. Sort of an unintended PWM on top of the PWM. Testing this theory: Set up a variable to count edges on that button and check the value of that variable. Something like: Code:
//In Robot class variable declarationsSolution: 1. Figure out why the DS or windows thinks the button is flickering. I don't know the details of your joystick/laptop setup, so you get to have fun with that. Best solution because it actually fixes the problem. 2. Two separate buttons, one to turn on the shooter, on to turn it off. Worst solution because it complicates things for your drivers. 3. Debounce the OFF side of the button press. It's tricky, but you're basically looking for the button to be off for several loops in a row, to be sure it's actually off and not flickering. This solution should fix things even if the problem is comms dropout. Code:
//In Robot class variable declarationsNote that if this is affecting this particular button, it could potentially affect ANY button where you're changing state based off whether the button is pressed or released. It won't affect things where you just set things if the button is pressed and do nothing if released. |
Re: 8 volts over talons
Also, you really need to post back here with what the problem and solution is because I'm super curious and will PM you endlessly if you don't.
|
| All times are GMT -5. The time now is 22:07. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi