View unanswered posts | View active topics It is currently Mon Dec 10, 2018 2:12 pm

Reply to topic  [ 3 posts ] 
Persistent storage of arm location 
Author Message

Joined: Wed Feb 09, 2011 6:01 pm
Posts: 1
Post Persistent storage of arm location
Our robot has an arm that is driven by an encoded Tetrix motor. We want ourprogram to be aware of the position of the arm so that we can set it to a specific number of degrees. In essence, we want to be able to treat it like a servo. Our thought was to set a "zero" position once, and use the encoders to figure out how far the arm has moved, remembering the new position each time, even between runs and when the robot is off. We've been trying to set it up using files, but we can't quite get it working (the examples aren't very clear). Any help would be greatly appreciated.

Wed Feb 09, 2011 6:26 pm
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Persistent storage of arm location
I would go with the zeroing approach. You can't rely on the arm being in the exact same position as when you switched it off. A simple push button is a great way to do detect when it has reached the zero point.

I had similar issues with my giant robot arm: . I zero'd all the positions between each run, it was by far the most reliable way of doing it. You can watch it move here:


| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Thu Feb 10, 2011 2:54 am
Profile WWW

Joined: Wed Feb 24, 2010 11:43 pm
Posts: 34
Post Re: Persistent storage of arm location
We do that with servos so they don't move at the beginning of Teleop... (we already know where our motor driven arm is all the time through a different approach).

Files seem a bit more confusing than they probably are, and there appear to be some non-documented limits... for instance, we know that naming files with the extension ".dat" works, but some others don't seem to... so all of ours use that extension.

Also, we initially create the files with more space than is needed, and just read and write one value out of the front of each file... that way there's no issues with file size errors.

Thu Feb 10, 2011 10:02 am
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.