Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited
Resolved Resolved by DJ Sures!

Scripts Multiple Boards


I am trying to write a script to control servos on a second EZ board. How do I address a second board.

Control at D0 on main board is Servo(D0,100).... what is the command for a second or third board?



Upgrade to ARC Pro

Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!

United Kingdom
Servo(0.D0, 100) will control the first board (Board 0)
Servo(1.D0, 100) will control the second board (Board 1)
Servo(2.D0, 100) will control the third board (Board 2)
And so on...

If you don't put the leading board number it will assume the board is board 0.

It is mentioned in the script manual. Search for the term "Multiple EZ-B Boards" or "References" for the full description/explanation.
...and how do I use this on the AutoPosition control?!

I have the arms on board 1 and the head and face on board 0...
At this moment, every time I need to compose an action that uses arms and head, I have to use TWO AutoPosition commands.. And that gives me unsync actions...

Is there a solution ?
Thanks Folks.
tevans, you will need to continue having two Auto Position controls. The Auto Positioner is unable to control more than 24 servos at one time without performance issues - so the Auto Position was limited to controlling one EZ-B at a time.
United Kingdom
An alternative would be to manually script the movements however this would not be as easy to do as using the Auto Position control and would involve a fair amount of scripting which may get rather tedious. If having two Auto Position controls is a big issue then you may need to look in to that.

For smoother movement you could use Ifs with some variables and the ServoUp and ServoDown commands along with GetServo to get the current position. It would be a lot of work with scripting though (even a simple example would be a lot of code hence why there will not be an example at the end of this - unfortunately I don't have the time right now but the script manual should explain the commands enough to work it out), personally I would use the two Auto Position controls.

How far out of sync are they when you run two actions from two Auto Position controls? I have presumed you run both together with a short script consisting of two control commands one after the other?



ControlCommand("Auto Position", AutoPositionAction, "Shake Head")
ControlCommand("Auto Position 2", AutoPositionAction, "Wave Arms")
Thanks DJ,
I understand.. But, would be too much complex to implement a command to choose the board number with each servo ?
So we could add in same AutoPosition servos on multiple boards, with a limit of 24...
Just an idea..