|
Re: Programming Motors for Arm
Looking up the wiring diagrams for everything is just going to put you in circles.
For Pots you wire 3 cables (pwm cable) into an analog port on the cRIO, one to the power one to the ground and one to the wiper (the wiper is your signal).
For encoders you wire The voltage, a signal, and ground to one female pwm end and the b signal and ground to another pwm. Both of these pwm's go into the dsidecar
LabView wise for pots you read the driver station analog input (1-4) reference example "Potentiometer with Driver Station". If you want the degrees you will have to do some math which involves your potentiometer size (10K or whatever it is) and the voltage given from the analog input port on the cRIO (i think its 5v not sure though).
For encoders you need to open 2 DIO's in the begin (dsidecar ports) and put them into a couple encoder vi's (in the WPI library) which I don't know the whole row so follow the "Encoder Example" example to know for sure.
PID is a mildly complex control system (wiki it thats how I learned it a few weeks ago actually) that will slow down the motor output until it hits the correct values (or goes over in which case it will reverse).
Fun stuff and yet again with such a big post I probably forgot something.
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.
|