Asked — Edited

Script Help

Hey guys I need a bit of assistance with this tiny part of a script.

IF ($Lelbowposition >68) And ($Relbowposition <1)

I want this to be known as "safe position"

So later in my larger script it will check arm" safe position "before moving forward.

Can I just use an equals sign at the end of the statement and call it " safe position"

Thanks Chris


Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming


Hey Chris - not sure I'm following you. Can you expand on this?

Also, might be a great idea to start with blockly. Follow some examples in the robot program to learn how comparisons work for IF conditions.


Hey DJ thanks for the reply. Everything Ive done is in scripting. Basically all I want is IF left elbow position is greater than 68 and left elbow is less than 1, I want to say arms are in a safe position in order to move.

so if left elbow position>68 and right elbow position <1 = safe position


Then I can use " safe position" = true to allow robot movement

                       &quot;safe position&quot; =not true do not allow movement
  1. how can a servo position be less than 1?

  2. is this script to prevent the robot from physically moving if the arms are in the way?


Hi Chris,

How about this:

IF ($Lelbowposition &gt;68) And ($Relbowposition =1)
  &quot;do something&quot;
ELSEIF ($Lelbowposition &lt;68) And ($Relbowposition &gt;1)

The "do something" is where you can put your command for movement or a Goto command to go to a movement section of your script. You can also place Say commands in each IF or ELSEIF section to have you robot tell you he's about to move or stopped because it's to dangerous to move. ;)


Yes that is what im looking for. Thanks Dave! And yes Dj it is to prevent the robot from physically moving if the arms are in a unsafe position. I came up with something different but Dave your solution is a bit more elegant. Thanks