Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Programming an Arm?!? (http://www.chiefdelphi.com/forums/showthread.php?t=91446)

BrynneRaines 10-02-2011 18:45

Programming an Arm?!?
 
I've only used Labview for about 7 months and I am still confused. Our team is trying to use a PID to control where the arm starts and stops. For example, only rotating 270 degrees. My problem is that I understand the mechanics of a PID and what it means. I'm just not sure how to even begin building it. I was told to connect a PID to a Motor but what else? How do I even define a program for an arm in the Begin.vi? Some help would be great! :confused:

Mark McLeod 10-02-2011 18:58

Re: Programming an Arm?!?
 
Here's an example of a motor position slaved to the position of a joystick.

You can replace the joystick with pre-defined values for preset positions.

You do need a sensor on the arm to feedback where it currently is.

BrynneRaines 10-02-2011 21:18

Re: Programming an Arm?!?
 
Quote:

Originally Posted by Mark McLeod (Post 1020145)
Here's an example of a motor position slaved to the position of a joystick.

You can replace the joystick with pre-defined values for preset positions.

You do need a sensor on the arm to feedback where it current is.

:yikes: Thank you! This helped so much.

BrynneRaines 11-02-2011 17:09

Re: Programming an Arm?!?
 
Any other suggestions? Helped but still confused, do I need to make two different programs for the shoulder and forearm. I want the shoulder to move 270 degrees and the forearm 180. How would I do this?

2829ron 11-02-2011 20:47

Re: Programming an Arm?!?
 
Have you considered doing a timed function? Motor will only run one way for a set amount of time and then stop. Then run the other way for a set time and stop.

Triapod 11-02-2011 21:56

Re: Programming an Arm?!?
 
Quote:

Originally Posted by 2829ron (Post 1020910)
Have you considered doing a timed function? Motor will only run one way for a set amount of time and then stop. Then run the other way for a set time and stop.

I considered this before, but as your battery power decreases, the output you get from your motor also decreases. So even though the time is set, the distance traveled will not be the same. Also the resulting error adds up. I'd go with Mark's idea.

You can do the two motor controls in the same way. Just copy and paste the code you have for one motor: so, have two PID controls, each wired to one of the motors and one of the sensors. The program will be the same, just different device reference and different setpoints.

lucoytoa 13-02-2011 15:57

Re: Programming an Arm?!?
 
Quote:

Originally Posted by 2829ron (Post 1020910)
Have you considered doing a timed function? Motor will only run one way for a set amount of time and then stop. Then run the other way for a set time and stop.

Do you have an example of this for Labview? We are trying this with our window motor for our claw and I want to open (reverse) for .5 seconds when button 1 is pressed and when 4 is pressed, motor goes forward .5 seconds and stops but still hold the tube securely. Thanks in advance for your help.

lucoytoa 13-02-2011 19:41

Re: Programming an Arm?!?
 
Quote:

Originally Posted by lucoytoa (Post 1022113)
Do you have an example of this for Labview? We are trying this with our window motor for our claw and I want to open (reverse) for .5 seconds when button 1 is pressed and when 4 is pressed, motor goes forward .5 seconds and stops but still hold the tube securely. Thanks in advance for your help.

I got it to work! Thanks, anyway.

2829ron 13-02-2011 22:14

Re: Programming an Arm?!?
 
Quote:

Originally Posted by lucoytoa (Post 1022252)
I got it to work! Thanks, anyway.

Just looked here and saw your question and answer. lol. Yeah I do have an example I could've shared. Tried to program it myself last year, tried it in the pit at competition. Didn't work. Programmer from another team did it for me. FIRST can be nice like that, all the GP in the air :)


All times are GMT -5. The time now is 03:52.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi