Edit on GitHub

Introduction

In computer science, a task generally means a set of relevant activities to complete the work at hand. In RoboPlus terms, a task code is a source code programmed for a robot to complete a task.
A robot operates according to the task code created by the user, and the RoboPlus Task is a program that helps the user to write task code easily. Task code files have a .tskx extension in the PC (or smartphone).
(Previous versions use a .tsk extension, which can be converted to .tskx via R+ Task 2.0)

Getting Started

Software Install

  1. Editing Tab for Each Stage
    The workspace is divided into Home Tab, Programming Tab, and Debugging Tab.

  2. Home Tab
    The following figures are the first screen right after starting the program, which includes basic samples, file related menu, update, and settings menu.

  3. Programming Tab
    The following figures display the screen for editing task source code, which provides programming toolbar, source view, outline menu, and download functions.

  4. Debugging Tab
    The following figures indicate the screen to debug the task code, which provides the output monitor and virtual remote control functions.
    (An auto-connect feature has been added for the user’s convenience.)

Resources for Task

Resources in Task Code vary depending on the device connected with the controller.

  1. If controller is connected to an external hardware such as a Dynamic Cell, then the Task Code can use it.
  2. If controller is connected to a smart app(R+ Smart or R+ IoT), then the Task Code can use it.
  3. If user has downloaded motion data into the Controller via R+ Motion, then the Task Code can use it.

Resources available in Task Code are comprised as below

Task Code Structure

Task code is comprised of 3 elements (code lines, instructions, and parameters).

  1. Parameter
    This is the smallest unit that represents variables or hardware characteristics. User can read or write the value.

  2. Instructions
    Indicates a single behavior(computation) given to the Controller to execute the program. Each instruction promises a unique behavior, and the number of parameters vary depending on the behavior(computation).

  3. Code line (Command line)
    The smallest unit that executes the program, which is a combination of instruction and parameter. Generally, the program is executed in order of the code lines.

Basic Features

File Open

  1. Move to Home Tab (When you open the program it starts on Home Tab.)
  2. Click the Example button
  3. Select the desired product, steps, and sample name
  4. Click Confirm button

Create New File

  1. Move to Home Tab (When you open the program it starts on Home Tab.)
  2. Click the New button

  3. Choose the controller model and its firmware version (1.0 - old, 2.0 - new)
  4. Click Confirm button to create new Task file

Command Edit

  1. Move to Programming Tab (When you create a new file it starts on Programming Tab.)
  2. Click the Instructions button
  3. Click the Loop category

  4. Drag the Endless Loop instruction.
  5. And drop it on the desired line to add the instruction

Parameter Edit

  1. Click the “Instructions” button
  2. Click the “Execute” category
  3. Drag the “Load” instruction,
  4. And drop it on the desired line to add instruction

  5. Double-click on the “left-side block” of the added instruction

  6. Select “Controller Device” in Category1
  7. Select “Accessory Device” on Category2
  8. Select Port number 1 and select “Geared Motor”
  9. Click the Confirm button to finish editing the instruction

  10. Double-click on the “right-side block” of the added instruction

  11. Select “Controller Constant” in Category1
  12. Select “Motor Value” on Category2
  13. Select “CCW” for Direction and put in “500” for Power
  14. Click the Confirm button to finish editing the instruction

  15. Check the edited instruction block

Download Task Code

  1. Click the “Device” button
  2. Select the device connected to the robot
  3. Click the Confirm button
  4. When the window closes, click the “Download” button

  5. When download completes, the Controller will execute the task (For some of the Controllers, the Controller will close instead of executing the task)

  1. Move to Debugging Tab
  2. Click the “Device” button
  3. Select the device connected to the robot
  4. Click the Confirm button
  5. When the window closes, click the “Start” button

  6. When robot is connected, the “Program Output Monitor” and “Virtual Remote Controller” fields will be enabled

  7. In the source code, if “Print Screen with Line(or Print Screen)” has been used,

  8. The value will be printed in the Output Monitor as below

