Discussion

Left ArrowBack to discussions page
MrTylerMrTyler Posts: 2 Recruit
edited August 2018 in Programming
Right now i currently have a destacking program picking up small sheets of plastic and stacking them elsewhere. The stacks start off really high. The problem we are running into is that when the stack gets low the robot is still moving extremely slow to do the pick up. I have a laser sensor giving me a number 0 through 10 telling me how close the robot is to the part. I want to have the robot move down quickly until its close to the part then slow down. I was thinking of using an IF statement that looks similar to this
 IF analog in [1] <6.5 and analog in [1] >2.5
          (robot slows down) 
I'm not sure if I should use a script code here or something else. Any help would be greatly appreciated. 

Comments

  • matthewd92matthewd92 Posts: 947Founding Pro, Tactile Sensor Beta Testers Handy
    Have you thought about using 2 points. You can have the robot move to the first point really fast and use the sensor to tell it when to stop that point and go to the next which would be a relative point.

    Set a waypoint near the bottom of the stack then place it inside an if statement with the “Check expression Continuously “ box checked. This will make a while statement. The in the else place your slower relative move

    if (sensor isn’t made) #checkbox checked
       MoveFastPoint
    else
       MoveSlowRelativePoint

    looks something like this 




    You’ll also notice I have a stopj() command. This is because I want motion to actually stop at that point so issue that command to prevent protective stops due to sudden stops. 

    Let me know if this doesn’t make sense
      
Sign In or Register to comment.
Left ArrowBack to discussions page