StepID屬性
應用項目
機器人物件Robot
註解
設定或傳回步驟數字及步驟標籤,讓使用者瞭解任務或工作的進度情形。步驟標籤可忽略,且能夠僅設定及傳回步驟數。
立即執行
否
用途
FGet Object.StepID, iVar
FGet Object.StepID, iVar, sVar$
FSet Object.StepID, iValue
FSet Object.StepID, iValue, sValue$
Object
物件名稱iVar
整數變數iValue
定義新數值的整數或公式sVar$
字串變數sValue$
定義新數值的字串或公式
數值
iValue
數值 | |
---|---|
最小值 | 0 (預設) |
最大值 | 32767 |
sValue$
最多可使用32個單位元組、16個雙位元組英數字元, 日文, 底線。
詳細說明
此屬性用於設定或確認StepID及步驟標籤,以便瞭解任務或工作進度情形。
使用範例
此範例可設定及確認StepID,以確認主要程序的進度。
(忽略步驟標籤。)
Function Test_SetStepID(iStepID As Integer) ' 設定StepID的程序
FSet Robot.StepID, iStepID
Fend
Function Test_GetStepID ' 擷取StepID的程序
Integer iStepID
FGet Robot.StepID, iStepID
Print iStepID
Fend
Function Test_Main ' 執行力控制功能的主要程序
・・・
Move P0 FC1 CF
Test_SetStepID(1) ' 設定StepID=1
・・・
Move P1 FC2 CF
Test_SetStepID(2) ' 設定StepID=2
・・・
FSet FS1.Reset
Test_SetStepID(3) ' 設定StepID=3
・・・
Move P3 FC3 CF
Test_SetStepID(4) ' 設定StepID=4
・・・
Fend
Function Test_Sub ' 以5秒間隔監控的子程序
Do
Test_GetStepID
Wait(5)
Loop
Fend
參考
機器人物件Robot
← SerialCode屬性 T →