SimGet

用於取得模擬器各種物件的屬性設定值。

格式
SimGet Object.Property, Var

SimGet Robot.Hand.Propoerty, Var

參數

Object
表示用於讀取屬性值的物件名稱之字串變數
Robot
表示有安裝夾具(以「Hand」指定)的機器人名稱之字串變數
Hand
表示用於讀取屬性值的夾具名稱之字串變數
Property
用於讀取數值的屬性名稱。屬性詳如後述。
Var
表示傳回值的變數

說明
此命令用於取得模擬器各種物件的屬性設定值。

可透過指定如下所示的屬性,取得物件的設定值。

屬性 說明 單位 資料類型 傳回值
PositionX 取得X坐標位置 公釐(mm) Double
PositionY 取得Y坐標位置 公釐(mm) Double
PositionZ 取得Z坐標位置 公釐(mm) Double
RotationX 取得X軸旋轉角度 度(degree) Double
RotationY 取得Y軸旋轉角度 度(degree) Double
RotationZ 取得Z軸旋轉角度 度(degree) Double
CollisionCheck 取得碰撞檢測的啟用/停用 - Boolean True或False
CollisionCheckSelf 取得機器人自我碰撞檢測的啟用/停用 - Boolean True或False
Visible 取得顯示/隱藏的狀態 - Boolean True或False
Type 用於取得物件類型 - Integer

Layout: 0

Part: 1

Mounted Device: 3

HalfSizeX 取得BOX物件的X方向的長度 公釐(mm) Double
HalfSizeY 取得BOX物件的Y方向的長度 公釐(mm) Double
HalfSizeZ 取得BOX物件的Z方向的長度 公釐(mm) Double
HalfSizeHeight 取得Plane物件的長度 公釐(mm) Double
HalfSizeWidth 取得Plane物件的寬度 公釐(mm) Double
PlaneType 取得Plane物件的類型 - Integer

Horizontal: 0

Vertical: 1

Radius 取得Sphere物件或Cylinder物件的半徑 公釐(mm) Double
Height 取得Cylinder物件的高度 公釐(mm) Double
Name 取得物件名稱 String
Color 取得物件展現的顔色 String 顔色名稱或者16進位顔色代碼(ARGB)

可透過下表所示的組合取得屬性。

屬性 物件
Robot Hand Box Sphere Cylinder Plane CAD Camera
PositionX
PositionY
PositionZ
RotationX
RotationY
RotationZ
CollisionCheck
CollisionCheckSelf - - - - - - -
Visible -
Type - - -
HalfSizeX - - - - - - -
HalfSizeY - - - - - - -
HalfSizeZ - - - - - - -
HalfSizeHeight - - - - - - -
HalfSizeWidth - - - - - - -
PlaneType - - - - - - -
Radius - - - - - -
Height - - - - - - -
Name
Color - - - -

參照
SimSet

SimGet範例

'取得SBox_1物件的X坐標值
Double boxPosX
SimGet SBox_1.PositionX, boxPosX

'取得SBox_1物件的顯示/隱藏狀態
Boolean boxVisible
SimGet SBox_1.Visible, boxVisible

'取得SBox_1物件的類型
Integer boxType
SimGet SBox_1.Type, boxType