Esempio n. 1
0
        private void SetDO(ushort DOChannel)
        {
            bool result = false;
            BoardSignalDefinition signal = new BoardSignalDefinition(Index, DOChannel);

            if (GlobalVar.AxisPCI.GetSingleDO(signal, ref result))
            {
                GlobalVar.AxisPCI.SetDO(Index, DOChannel, !result);
            }
        }
Esempio n. 2
0
 private void Axis_DO_Event_BtnClick(IOStatus IO)
 {
     try
     {
         string tag     = ((IOStatus)IO).Tag.ToString();
         int    axis    = Convert.ToInt32(tag.Substring(0, 1));
         ushort channel = (ushort)(Convert.ToUInt16(tag.Substring(1, 1)));
         BoardSignalDefinition signal = new BoardSignalDefinition(axis, channel);
         bool result = false;
         if (GlobalVar.AxisPCI.GetSingleDO(signal, ref result))
         {
             GlobalVar.AxisPCI.SetDO(axis, channel, !result);
         }
     }
     catch (Exception ex)
     {
         log.AddCommLOG("点击DO异常:" + ex.Message);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="define">信号定义</param>
        /// <param name="value">判断的值</param>
        /// <param name="btn">按钮</param>
        internal MsgBox(BoardSignalDefinition define, bool value, MessageBoxButtons btn = MessageBoxButtons.OK)
        {
            InitializeComponent();

            this.BoardSignal      = define;
            this.BoadrSignalValue = value;
            switch (btn)
            {
            case MessageBoxButtons.OK:
                this.btn_Confirm.Text     = "确认";
                this.btn_Confirm.Location = new Point((this.Width - this.btn_Confirm.Width) / 2, this.btn_Confirm.Location.Y);
                this.btn_Cancel.Visible   = false;
                break;

            case MessageBoxButtons.YesNo:

                break;
            }

            CheckIsShow();
        }
Esempio n. 4
0
 private BoardSignalDefinition Blow_signal; //吹气
 /// <summary>
 /// 输出关联输入信号,需要收到反馈
 /// </summary>
 /// <param name="blow">信号为低时,需要判断的输入信号</param>
 internal void LinkInputSignal(BoardSignalDefinition upLimit, BoardSignalDefinition blow)
 {
     this.UpLimit     = upLimit;
     this.Blow_signal = blow;
 }
Esempio n. 5
0
 /// <summary>
 /// 输出关联输入信号,需要收到反馈
 /// </summary>
 /// <param name="up">信号为高时,需要判断的输入信号</param>
 /// <param name="down">信号为低时,需要判断的输入信号</param>
 internal void LinkInputSignal(BoardSignalDefinition up, BoardSignalDefinition down)
 {
     this.UP_signal        = up;
     this.DOWN_signal      = down;
     this.NeedMonitorInput = true;
 }