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