Announcement

Collapse
No announcement yet.

Forklift program?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 11:14 AM.

  • #2
    Re: Forklift program?

    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?

    Comment

    Working...
    X