EasyManua.ls Logo

Mecademic Meca500 - The Connection and Robot State Selectors; The Code Editor Panel; Using Programs

Mecademic Meca500
66 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
30 User Manual for the Meca500 Industrial Robot (for rmware 10.1)
THE MECAPORTAL
6.3.1 The connection and robot state selectors
Normally, once the web user interface is loaded, you have not only established an HTTP connection with
the robot, but also activated the socket messaging which is the only communication channel between
the web interface and the robot. By default, the web interface connects to the robot in monitoring mode
only (as seen in Figure15). To control the robot click on the icon and select . If the robot is in error
when you connect to the robot, the connection state button will show a red blinking icon. You can
still press that button and select to only monitor or control the robot. The monitoring option can be
used to see in real-time the motion of the robot when another client (e.g., another MecaPortal, a Python
program, or a Profinet application running on a PLC) is controlling the actual robot.
Next, you need to activate and home the robot by selecting the button. A list with three options
will unroll. Click the icon to activate and home the robot. During homing, all joints rotate slightly for
approximately 4seconds. Make sure the robot is not near an obstacle.
6.4. The code editor panel
The code editor is used mainly for writing and executing simple programs, i.e., for testing. These
programs are sequences of the proprietary commands described in the Programming Manual. The
robot's command interface does not support conditionals, loops, or other flow control statements, nor
variables. The robot only accepts request commands (to get data from the robot) and motion commands
(to tell the robot how to move). The robot also supports comments in C/C++ style (e.g., // and /* */).
For complex tasks, you must write a program outside the web interface (e.g., in your preferred
integrated development environment) that parses the robot's feedback, controls the robot, and handles
all flow control logic. You can use any language that supports communication over TCP/IP (e.g., C/C++,
C#, Python, Java or even Structured Text). Note that we offer a PythonAPI on our GitHub account.
6.4.1 Using programs
You can create a new program using the button in the upper right corner of the panel. The program
name can be changed and the program saved to the robot's memory by either double-clicking on the
program tab or by clicking the icon at the bottom of the code editor panel, which is equivalent to
pressing the shortcut Ctrl-Shift-s. You can also save the program directly using the shortcut Ctrl-s.
Programs can be saved in different folders. To specify a folder, and simultaneously create it if it does
not exist, simply type the name of the folder followed by a slash, immediately before the name of the
program. You can specify multiple layers of folders. Naturally, the program names in a given folder must
be unique, as well as the sub-folder names in a given folder.
Program and folder names are case sensitive and must contain a maximum of 63 characters among the
62 alphanumericals (A..Z, a..z, 0..9), the underscore and the hyphen.
A yellow dot to the right of the program's name indicates that the program has been changed and needs
to be saved. If a syntax error is found in the code, during the saving, the yellow dot will turn red, and a
red will appear in front of each line of code containing a syntax error. Note that the syntax validation
is performed by the robot (and not by the MecaPortal) when the program is saved. Local changes won't
be validated until the program is saved again.
The programs that appear in the code editor panel are simply those open in the MecaPortal and not
necessarily in the robot's memory. The MecaPortal will locally save (in the browser's local storage) the

Table of Contents