|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Due to some unfortunate circumstances we have lost our programming team and code. Because of this and our upcoming regional (Colorado) we are in need for some dire help.
Our code, we think, isn’t that hard to do and would appreciate any and all help that we could get. Our current set up is 4 jaguars powering 2 CIMple boxes (2 CIMs per trany) and a spike powering a window motor. What we would like the code to be able to do would be run a tank drive system where if either of the 2 triggers are pressed on the joystick then we can run our CIMs at 50% speed and if the buttons are not pressed then we can run the CIMs at 100% speed. The spike controls our window motors which raises and lowers two “wings”. What would be nice if this could with a button push on a joystick turn the winch until a limit switch is pressed turning the motor off, then when the same (or another button) is pressed the motor then reverses and raises the wings until another limit switch is pressed. Thanks for anything you can do, Bryan Fisher Team Captain 2240 - Brute Force |
|
#2
|
|||||
|
|||||
|
Re: Help Needed please
Do you have an up-to-date copy of LabVIEW for FRC? Do you have anyone who knows anything about LabVIEW? What you're asking is indeed easy to do, and it shouldn't be hard to talk you through it.
You have two motors on each side? The default robot project is set up to use two-motor drive. You will need to replace that section in Begin.vi with four-motor drive, specify which PWM outputs go to each Jaguar, and verify the proper directions of each motor. You want to use tank drive? The default robot project uses arcade drive. You will need to open a second joystick in Begin.vi, get its Y axis value in Teleop.vi, replace the arcade drive function in Teleop.vi with a tank drive function, and wire the appropriate Y axis joysticks to the drive function inputs. You want to reduce power by half when either joystick trigger is pressed? You will need to unbundle the trigger values from the Buttons output of each joystick get function, "or" them together, and use the resulting boolean value to select either 0.5 or 1.0 as the input to a multiplication function on the Y axis values of each joystick. You want to control a Spike relay from two joystick buttons and two limit switches? That's more involved. The way you describe the desired function, it isn't very complicated, but you need to specify exactly what you want the motor to do and exactly when you want it to do it. If you just want to run the motor while a button is pressed, with the limit switch preventing it from running too far, that's not hard at all. If you want the motor to start running when the button is pressed and keep running until it reaches the limit even if the button is released in the meantime, that's still not hard, but it is a little less straightforward. Is that enough to start you in the right direction? How much hand-holding would you like? If you can itemize which pins on the Digital Sidecar your Jaguars, Spike, and limit switches are connected to, I can give you detailed directions on what to do. |
|
#3
|
|||
|
|||
|
Re: Help Needed please
If that doesn't help as much as you want. I have been helping a ton of teams with labView. I use some programs to take control, show you what to do and make sure things work.
Contact me if you want more detailed help. Yahoo!: koo_04@yahoo.com Skype: Awesomemess Yahoo Messenger: koo_04 phone #: PM me for that. =p If you have another preferred way of contact, let me know. I have many many ways. I am sure I have one you do. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|