Thumbnail

Movement Script

How to add the Movement Script robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Scripting category tab.
  5. Press the Movement Script icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Movement Script robot skill.


How to use the Movement Script robot skill

This skill allows you to trigger scripts based on the robot's movement. It is best to understand what a movement panel is by reading this support document first.

For example, all "Movements" are global. So if you use a Movement Panel of any kind, this skill will execute the script for the movement direction that was activated, such as if you have a Modified Servo Movement Panel and press FORWARD, the respective Forward Script in the settings of this skill will execute.

You can assign a different script to the robot's direction. The respective script for each movement is executed when the movement is changed. You can obtain the current direction and speed within the script using the getSpeed functions and the $DIRECTION variable. The method of obtaining global variables or speed functions differs depending on your programming language (javascript, python, or ezscript). You can check the manual on this website for the programming language that you're using to see how to access global variables or the getSpeed functions.



Main Window



1. Pause Checkbox
When checked, the movement scripts will be paused and won't execute when movement commands are activated.

2. Movement Command Display
Displays the movement command that was activated.

3. Movement Panel
When a movement panel is activated by scripts or directions being pressed, it will cause the scripts set up in the Movement script skill to be executed according to the direction (or stop) command it receives.

Settings


In the settings window, you can select the script that will execute when the respective direction is selected. Press the button to edit the script for each direction, and the script editor will load. If you need to get the direction or speed within a script, there are functions available for each programming language supported by ARC (javascript, python, and ezscript). Check the manual for the programming language on the Synthiam website in the support section for information on how to access that movement data. Also, the movement panel support document has more details on how to access the movement direction and speed.


1. Script Buttons
Click these script buttons to enter a script corresponding to each direction and stop.


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.