Asked — Edited

Making A Servo Stop

I'm perplexed....:) is there a simple script command that can stop a servos movement when the servo starts moving?

I am trying to use a lever switch within a gripper. When I tell the gripper to begin closing around an object, and then the object presses against the lever switch,the gripper servo could immediately stop.

I've looked thru the EZ script manual, just cant the right command or function. Any ideas? Thanks in advance.


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

PRO
Synthiam
#9  

this is the script, assuming the pressure sensor is a digital switch. Otherwise use an ADC comparison like Techno had demonstrating


REPEAT ($position, 40, 90, 4)

  # Move the servo into the position
  servo(d11, $position)

  # Check if the pressure sensor has been tripped
  IF (getdigital(d18) = true)

    # Stop the script because pressure sensor has been tripped
    halt()
  ENDIF

  sleep(100)

ENDREPEAT

#10  

Thank you again guys. I tried yours DJ,did several test and it worked pretty good. I will plan on using it with my next arm configuration.

#11  

I made a gripper using a rotating servo and 2 limit switches. The way it works is like this. Gripper opens fully and hits the open limit. When closing, it Closes until the inner switch get pushed in. And like DJ I also have foam in the gripper. The foam has to be compressed a Little to trigger the switch, this gives a good grip.

#12  

@glycol79..>Nice, at one time I though about doing something like that. Right now, im the process of mounting the whole arm assembly to the bot. Would like to upload a pic of it whe I get the chance too.