Canada
Asked — Edited
Resolved Resolved by CochranRobotics!

Set(Digital Port,On/Off) Questions

I'm having a problem getting the Set(digital port,on/off) to work. If I run this code, it works....once.


Set(1.D22,on)
Sleep(300)
servo(1.D22,90)
sleep(5000)
servo(1.D22,40)
sleep(5000)
servo(1.D22,90)
sleep(5000)
servo(1.D22,130)
sleep(5000)
servo(1.D22,90)
sleep(2500)

Set(1.D22,off)

When I run it again, the servo does not move. The code runs without any errors. The only way I can get it to work again is by shutting down the program and the EZB's and restarting. I must not be doing something right, the port is turned off by the command (i can hear that in the servo) but the Set On command doesn't turn it back on.


ARC Pro

Upgrade to ARC Pro

Don't limit your robot's potential – subscribe to ARC Pro and transform it into a dynamic, intelligent machine.

#9  

I clearly did not understand the Set On and Off command. Thanks Dave and Alan for explaining it and you were right, the Release command was what I needed.