Programming(Edit)

This section explains the basic editing functions used in R+ Task 2.0

Insert/Change Instruction

  1. Click the “Instructions” tab on the right (or double-click the location you wish to insert the instruction)
  2. Drag-and-drop an instruction on the location that you want

  3. If you double-click on an instruction block, you can change it to another instruction

Select Multiple Lines

  1. You can select multiple lines by dragging the line numbers on the left

  2. If you drag within the line numbers that were already selected, it will partially cancel the selection of those lines

  3. If you click directly on the source code, it will cancel the selection of the lines

Insert/Delete Line

  1. Select the location where you wish to insert (or delete) a line with the left mouse button
  2. Clicking the right mouse button will display the additional menu

  3. If you click “Insert Line” it will insert a new line above the currently selected line (keyboard shortcut : Insert)
  4. If you click “Delete Line” it will delete the currently selected line (keyboard shortcut : Delete)

Enable/Disable Line

  1. Select the line which you wish to enable/disable with the left mouse button
  2. Clicking the right mouse button will display the additional menu

  3. If you click “Enable/Disable” it will change the enabled/disabled status of the selected line (keyboard shortcut : Ctrl+E)

  4. Disabled code will be shown in gray and will be excluded during compilation

Copy/Cut/Paste

  1. Select the line which you wish to copy (or cut) with the left mouse button
  2. Clicking the right mouse button will display the additional menu

  3. If you click “Copy” (or “Cut”) it will copy the line to the clipboard
  4. You can also use the “Copy” (or “Cut”) buttons from the toolbar on top (keyboard shortcut : Ctrl+C, Ctrl+X)

  5. Select the line which you wish to Paste to with the left mouse button
  6. Clicking the right mouse button will display the additional menu

  7. If you click “Paste” it will paste the content that was copied to the clipboard
  8. You can also use the “Paste” button from the toolbar on top (keyboard shortcut : Ctrl+V)

  9. The copied code is inserted as in the figure below

Undo/Redo

  1. While editing the code, if you click the “Undo” function you can restore the code to the previous state
  2. You can also use the “Undo” button from the toolbar on top (keyboard shortcut : Ctrl+Z)

  3. If you click the “Redo” button from the toolbar on top, it will rewrite the restored code again (keyboard shortcut : Ctrl+Z)

Programming(Instructions)

This section explains the instructions used in R+ Task 2.0

Start/End

This instruction establishes the overall beginning and end of a program, and the valid block for the instruction.

Start Program

End Program

Begin Block / End Block

Comment

Execute

This is an instruction for giving a command to the device or performing a mathematical calculation. Refer to the following figure for details.

Compute

Load

Label/Jump

The figures below show how the program branches by using Jump.

Condition

This instruction controls the flow of program based on the True/False result of Conditional Clause.

Conditional Clause

Operators Description
== The value on the left hand side is equal to the right hand side
!= The value on the left hand side is not equal to the right hand side
> The value on the left hand side is greater than the right hand side
>= The value on the left hand side is greater than or equal to the right hand side
< The value on the left hand side is less than the right hand side
<= The value on the left hand side is less than or equal to the right hand side

If

Else If

Else

Loop

This is an instruction that is used when the program needs to repeat a specific behavior or computation multiple times.
By setting the repetition block and repetition condition, loop can be applied in a variety of ways. Refer to the following figure for details.

Endless Loop

Loop While

Loop For

Wait While

Break Loop

Function(Sub-Routine)

If a specific code is used repeatedly, or if you wish to classify an area of code as a unit that performs a specific behavior, you can group the lines of code as a Function. Refer to the following figure for details.

Function/Call

Return

Callback

Programming(Parameters)

This section explains parameters used in R+ Task 2.0. It classifies the parameters that can be used by each device. Refer to the explanation and example codes of each item for details.

