SetIODef方法
描述
設定輸入、輸出或記憶體I/O位元、位元組或字元的I/O標籤與描述。
語法
Sub SetIODef (Type As SpelLabelTypes, Index As Integer, Label As String, Description As String)
參數
- Type 如下指定I/O類型:InputBit = 1 InputByte = 2 InputWord = 3 OutputBit = 4 OutputByte = 5 OutputWord = 6 MemoryBit = 7 MemoryByte = 8 MemoryWord = 9 InputReal = 10 OutputReal = 11
- Index
指定位元或埠號。 - Label
指定新建標籤。 - Description
指定新建描述。
備註
使用SetIODef可定義任何I/O點的標籤與描述。
另請參閱
GetIODef方法
SetIODef範例
VB 例:
Dim label, desc As String
label = "StartCycle"
desc = "Starts the robot cycle"
m_spel.SetIODef(SpelLabelTypes.InputBit, 0, label, desc)
C# 例:
string label, desc;
label = "StartCycle";
desc = "Starts the robot cycle";
m_spel.SetIODef(SpelLabelTypes.InputBit, 0, label, desc);
← Sense方法 SetPoint方法 →