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 = 3OutputBit = 4 OutputByte = 5 OutputWord = 6MemoryBit = 7 MemoryByte = 8 MemoryWord = 9InputReal = 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);