MainMachine _BtnProcess.cs
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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());
}
}
}