MainMachine _BtnProcess.cs 1.5 KB
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DeviceLibrary
{
    partial class MainMachine
    {
        void BtnProcess()
        { 
            //A侧按钮按下,有料,出料
            if (InMoveInfo.IsStep(MoveStep.Wait)
                && IOValue(IO_Type.InStart_BTN).Equals(IO_VALUE.HIGH))
            {

            }
            //B侧按钮按下,有料,出料
            if (IOValue(IO_Type.OutLeave_BTN).Equals(IO_VALUE.HIGH))
            {
                
            }
        }

        void OutLeave_BTN() {
            if (IOValue(IO_Type.OutExitCar_Check).Equals(IO_VALUE.HIGH))
            {
                LogUtil.info("踩下出口脚踏开关,线体运行5秒,出口阻挡下降");
                LineOut.LineRun("btnout", 5);
                CylinderMove(null, IO_Type.OutExitStop_Down, IO_Type.OutExitStop_Up, IO_VALUE.LOW);
                Thread.Sleep(5000);
                CylinderMove(null, IO_Type.OutExitStop_Down, IO_Type.OutExitStop_Up, IO_VALUE.HIGH);
            }
            else {
                LogUtil.info("踩下出口脚踏开关,出口没有对接小车结束");
            }
        }
        void Reset_BTN() {
            Msg.add("按下复位按钮", MsgLevel.info, ErrInfo.ResetBtn);
            LogUtil.info("按下复位按钮");
            ProcessMsgEvent?.Invoke(Msg.get());
        }
    }
}