![]() |
Shooter Programming Help
I am currently trying to program our shooter using 1 Cim motor and 1 window motor. I am trying to set the Cim motor to be on just the Joysticks y axis and the window motor to the trigger on the joystick.
I have come up with setting up each as an individual motor and assigning them to different sections of the joystick. I have, however, reached an impass as i am unsure of how to inizialize motors in the Begin.vi and how to use the buttons themselves to spin the motors. If any one has any insight it would be appreciated. |
Re: Shooter Programming Help
The CIM motor and joystick both have a -1 to 1 range. You may need to flip the direction by multiplying by -1, or scale it by multiplying by a number less than 1.
For the button based motor control, determine exactly how you'd like the buttons and motor to behave. I suspect you'll find other questions with attached images that do something very similar. In Begin, you typically Open the motor and provide it with the PWM channel number. You then store the value giving it a useful name. That allows you to access it in other parts of the program using the same name. Greg McKaskle |
Re: Shooter Programming Help
1 Attachment(s)
To elaborate on what Greg said, I've attached a screenshot of how to initialize a motor in Begin.vi.
|
Re: Shooter Programming Help
1 Attachment(s)
To build on the reply above me, I have attached very basic code for having the joystick trigger control a motor.
|
Re: Shooter Programming Help
Quote:
|
Re: Shooter Programming Help
Quote:
That is fine. Just adjust the example I linked to accordingly. |
Re: Shooter Programming Help
What should i connect the Motor set outputs too???
|
Re: Shooter Programming Help
Quote:
|
Re: Shooter Programming Help
Quote:
|
Re: Shooter Programming Help
2 Attachment(s)
Quote:
|
Re: Shooter Programming Help
Quote:
|
Re: Shooter Programming Help
Quote:
We went back and loaded a fresh driver code with no modifications on it to check to see if maybe something happened to the robot but it worked fine with the unmoddified program |
Re: Shooter Programming Help
I'm having the same sort of problem on our robot. When using JUST the default code for mechanum, everything works fine, but the moment I try to add initializing and running another motor to the code, all the motors stop working, and get blinking lights, as if they are receiving no input signal.
Just initializing the two Shooter motors in Begin causes the problem. Here are screenshots to help ![]() |
Re: Shooter Programming Help
Quote:
Quote:
Things work when you only have a few motors defined, but then when you add more motors the problem appears. This is a clear indication that the Digital Sidecar is not receiving 12 volt power from the Power Distribution Board. Check the LED labeled "BAT" on the Digital Sidecar and make sure it's lit (the 6V and 5V LEDs should be lit as well). |
Re: Shooter Programming Help
Quote:
|
| All times are GMT -5. The time now is 12:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi