SimGet

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

格式
(1) 物件的屬性取得

SimGet Object.Property, Var

SimGet Robot.Hand.Propoerty, Var

(2) 物件的搜尋
SimGet Robot.NearestObjToTool(Tool), Var

參數

(1) 物件的屬性取得

・Object
表示用於讀取屬性值的物件名稱之字串變數

・Robot
表示安裝有末端夾具(以「Hand」指定)的機器人名稱之字串變數

・Hand
表示用於讀取屬性值的夾具名稱之字串變數

・Property
用於讀取數值的屬性名稱。屬性詳如後述。

・Var
表示傳回值的變數

(2) 物件的搜尋

・Robot
表示設定Tool坐標(作為物件搜尋基準)的機器人名稱之字串變數

・Tool
表示Tool編號之運算式

・Var
表示要傳回的物件名稱之字串變數

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

(1) 物件的屬性取得

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

屬性 說明 單位 資料類型 傳回值
PositionX 取得X坐標位置 公釐(mm) Double
PositionY 取得Y坐標位置 公釐(mm) Double
PositionZ 取得Z坐標位置 公釐(mm) Double
RotationX 取得X軸旋轉角度 度(degree) Double
RotationY 取得Y軸旋轉角度 度(degree) Double
RotationZ 取得Z軸旋轉角度 度(degree) Double
OffsetPositionX 取得X坐標的偏移位置 公釐(mm) Double
OffsetPositionY 取得Y坐標的偏移位置 公釐(mm) Double
OffsetPositionZ 取得Z坐標的偏移位置 公釐(mm) Double
OffsetRotationX 取得X軸的偏移旋轉角度 度(degree) Double
OffsetRotationY 取得Y軸的偏移旋轉角度 度(degree) Double
OffsetRotationZ 取得Z軸的偏移旋轉角度 度(degree) Double
CollisionState 取得碰撞狀態 - Boolean True或False
CollisionCheck 取得碰撞檢測的啟用/停用 - Boolean True或False
CollisionCheckSelf 取得機器人自我碰撞檢測的啟用/停用 - Boolean True或False
Visible 取得顯示/隱藏的狀態 - Boolean True或False
ShowLabel 取得物件之標籤顯示/隱藏的狀態 - Boolean True或False
ShowOrigin 取得物件之原點坐標系(中心)顯示/隱藏的狀態 - 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)

如下所示的屬性僅可從輸送帶物件取得設定值。

屬性 說明 單位 資料類型 傳回值
OperationType 取得輸送帶的動作類型 - Integer

Independent(與輸送帶追蹤設定不連動): 0

LinkTracking(與輸送帶追蹤設定連動): 1

ConveyorID 取得設為追蹤動作的輸送帶之編號 - Integer
ConveyorSpeed 取得輸送帶的動作速度 公釐/秒(mm/s) Double
ConveyorAccel 取得輸送帶的加速度 公釐/秒2(mm/s2) Double
ConveyorDecel 取得輸送帶的減速度 公釐/秒2(mm/s2) Double
Forward 取得輸送帶的動作方向 - Boolean True或False
TriggerIO 取得對編碼器計數進行閂鎖的I/O輸出編號 - Integer
Supply 取得工件(零件)供應設定的啟用/停用 - Boolean True或False
BaseObject 取得作為工件(零件)之基準的物件 - String
MaxObject 取得工件(零件)的最大數量 - Integer
IntervalMin 取得工件(零件)供應時間間隔的最小值 秒(s) Double
IntervalMax 取得工件(零件)之供應時間間隔的最大值 秒(s) Double
RemoveType 取得工件(零件)搬運至輸送帶物件終端時的刪除方法 - Integer

None(在輸送帶物件終端不刪除): 0

ReachEnd(在輸送帶物件終端刪除): 1

RandomPlacement 取得工件(零件)隨機配置的啟用/停用 - Boolean True或False
RandomDistance 取得工件(零件)隨機配置的距離 公釐(mm) Double
RandomAngle 取得工件(零件)隨機配置的角度 度(degree) Double
ArrangementType 取得工件(零件)隨機配置的類型 - Integer

One: 0

Grid: 1

Circle: 1

SupplyOffsetX 取得工件(零件)隨機配置的X坐標之偏移位置 公釐(mm) Double
SupplyOffsetY 取得工件(零件)隨機配置的Y坐標之偏移位置 公釐(mm) Double
SupplyOffsetZ 取得工件(零件)隨機配置的Z坐標之偏移位置 公釐(mm) Double
SupplyOffsetU 取得工件(零件)隨機配置的U軸(Z軸)之偏移角度 度(degree) Double
RowNum 取得隨機配置為Grid時的行數 - Integer
RowSpacing 取得隨機配置為Grid時的行距 公釐(mm) Double
ColNum 取得隨機配置為Grid時的列數 - Integer
ColSpacing 取得隨機配置為Grid時的列距 公釐(mm) Double
CircleNum 取得隨機配置為Circle時的配置數量 - Integer
CircleRadius 取得隨機配置為Circle時的半徑 公釐(mm) Double

