3. Using the BLOCKLY function
Blockly is an open-source graphical programming platform created by Google, which is easily to be learnt and applied by starters.
Step 1. Introduction of Blockly panel
Click the BLOCKLY tab in the software interface to switch to Blockly panel.
Drag and drop the Blockly module from the Selection Panel 1 to the Programming Panel 2 to program. The Code Panel 3 would show the python codes of the Blockly module on the Programming Panel. Drag the dividing axis to adjust the size of the work area or hide the code area.
Step 2. Basic functions
New: create new folder
Open: open a local file
Save: save the file, which is saved to the “data” directory by default
Save As: save the modified file
Export: export Gcode to a local folder
Download: download Gcode to the robotic arm sub control board
Run: run the code in the work area
Step: choose a code block in the work area, and run the code in separate steps
Step 3. Blockly programming module
There are 14 commonly used programming code blocks in the action options:
Zero position: the Mirobot moves from the current position to the full zero position under the angle mode.
Pause send() seconds: the next instruction is issued after the program delays the specified time.
Delay time () seconds: execute the next instruction after the specified time.
Position move(): Mirobot moves from the current position to the specified position in the coordinate mode.
Move (forward/backward/up/down) number () speed (): move the specified coordinate number from the current position in the specified direction.
Suction cup (on / off): control the opening or closing of suction cup.
Gripper (open/close): control the opening or closing of the end tools.
Slider move to () speed (): control the slide rail to move to the specified position.
Conveyor move (relative position/absolute position) speed (): control the conveyor belt to move to the specified position.
Rotation Angle: the Mirobot robot arm moves from the current position to the specified position in the angle mode.
Turn (joint X) (counter/clockwise) : let the Mirobot Specify joint move clockwise or counterclockwise to the designated coordinates.
Door track movement: move to the specified relative or absolute position with the gate trajectory.
Arc trajectory movement: draw the arc according to the requirements of arc trajectory movement.
Step 4. A sample of Blocly programming: making the robotic arm move
Homing the robotic arm
The following actions cycle 10 times
The robotic arm move from the "zero position" to point A at a speed of 1500mm/min. The coordinate is "X202Y0Z20", and the end posture remains unchanged.
The robotic arm moves from point A to point B at a speed of 1500mm/min. The coordinate is "X202Y0Z200", and the end posture remains unchanged.
The robotic arm returns to the zero position from point B at a speed of 1500mm/min.
The first axis rotates to the absolute position + 20°at a speed of 1500°/ min.
The first axis rotates to the absolute position - 20°at a speed of 1500°/ min.
The robotic arm returns to zero position.