Canada
Asked — Edited
Resolved Resolved by DJ Sures!

Help Needed With A Code

I have been trying to get this code to work,


#Power Up
ControlCommand("Script Manager", ScriptStart, "Amp On")
Sleep(500)
ControlCommand("Auto Release", PauseOn)
Sleep(2000)

ControlCommand("Auto Position 3", AutoPositionFrame, "Tilt Straight",100,7,4)
sleep(5000)
ControlCommand("Auto Position", AutoPositionFrame, "Rest",25,10,5)
Sleep(5000)
Sayezbwait("i am ready")
ControlCommand("Script Manager", ScriptStop, "LowPowerMonitoring")
sleep(500)
ControlCommand("Camera", CameraStart)
Sleep(500)
ControlCommand("Script Manager", ScriptStart, "Monitor")

The problem is the Auto PositionFrame "Rest" will not run,however, if I run the the code again, it will. I've played with various sleep duration's between lines in the code. I'm stumped ! Anyone got any ideas?


ARC Pro

Upgrade to ARC Pro

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.

PRO
Synthiam
#9  

But, they work the second time you run the power up?

#10  

When I run it a second or third time the "Rest" servos run but not the "Tilt Straight" servos. Edit. Other servos on Board 1 work though.

PRO
Synthiam
#11  

Try this release: https://synthiam.com/Community/Questions/9129

When the servos are in the same position and the release is called, the servos do not go back into the same position due to locking into pwm timing. The latest software release should compensate for that.

#12  

Thanks DJ, That fixed it up, everything is working great now.