16 May 2016

向脚本盒子添加字符串输出:

  1. 在盒子上右键,编辑指令盒
  2. 点击输出点的 + 号
  3. name 设为 onXX,type 设为“字符串”,Nature设置为 onStopped
  4. 双击指令盒,在函数 onInput_onStart(self,p) 函数下,调用函数 self.onXX(“ff”) 即可输出字符串 “ff”

向脚本盒子添加字符串输入:

  1. 在盒子上右键,编辑指令盒
  2. 点击输入点的 + 号
  3. name 设为 input_XX,type 设为“字符串”,Nature设置为 onStart
  4. 双击盒子
def onInput_input_XX(self,p)
    # 当信号传导input_XX引脚时会调用此函数
    # 字符串信号保存在输入变量 p 中
    pass


blog comments powered by Disqus