Servo Summary icon Servo Summary All-in-one servo view showing and editing servo positions and speeds; add servos and resize the control to fit. Try it →

ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

#2  

I'm not sure I understand the question. I'm new to ez script but I'd guess you'd do it something like this....


$NumberA= 5
$NumberB = $NumberA - 2
#NumberB now = 3
#or you could do something like....
$NumberA = $NumberA - 2
#NumberA = 3
#There's a command to get servo position (I don't remember it off the top of my head) But you could do something like
$TiltPosition = GetServoPosition(Dx)
#Change servo position 5 positions mathematically 
Servo(Dx,$TiltPostion-5)

I'm not 100% on the command names but ez script works just like most other languages. I believe that all of the operators are covered somewhere in the script help section on the side when you are in the script editor. You may be able to find better info there.

Hope that helps.

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#3  

Yep that's about right. All math functions are explained on the right hand side of EZ-Script, including advanced math functions.


$result = $valueA + $valueB * valueC / $valueD - $valueE
SayWait($result)