FIRST Forums  

Go Back   FIRST Forums > General Discussions > FIRST Programs > FIRST LEGO League > The Challenge > Programming

Reply
 
Thread Tools
  #1  
Old 05-02-2012, 11:10 AM
AngyLPer AngyLPer is offline
Junior Member
 
Join Date: Apr 2012
Posts: 7
Default Forklift program?

I want to write a program for my forklift and i want that i only have to define a variable for example: 100
and the the roboter turns his forklift up/down to the point 100 where ever the forklift is.
The roboter has at the top a touch sensor.

I say 100 and the forklift went to this point where ever the forklift is at the moment.
I worked my hole weekend on this and i didn't get a result and I hope you can help me or have a better idea how it will work.

Last edited by AngyLPer; 05-02-2012 at 11:14 AM.
Reply With Quote
  #2  
Old 05-02-2012, 12:47 PM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,707
Default Re: Forklift program?

Quote:
Originally Posted by AngyLPer View Post
I want to write a program for my forklift and i want that i only have to define a variable for example: 100
and the the roboter turns his forklift up/down to the point 100 where ever the forklift is.
The roboter has at the top a touch sensor.

I say 100 and the forklift went to this point where ever the forklift is at the moment.
I worked my hole weekend on this and i didn't get a result and I hope you can help me or have a better idea how it will work.
This question has already been answered in your line follower thread. Tom Mosher included this link that describes how the MOVE/MOTOR blocks work.

http://forums.usfirst.org/showthread...5137#post55137

Notice that the effect of multiple move commands is cumulative. Each move command starts where the last move command ended. Einstein would say that the move block duration is RELATIVE. When I ask a motor to rotate 90 degrees it rotates 90 degrees relative to where it was last commanded to go.

Your forklift is completely different. You want it to be ABSOLUTE. You want to be able to command FORKLIFT 100 and have it always to to the same location. Because the NXT Motor and Move commands are relative this means you need to do extra work. Think about the following questions:

If the motor is at 0 degrees and you want to move it to 100 degrees how far does it need to move?

If the motor is at 50 degrees and you want to move it to 100 degrees how far does it need to move?

If the motor is at X degrees and you want to move it to Y degrees how fare does it need to move?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stumped - motors self adjusting during program jbadger Programming 5 03-07-2012 04:00 PM
Program execution differs wildly from actual program atayl0r Programming 6 01-16-2012 11:30 PM
program exiting? natterbus Programming 14 11-16-2011 03:34 PM


All times are GMT -4. The time now is 03:35 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.