Controllers

Accessory Device [Geared motor]

Accessory Device [Servo motor : drive mode, speed, location]

Accessory Device : LED Module

Accessory Devices : Various sensors

Motion Control [Motion index number / Motion status / Joint offset / Turn on Joint LED automatically]

More information on Key-Frame, Motion Unit and Motion is available at Motion Data

Built-in Sensor1 [Result of sound counter / Real-time sound counter]

Built-in Sensor 2 [Left infrared sensor / Center infrared sensor / Right infrared sensor]

Built-in Sensor 3 [Start button counter / Controller button]

Buzzer [Buzzer index / Buzzer timer]

Remote Controller [Received wireless data, Wireless data to send / Wireless ID / RC-100 channel]

Timer [Timer / Precision (High-resolution) timer / Powersave timer]

Miscellaneous [Random number / Built-in LED / Print screen / Print screen with line]

DYNAMIXEL

These are the parameters for reading or writing values in DYNAMIXEL Control Table. Please refer to DYNAMIXEL Control Table for more details.

DYNAMIXEL actuator

Infrared sensor array

  Black detection LED
Sensor value <= set value BIT 1 ON
Sensor value > set value BIT 0 OFF
Binary value Decimal value Black detection
0000001 1 Black detection for IR sensor #1
0000010 2 Black detection for IR sensor #2
0000100 4 Black detection for IR sensor #3
0001000 8 Black detection for IR sensor #4
0010000 16 Black detection for IR sensor #5
0100000 32 Black detection for IR sensor #6
1000000 64 Black detection for IR sensor #7

Use can check the value while looking at the screen as shown below.

Custom

Common

These are basic variables and constants that can be used in every device.

Variable

Number (Decimal number)

True/False

Binary number

Useful Tips

Search Variables/Functions

This is a feature to find the location where a variable or function has been used. It provides the option to change the name of each variable or function.

  1. Click the “Variable (or Function)” button on the right. (There must be at least one variable or function.)
  2. Select the target that you wish to find reference in the “Variables list (or Functions list)”
  3. You can check the locations at which the selected variable (or function) has been used in the “Reference Results” field

  4. If you select one of the results in the “Reference Results” field, it will take you to the specific location within the source code.
  5. If you click the “Rename” button at the top, you can change the name of the variable (or function) for the whole source code.

Search Keyword

This is a function to search for components used in the program code.

  1. Click the Search button at the bottom right.
  2. Type the search word in the search bar that appears on top.

  3. In the task code, the “search result” will be shown as a list below.
  4. If you click on an item in the list, it will move to that line.

Grammar/Compile Check

In order to download the task code to the controller, it must go through a grammar check and compile process. If you try to download to the controller or click the “Error” button, it will run the grammar check and compile process automatically.

FAQ

  1. Supported Products?

    See Product Compatibility Guide, and check if your controlelr is compatible with R+Task 2.0

  2. Can TSK files that were used in the previous Task 1.0 also be used on Task 2.0?

    Yes. However, if you load a previous TSK file into Task 2.0 and save it again, it will be converted to a TSKX format so it will no longer be compatible with Task 1.0.

  3. The controller will not shut down after downloading a task. What should I do?

    In R + Task 2.0, when you download a task the task is executed. (For controllers : CM-150, OpenCM9.04, OpenCM7.0…)

  4. Can I use Bluetooth module in R+ Task 2.0?

    Support of Bluetooth module is different for each controller, so please refer to the specifications of each Bluetooth module: BT-110, BT-210, BT-410

  5. The controller does not connect well. What should I do?

    Restart the controller by turning it off and then on, and try again. If the problem continues, please update the controller’s firmware to the latest version. Controller Firmware Update

  6. I do not want to see the help animation any more. What should I do?

    Go to Home Tab -> Settings Menu and uncheck the option “Tutorials” and the help animation will not appear anymore.