如下所示的屬性僅可從檢測區域物件取得設定值。

屬性 說明 單位 資料類型 傳回值
IOType 取得檢測到物件時的I/O目的地 - Integer

Input: 0

Output: 1

Memory: 2

IONumber 取得以[IOType]指定的I/O目的地之I/O編號 - Integer
Action 取得I/O的輸出值 - Boolean True或False
Trigger 取得觸發輸出的時序 - Integer

LeadingEdge: 0

TrailingEdge: 1

Duration 取得I/O輸出的持續時間 秒(s) Double
Delay 取得I/O輸出的延遲時間 秒(s) Double
EnableVirtualOnly 取得虛擬控制器連接時的啟用/停用 - Boolean True或False

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

屬性 物件
Robot Hand Box Sphere Cylinder Plane CAD Camera
PositionX
PositionY
PositionZ
RotationX
RotationY
RotationZ
OffsetPostionX -
OffsetPositionY -
OffsetPositionZ -
OffsetRotationX -
OffsetRotationY -
OffsetRotationZ -
CollisionCheck
CollisionCheckSelf - - - - - - -
CollisionState
Visible -
ShowLabel
ShowOrigin -
Type - - -
HalfSizeX - - - - - - -
HalfSizeY - - - - - - -
HalfSizeZ - - - - - - -
HalfSizeHeight - - - - - - -
HalfSizeWidth - - - - - - -
PlaneType - - - - - - -
Radius - - - - - -
Height - - - - - - -
Name
Color - - - -
OperationType - - - - - - - -
ConveroyID - - - - - - - -
ConveyorSpeed - - - - - - - -
ConveyorAccel - - - - - - - -
ConveyorDecel - - - - - - - -
Forward - - - - - - - -
TriggerIO - - - - - - -
Supply - - - - - - - -
BaseObject - - - - - - - -
MaxObject - - - - - - - -
IntervalMin - - - - - - - -
IntervalMax - - - - - - - -
RemoveType - - - - - - - -
RandomPlacement - - - - - - - -
RandomDistance - - - - - - - -
RandomAngle - - - - - - - -
ArrangementType - - - - - - - -
SupplyOffsetX - - - - - - - -
SupplyOffsetY - - - - - - - -
SupplyOffsetZ - - - - - - - -
SupplyOffsetU - - - - - - - -
RowNum - - - - - - - -
RowSpacing - - - - - - - -
ColNum - - - - - - - -
ColSpacing - - - - - - - -
CircleNum - - - - - - - -
IOType - - - - - - - -
IONumber - - - - - - - -
Action - - - - - - - -
Trigger - - - - - - - -
Duration - - - - - - - -
Delay - - - - - - - -
EnableVirtualOnly - - - - - - - -
屬性 物件
SurveillanceArea SurveillancePlane Conveyor DetectionArea
PositionX
PositionY
PositionZ
RotationX
RotationY
RotationZ
OffsetPostionX
OffsetPositionY
OffsetPositionZ
OffsetRotationX
OffsetRotationY
OffsetRotationZ
CollisionCheck
CollisionCheckSelf - - - -
CollisionState
Visible
ShowLabel
ShowOrigin
Type
HalfSizeX - -
HalfSizeY - -
HalfSizeZ - -
HalfSizeHeight - -
HalfSizeWidth - -
PlaneType - - - -
Radius - - - -
Height - - - -
Name
Color
OperationType - - -
ConveroyID - - -
ConveyorSpeed - - -
ConveyorAccel - - -
ConveyorDecel - - -
Forward - - -
TriggerIO - - -
Supply - - -
BaseObject - - -
MaxObject - - -
IntervalMin - - -
IntervalMax - - -
RemoveType - - -
RandomPlacement - - -
RandomDistance - - -
RandomAngle - - -
ArrangementType - - -
SupplyOffsetX - - -
SupplyOffsetY - - -
SupplyOffsetZ - - -
SupplyOffsetU - - -
RowNum - - -
RowSpacing - - -
ColNum - - -
ColSpacing - - -
CircleNum - - -
IOType - - -
IONumber - - -
Action - - -
Trigger - - -
Duration - - -
Delay - - -
EnableVirtualOnly - - -

(2) 物件的搜尋
・NearestObjToToo
搜尋距以「Robot」指定的機器人「Tool」中指定編號的Tool坐標最近之物件,並取得其名稱。
僅佈局物件屬於搜尋對象物件。關於設為其他物件的子物件,或者設為零件或手臂安裝設備的物件(包括先輩在內),則不屬於對象。

參照
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

'取得Robot1的碰撞狀態
Boolean robotCollision
SimGet Robot1.CollisionState, robotCollision

'取得距Robot1中設定的Tool 1最近之物件
String nearObject$
SimGet Robot1.NearestObjToTool(1), nearObject$