Log in

View Full Version : "Control Motor" Programming


youngpilot
08-02-2016, 20:20
Myself and the other programmer on our team are in our 2nd year of programming...so we still have questions and lots to learn! Anyways, this year we are doing something we didn't do last year- programming using "control motor" under WPI Robot Library....we have to program the motor through a Victor using a PWM....so that's achievable through "control motor".

We'd love some guidance on how to do this. Background-----the motor controls a sort of "lift" mechanism. If anyone needs further detail, please ask!

I would share some screenshots of the program...but we really don't have anything right now since we're new to it. However, the other programmer on my team did accomplish getting the motor going, but only in one direction...I can provide this if you all would need, just wanting to get this question out ASAP first.

Thanks so much-- we're just looking for guidance and maybe some examples of how to achieve this...who knows, we may be doing this completely wrong, but we're kind of stuck with this new task we didn't experience last year, and wanted to ask the experienced first!

Thank you again.

Mark McLeod
08-02-2016, 20:32
It's pretty straight forward.
I've attached a snippet of the basics.

There is a stand-alone example under Support ->Find FRC examples...
Then in the roboRIO file->Robot and Motor->Motor Control.lvproj

You are going to need to think about adding limit switches to the top and bottom of the lift to automatically stop the motor from overdriving the mechanical stops.

youngpilot
11-02-2016, 08:54
Thank you for the help! That example worked great after playing with it a little, so thanks again. We'll definitely look into the limit switches to help, we played around with them last year so that shouldn't be too much of a problem.