GetIODef方法
描述
取得輸入、輸出或記憶體I/O位元、位元組或字元的定義資訊。
語法
Sub GetIODef(Type As SpelIOLabelTypes, Index As Integer, ByRef Label as String, ByRef 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
傳回描述。
傳回值
數值會在Label和Description參數中傳回。
備註
使用GetIODef可取得目前專案中所有I/O所使用的標籤與描述。
另請參閱
SetIODef方法
GetIODef範例
VB 例:
Dim label As String
Dim desc As String
m_spel.GetIODef(SpelIOLabelTypes.InputBit, 0, label, desc)
C# 例:
string label, desc;
m_spel.GetIODef(SpelIOLabelTypes.InputBit, 0, out label, out desc);