賦值

描述

The Assignment command enables you to assign values to created variables.


To access Assignment command

  1. Go to the main program screen. 請參閱Command Nodes

  2. Tap the Assignment icon in the Commands toolbox.

    A node with three editable fields is inserted into the program tree:

    • 變數

    • 值類型

    • 表達式

  1. Tap the Variable field to choose your variable:

    • 網格

    • grid_iterator

    • var

    The Variable field contains the name of the variable. By default, the variable is called var.

 
  1. Tap the Value Type field to and select your choice:

    • 陣列

    • 布爾

    • 浮點

    • 網格

    • 整數

    • 矩陣

    • 位姿

    • 字串

    • 计时器

    • 路點

    The Value Type contains the type of variable you are creating.

    類型 Allowed Values/Examples Examples
    陣列 A list of values  
    布爾 True/False
    浮點 A decimal point value 1.23
    網格 A grid defined in the application  
    整數 一個整數 5
    矩陣    
    位姿 A pose for the robot to move p[0,0,0,0,0,0,]
    字串 文字 “Hello World”
    路點 A waypoint is defined in the program

     

     

 
  1. Tap the Expression field, select your variables and expression, and Confirm. The Expression is the value to assign the variable. See 運算式編輯器.

    Note: Tap the icon arrow left and arrow right in the right sidebar of the main screen if you want the assignment to be reverted.