Go to Post You can expect to see the the same old same old again this weekend! Another set of fantastic experiences for thousands of kids across the country. And once again, Mission Accomplished. - Aidan F. Browne [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-02-2011, 21:16
Metalheads81 Metalheads81 is offline
Registered User
FRC #0081
 
Join Date: Feb 2011
Location: Freeport, IL
Posts: 1
Metalheads81 is an unknown quantity at this point
Finding angles using potentiometers

Hello,

I'm new to Labview, so be easy on me and my programming hack job. Thanks already for all of your previous posts, they have been helpful.

I'm using 2 - 10 turn potentiometers with slope of 1.33mV/degree to find the angles of two joints on our robot. I'm able to acquire the voltage and move the arms fine, but I would like to have preset heights that correspond to certain buttons.

A couple weeks ago I put together some code and verified that it worked. It compared the voltage and turned the motor a direction whether it was greater than or less than the desired voltage. After I got further along I converted buttons on the controller to an array, then array to number, and finally to a case. There I wanted to put different voltages in there for the different positions.

I then migrated all of the arm code to periodic tasks because I read that it is the preferred location for the robot tasks.

As of now, if I press a button to go to a location it will move in that direction, but pass it up. I might add that I implemented the voltage averaging of 5 bits, which seems to give a rather steady voltage. I've tried two different >, <, etc (case 1 & 2) sequences with no avail.

I then tried a PID.vi which seemed promising, but once again passed the desired location.

I probe the voltage in the vi and watch as the arm passes by the location, so theres definitely a valid voltage position being passed.

I assume that the case will repeat constantly until the button is released correct? Since its in periodic tasks does it reset every 1ms? Should this be done outside a timed structure?

Any help would be greatly appreciated. Thank you.
Attached Files
File Type: vi Periodic Tasks.vi (58.8 KB, 19 views)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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