|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
LimitSwitches and Encoder Questions
I have a few questions so I can finish working on some programming issues before tomorrow's Boiler Maker regional.
A) Limit Switches - My team wants to use to limit switches to control our climbing device. Like once one limit switch is pushed the motor can no longer go backwards. I have a basic understanding of limit switches from searching the forums but I don't know how you would incorporate that into the teleop vi. How would go about saying okay once the DIO input is true it prevents the motor from going backwards? B)Encoder/Autonomous - I was also asked to try to make an autonomous program that goes forward for 4inches and kicks then goes forward 40inches and kick. For one is this possible? If so how would go about getting the encoder data and then setting it to run 4inches > kick > move 40 inches forward > kick > finish. C) Toggle Button Issue - I have recently coded one of our buttons to toggle open and close one of our solenoids. The issue is it is really random in the way it acts. It will sometimes open sometimes close or it will open multiple times in one push. Yeah not pretty. I coded it just like the one found here (thanks team 358 for the wonderful resources!) Again sorry for the all questions it's just I'm trying to get a basic idea of how to run all of this and get it done by myself lol. (yay for my first year) |
|
#2
|
||||
|
||||
|
Re: LimitSwitches and Encoder Questions
A)dio is the condition for a case structure, if true, then it checks the value with a greater than 0 function,then inside with another case structure,if true, value carries through if not, set a constant 0
B)I dont know about the encoders but for autonomous you could use a set speed for example .4 to drive forward for the amount of time it takes to get to the first ball then kick then to the second and kick you can put this in a flat sequence for simplicity and to make sure the correct order is kept C)if you are using a latching button there is an example provided with this years software it is found in C:\Program Files\National Instruments\LabVIEW 8.6\examples\FRC\Driver Station Inputs\Joystick Button Latching Last edited by bladetech932 : 17-03-2010 at 22:12. |
|
#3
|
||||
|
||||
|
Re: LimitSwitches and Encoder Questions
Thanks blade
![]() |
|
#4
|
||||
|
||||
|
Re: LimitSwitches and Encoder Questions
Quote:
~ |
|
#5
|
|||||
|
|||||
|
Re: LimitSwitches and Encoder Questions
Quote:
Only do this ^ if you are using CAN!! http://forums.usfirst.org/showthread.php?t=14956 Also in the manual, but I don't feel like grabbing the rule, it's referenced in the Q&A. |
|
#6
|
||||
|
||||
|
Re: LimitSwitches and Encoder Questions
Quote:
Either they made a grammar mistake ("can" not instead of "must not" or "shall not" or "are not permitted to"), or they know something about the Jag that is not in the technical documentation. The documentation I have in front of me says nothing about the limit switch functionality being limited to use only with CAN commands. GDC's response: Please see Rule <R60-L>. You may use the limit switch inputs to the Jaguar speed controllers IF you are controlling the Jaguar via a CAN-bus connection. You can not use external limit switch inputs to the Jaguars if you are controlling them via PWM inputs ~ |
|
#7
|
||||
|
||||
|
Re: LimitSwitches and Encoder Questions
Quote:
- read and store the encoder count - set motors to move forward at the desired speed - poll the encoder count in a loop until it indicates a value that corresponds to a change of position of 4 inches - kick the ball - poll the encoder count in a loop until it indicates a value that corresponds to a change of position (from the original saved value) of 44 inches - kick the ball - stop the motors ~ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| encoder works, and then it doesn't. | jmanela | NI LabVIEW | 7 | 27-02-2010 14:21 |
| Encoder Assembly and Code | joecap5 | FRC Control System | 0 | 08-02-2010 23:56 |
| combo encoder and chain tensioner | SteveJanesch | Electrical | 8 | 17-12-2009 16:55 |
| Encoder Help with VEX and MPLAB | qnetjoe | Programming | 5 | 11-03-2007 21:04 |
| Combined Camera and PID/Encoder Code | Terry Sherman | Programming | 1 | 14-03-2005 17:59 |