Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-VMILineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit acb7d13f
由
张东亮
编写于
2021-09-07 15:38:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
新增第三条线体
1 个父辈
7b34e538
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
694 行增加
和
489 行删除
source/DeviceLibrary/LineConfig/VMILineConfig.csv
source/DeviceLibrary/acVmiLine/VMILineBean.cs
source/DeviceLibrary/acVmiLine/VMILineBean_Partial.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/LoadCVSLibrary/Config/bean/IO_Type.cs
source/LoadCVSLibrary/Config/bean/VMLLineConfig.cs
source/VMILineClient/App.config
source/VMILineClient/FrmVMIClient.Designer.cs
source/VMILineClient/FrmVMIClient.cs
source/DeviceLibrary/LineConfig/VMILineConfig.csv
查看文件 @
acb7d13
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.25#16,,,,,,,
PRO,
模块对应的DO数量,IO_DOLength,192.168.103.25#16
,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.25#16
;192.168.103.30#8
,,,,,,,
PRO,
IO模块对应的DO数量,IO_DOLength,192.168.103.25#16;192.168.103.30#8
,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.25,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_2,192.168.103.30,,,,,,,
,,,,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,L1空入料线AGV节点名称,L1_AgvName,A2,,,,,,,
PRO,L2料串出料线AGV节点名称,L2_AgvName,A1,,,,,,,
PRO,L3包装料架出料线AGV节点名称,L3_AgvName,A11,,,,,,,
PRO,L2料串出料线入口RFIDIP,L2_In_RFIDIP,192.168.103.108,,,,,, ,
PRO,L2料串出料线出口RFIDIP,L2_Out_RFIDIP,192.168.103.107,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,40,,,,,,,
,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X721,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X722,DI-02,0,
DI,
出料线入口检测,L2_InCheck,2,PRO_AOI_IP_1,0,
出料线入口检测,X723,DI-03,0,
DI,
出料线检测1,L2_StopCheck1,3,PRO_AOI_IP_1,0,出料线检测1
,X724,DI-04,0,
DI,
料串出料线入口检测,L2_InCheck,2,PRO_AOI_IP_1,0,料串
出料线入口检测,X723,DI-03,0,
DI,
料串出料线阻挡检测,L2_StopCheck1,3,PRO_AOI_IP_1,0,料串出料线阻挡检测
,X724,DI-04,0,
DI,料串切换气缸前进端,Switch_Forward_Sig,4,PRO_AOI_IP_1,0,料串切换气缸前进端,X725,DI-05,0,
DI,出料线出口检测,L2_OutCheck,5,PRO_AOI_IP_1,0,出料线出口检测,X726,DI-06,0,
DI,入料线入口检测,L1_InCheck,6,PRO_AOI_IP_1,0,入料线入口检测,X727,DI-07,0,
DI,入料线阻挡检测,L1_StopCheck,7,PRO_AOI_IP_1,0,入料线阻挡检测,X728,DI-08,0,
DI,料串切换气缸后退端,Switch_Back_Sig,8,PRO_AOI_IP_1,0,料串切换气缸后退端,X729,DO-01,0,
DI,入料线出口检测,L1_OutCheck,9,PRO_AOI_IP_1,0,入料线出口检测,X730,DO-02,0,
DI,出料线人工取料信号,L1_ManualRecSig,10,PRO_AOI_IP_1,0,出料线人工取料信号,X731,DO-03,0,
DI,进料线体横移上升端,L1_UpDown_Up_Sig,11,PRO_AOI_IP_1,0,进料线体横移上升端,X732,DO-04,0,
DI,进料线体横移下降端,L1_UpDown_Down_Sig,12,PRO_AOI_IP_1,0,进料线体横移下降端,X733,DO-05,0,
DI,出料线体横移上升端,L2_UpDown_Up_Sig,13,PRO_AOI_IP_1,0,出料线体横移上升端,X734,DO-06,0,
DI,出料线体横移下降端,L2_UpDown_Down_Sig,14,PRO_AOI_IP_1,0,出料线体横移下降端,X735,DO-07,0,
DI,包装料架检测信号,PackingShelf_Sig,15,PRO_AOI_IP_1,0,包装料架检测信号,X736,DO-08,0,
DO,运行状态(指示灯),AutoRun_HddLed,0,PRO_AOI_IP_1,0,运行状态(指示灯),Y721,DI-01,0,
DO,故障状态(指示灯),Alarm_HddLed,1,PRO_AOI_IP_1,0,故障状态(指示灯),Y722,DI-02,0,
DO,进料线驱动电机运转,L1_Run,2,PRO_AOI_IP_1,0,进料线驱动电机运转,Y723,DI-03,0,
DO,出料线驱动电机运转,L2_Run,3,PRO_AOI_IP_1,0,出料线驱动电机运转,Y724,DI-04,0,
DO,进料线阻挡下降,L1_StopDown,4,PRO_AOI_IP_1,0,进料线阻挡下降,Y725,DI-05,0,
,进料线阻挡2下降,L1_StopDown2,5,PRO_AOI_IP_1,0,进料线阻挡2下降,Y726,DI-06,0,
DO,进料线出口阻挡下降,L1_OutStopDown,6,PRO_AOI_IP_1,0,进料线出口阻挡下降,Y727,DI-07,0,
DO,出料线出口阻挡下降,L2_OutStopDown,7,PRO_AOI_IP_1,0,出料线阻挡1下降,Y728,DI-08,0,
,出料线阻挡2下降,L2_StopDown2,8,PRO_AOI_IP_1,0,出料线阻挡2下降,Y729,DO-01,0,
DO,出料线阻挡下降,L2_StopDown,9,PRO_AOI_IP_1,0,出料线阻挡下降,Y730,DO-02,0,
DO,横移机构上升SOL,Traverse_Up_SOL,10,PRO_AOI_IP_1,0,横移机构上升SOL,Y731,DO-03,0,
DO,横移机构下降SOL,Traverse_Down_SOL,11,PRO_AOI_IP_1,0,横移机构下降SOL,Y732,DO-04,0,
DO,横移电机1运转,Traverse1_Run,12,PRO_AOI_IP_1,0,横移电机1运转,Y733,DO-05,0,
DO,横移电机2运转,Traverse2_Run,13,PRO_AOI_IP_1,0,横移电机2运转,Y734,DO-06,0,
DO,料串切换气缸前进,Switch_Forward,14,PRO_AOI_IP_1,0,料串切换气缸前进,Y735,DO-07,0,
DO,料串切换气缸后退,Switch_Back,15,PRO_AOI_IP_1,0,料串切换气缸后退,Y736,DO-08,0,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,L1线AGV节点名称,L1_AgvName,A2,,,,,,,
PRO,L2线AGV节点名称,L2_AgvName,A1,,,,,,,
PRO,L2线入口RFIDIP,L2_In_RFIDIP,192.168.103.108,,,,,, ,
PRO,L2线出口RFIDIP,L2_Out_RFIDIP,192.168.103.107,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,40,,,,,,,
DI,料串出料线出口检测,L2_OutCheck,5,PRO_AOI_IP_1,0,料串出料线出口检测,X726,DI-06,0,
DI,空入料线入口检测,L1_InCheck,6,PRO_AOI_IP_1,0,空入料线入口检测,X727,DI-07,0,
DI,空入料线阻挡检测,L1_StopCheck,7,PRO_AOI_IP_1,0,空入料线阻挡检测,X728,DI-08,0,
DI,料串切换气缸后退端,Switch_Back_Sig,8,PRO_AOI_IP_1,0,料串切换气缸后退端,X729,DI-09,0,
DI,空入料线出口检测,L1_OutCheck,9,PRO_AOI_IP_1,0,空入料线出口检测,X730,DI-10,0,
DI,料串出料线脚踏信号,L2_ManualRecSig,10,PRO_AOI_IP_1,0,料串出料线脚踏信号,X731,DI-11,0,
DI,空入料线体横移上升端,L1_UpDown_Up_Sig,11,PRO_AOI_IP_1,0,空入料线体横移上升端,X732,DI-12,0,
DI,空入料线体横移下降端,L1_UpDown_Down_Sig,12,PRO_AOI_IP_1,0,空入料线体横移下降端,X733,DI-13,0,
DI,料串出料线体横移上升端,L2_UpDown_Up_Sig,13,PRO_AOI_IP_1,0,料串出料线体横移上升端,X734,DI-14,0,
DI,料串出料线体横移下降端,L2_UpDown_Down_Sig,14,PRO_AOI_IP_1,0,料串出料线体横移下降端,X735,DI-15,0,
DI,包装料架检测信号(空入料线体出口),PackingShelf_Sig,15,PRO_AOI_IP_1,0,包装料架检测信号(空入料线体出口),X736,DI-16,0,
,,,,,,,,,,
DO,运行状态(指示灯),AutoRun_HddLed,0,PRO_AOI_IP_1,0,运行状态(指示灯),Y721,DO-01,0,
DO,故障状态(指示灯),Alarm_HddLed,1,PRO_AOI_IP_1,0,故障状态(指示灯),Y722,DO-02,0,
DO,空入料线驱动电机运转,L1_Run,2,PRO_AOI_IP_1,0,空入料线驱动电机运转,Y723,DO-03,0,
DO,料串出料线驱动电机运转,L2_Run,3,PRO_AOI_IP_1,0,料串出料线驱动电机运转,Y724,DO-04,0,
DO,空入料线阻挡下降,L1_StopDown,4,PRO_AOI_IP_1,0,空入料线阻挡下降,Y725,DO-05,0,
DO,料串出料线横移机构上升SOL,L2_Traverse_Up_SOL,5,PRO_AOI_IP_1,0,料串出料线横移机构上升SOL,Y726,DO-06,0,
DO,空入料线出口阻挡下降,L1_OutStopDown,6,PRO_AOI_IP_1,0,空入料线出口阻挡下降,Y727,DO-07,0,
DO,料串出料线出口阻挡下降,L2_OutStopDown,7,PRO_AOI_IP_1,0,料串出料线出口阻挡下降,Y728,DO-08,0,
DO,料串出料线横移机构下降SOL,L2_Traverse_Down_SOL,8,PRO_AOI_IP_1,0,料串出料线横移机构下降SOL,Y729,DO-09,0,
DO,料串出料线阻挡下降,L2_StopDown,9,PRO_AOI_IP_1,0,料串出料线阻挡下降,Y730,DO-10,0,
DO,空入料线横移机构上升SOL,L1_Traverse_Up_SOL,10,PRO_AOI_IP_1,0,空入料线横移机构上升SOL,Y731,DO-11,0,
DO,空入料线横移机构下降SOL,L1_Traverse_Down_SOL,11,PRO_AOI_IP_1,0,空入料线横移机构下降SOL,Y732,DO-12,0,
DO,空入料线横移电机正转,L1_Traverse_Run,12,PRO_AOI_IP_1,0,空入料线横移电机正转,Y733,DO-13,0,
DO,空入料线横移电机反转,L1_Traverse_BackRun,13,PRO_AOI_IP_1,0,空入料线横移电机反转,Y734,DO-14,0,
DO,料串切换气缸前进,Switch_Forward,14,PRO_AOI_IP_1,0,料串切换气缸前进,Y735,DO-15,0,
DO,料串切换气缸后退,Switch_Back,15,PRO_AOI_IP_1,0,料串切换气缸后退,Y736,DO-16,0,
,,,,,,,,,,
,,,,,,,,,,
DI,包装料架检测信号(料串出料线体出口),L2Out_PkgTypeDetect_Sig,0,PRO_AOI_IP_2,0,包装料架检测信号(料串出料线体出口),X781,DI-01,0,
DI,包装料架检测信号(包装料架出料线体出口),L3Out_PkgTypeDetect_Sig,1,PRO_AOI_IP_2,0,包装料架检测信号(包装料架出料线体出口),X782,DI-02,0,
DI,包装料架出料线脚踏信号,L3_ManualRecSig,2,PRO_AOI_IP_2,0,包装料架出料线脚踏信号,X783,DI-03,0,
DI,包装料架出料线体横移上升端,L3_UpDown_Up_Sig,3,PRO_AOI_IP_2,0,包装料架出料线体横移上升端,X784,DI-04,0,
DI,包装料架出料线体横移下降端,L3_UpDown_Down_Sig,4,PRO_AOI_IP_2,0,包装料架出料线体横移下降端,X785,DI-05,0,
DI,包装料架出料线入口检测,L3_InCheck,5,PRO_AOI_IP_2,0,包装料架出料线入口检测,X786,DI-06,0,
DI,包装料架出料线阻挡检测,L3_StopCheck,6,PRO_AOI_IP_2,0,包装料架出料线阻挡检测,X787,DI-07,0,
DI,包装料架出料线出口检测,L3_OutCheck,7,PRO_AOI_IP_2,0,包装料架出料线出口检测,X788,DI-08,0,
,,,,,,,,,,
DO,包装料架出料线驱动电机运转,L3_Run,0,PRO_AOI_IP_2,0,包装料架出料线驱动电机运转,Y781,DO-01,0,
DO,包装料架出料线过渡滚筒电机运转,L3_RollerRun,1,PRO_AOI_IP_2,0,包装料架出料线过渡滚筒电机运转,Y782,DO-02,0,
DO,料串出料线横移电机运转,L2_Traverse_Run,2,PRO_AOI_IP_2,0,料串出料线横移电机运转,Y783,DO-03,0,
DO,包装料架出料线横移电机运转,L3_Traverse_Run,3,PRO_AOI_IP_2,0,包装料架出料线横移电机运转,Y784,DO-04,0,
DO,包装料架出料线横移机构上升SOL,L3_Traverse_Up_SOL,4,PRO_AOI_IP_2,0,包装料架出料线横移机构上升SOL,Y785,DO-05,0,
DO,包装料架出料线横移机构下降SOL,L3_Traverse_Down_SOL,5,PRO_AOI_IP_2,0,包装料架出料线横移机构下降SOL,Y786,DO-06,0,
DO,包装料架出料线阻挡下降,L3_StopDown,6,PRO_AOI_IP_2,0,包装料架出料线阻挡下降,Y787,DO-07,0,
DO,包装料架出料线出口阻挡下降,L3_OutStopDown,7,PRO_AOI_IP_2,0,包装料架出料线出口阻挡下降,Y788,DO-08,0,
\ No newline at end of file
source/DeviceLibrary/acVmiLine/VMILineBean.cs
查看文件 @
acb7d13
...
...
@@ -36,7 +36,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer
.
Interval
=
300
;
mainTimer
.
AutoReset
=
true
;
mainTimer
.
Enabled
=
false
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
mainTimer
.
Elapsed
+=
timersTimer_Elapsed
;
//添加调试
IsDebug
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
IsInDebug
).
Equals
(
1
);
...
...
@@ -105,10 +105,22 @@ namespace OnlineStore.DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
500
));
IOManager
.
IOMove
(
IO_Type
.
L1_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
CIOMove
(
IO_Type
.
Switch_Forward
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
CIOMove
(
IO_Type
.
Switch_Back
,
IO_VALUE
.
HIGH
);
AgvClient
.
SetStatus
(
Config
.
L1_AgvName
);
AgvClient
.
SetStatus
(
Config
.
L2_AgvName
);
AgvClient
.
SetStatus
(
Config
.
L3_AgvName
);
mainTimer
.
Enabled
=
true
;
serverConnectTimer
.
Enabled
=
true
;
}
...
...
@@ -182,7 +194,7 @@ namespace OnlineStore.DeviceLibrary
public
void
Alarm
(
AlarmType
alarmType
)
{
if
(
this
.
alarmType
.
Equals
(
alarmType
)
&&
alarmType
!=
AlarmType
.
SuddenStop
)
if
(
this
.
alarmType
.
Equals
(
alarmType
)
&&
alarmType
!=
AlarmType
.
SuddenStop
)
{
return
;
}
...
...
@@ -202,10 +214,27 @@ namespace OnlineStore.DeviceLibrary
{
IOManager
.
IOMove
(
IO_Type
.
L1_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_StopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_RollerRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
}
private
bool
InProcess
=
false
;
...
...
@@ -241,12 +270,10 @@ namespace OnlineStore.DeviceLibrary
}
else
if
(
runStatus
.
Equals
(
RunStatus
.
Runing
))
{
InStoreReelStringLineTimerProcess
();
OutLineTimerProcess
();
TranverseTimerProcess
();
OutReelStringLineTimerProcess
();
EmptyInLineTimerProcess
();
PkgOutLineTimerProcess
();
IOTimeOutProcess
();
SleepTimerProcess
();
...
...
@@ -265,73 +292,169 @@ namespace OnlineStore.DeviceLibrary
InProcess
=
false
;
}
private
Stopwatch
ol
_noshelfWatch
=
new
Stopwatch
();
private
DateTime
ol
_lastSendShelfTime
=
DateTime
.
Now
;
private
Stopwatch
l1
_noshelfWatch
=
new
Stopwatch
();
private
DateTime
l1
_lastSendShelfTime
=
DateTime
.
Now
;
private
int
StopDownMS
=
1500
;
/// <summary>
///
出
料线体定时处理
///
空入
料线体定时处理
/// </summary>
private
void
Out
LineTimerProcess
()
private
void
EmptyIn
LineTimerProcess
()
{
TimeSpan
span
=
DateTime
.
Now
-
ol
_lastSendShelfTime
;
TimeSpan
span
=
DateTime
.
Now
-
l1
_lastSendShelfTime
;
bool
l1_up_sig
=
IOManager
.
IOValue
(
IO_Type
.
L1_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
HIGH
);
//如果出口无料架,持续1000以上,放开阻挡放出一个料架
//每次放料架时间间隔3秒
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)&&
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
!
l1_up_sig
&&
span
.
TotalSeconds
>
3
)
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
!
l1_up_sig
&&
span
.
TotalSeconds
>
10
)
{
//如果入料线体出口无料架,放一个料架到出口
if
(
LineManager
.
checkWatch
(
ol_noshelfWatch
,
1
000
))
//如果入
空入
料线体出口无料架,放一个料架到出口
if
(
LineManager
.
checkWatch
(
l1_noshelfWatch
,
2
000
))
{
//IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW);
LogUtil
.
info
(
" 入料线体出口无料架,下降 ["
+
IO_Type
.
L1_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
ol_lastSendShelfTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 空入料线体出口无料架,下降 ["
+
IO_Type
.
L1_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
StopIOMove
(
IO_Type
.
L1_OutStopDown
,
StopDownMS
);
StopIOMove
(
IO_Type
.
L1_StopDown
,
StopDownMS
);
l1_lastSendShelfTime
=
DateTime
.
Now
;
}
}
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
{
ol_noshelfWatch
.
Stop
();
l1_noshelfWatch
.
Stop
();
IOManager
.
CIOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
}
//如果入口无料架即可进入
//如果
空入料线体
入口无料架即可进入
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
AgvClient
.
NeedEnter
(
Config
.
L1_AgvName
,
""
);
}
else
}
else
{
AgvClient
.
SetToNone
(
Config
.
L1_AgvName
,
""
);
}
}
private
DateTime
il_lastCallAgvTime
=
DateTime
.
Now
.
AddMinutes
(-
5
);
private
Stopwatch
il_outstopCheckWarch
=
new
Stopwatch
();
private
Stopwatch
l3_noshelfWatch
=
new
Stopwatch
();
private
DateTime
l3_lastSendShelfTime
=
DateTime
.
Now
;
private
Stopwatch
l3_outstopCheckWarch
=
new
Stopwatch
();
private
DateTime
l3_lastCallAgvTime
=
DateTime
.
Now
.
AddMinutes
(-
5
);
/// <summary>
/// 包装出料线体定时处理
/// </summary>
private
void
PkgOutLineTimerProcess
()
{
TimeSpan
span
=
DateTime
.
Now
-
l3_lastSendShelfTime
;
//如果出口无料架,持续1000以上,放开阻挡放出一个料架
//每次放料架时间间隔5秒
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_StopCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L3_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
span
.
TotalSeconds
>
5
)
{
//如果包装出料线体出口无料架,放一个料架到出口
if
(
LineManager
.
checkWatch
(
l3_noshelfWatch
,
1000
))
{
IOManager
.
CIOMove
(
IO_Type
.
L3_OutStopDown
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" 包装出料线体出口无料架,下降 ["
+
IO_Type
.
L3_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
l3_lastSendShelfTime
=
DateTime
.
Now
;
StopIOMove
(
IO_Type
.
L3_StopDown
,
StopDownMS
);
}
}
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
{
l3_noshelfWatch
.
Stop
();
IOManager
.
CIOMove
(
IO_Type
.
L1_StopDown
,
IO_VALUE
.
LOW
);
}
TimeSpan
span1
=
DateTime
.
Now
-
l3_lastCallAgvTime
;
//出口有料架,需要通知agv取走料架
//每次叫小车时间间隔3分钟?
//出口信号需要持续1秒钟
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
span1
.
TotalSeconds
>
60
)
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L3Out_PkgTypeDetect_Sig
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
LineManager
.
checkWatch
(
l3_outstopCheckWarch
,
1000
))
{
l3_lastCallAgvTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 包装出料线体出口有料架"
+
",呼叫agv小车["
+
Config
.
L3_AgvName
+
"] [NeedLeave] "
);
AgvClient
.
NeedLeave
(
Config
.
L3_AgvName
,
"Pkg"
);
}
}
}
else
if
(
span1
.
TotalMilliseconds
>
StopDownMS
)
{
l3_outstopCheckWarch
.
Stop
();
ClientAction
currA
=
AgvClient
.
GetAction
(
Config
.
L3_AgvName
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_OutStopDown
).
Equals
(
IO_VALUE
.
HIGH
))
{
IOManager
.
IOMove
(
IO_Type
.
L3_OutStopDown
,
IO_VALUE
.
LOW
);
}
}
}
//如果是出口无料架,NeedLeave状态,改为None
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
AgvClient
.
GetAction
(
Config
.
L3_AgvName
).
Equals
(
ClientAction
.
NeedLeave
))
{
l3_outstopCheckWarch
.
Stop
();
LogUtil
.
info
(
" 包装出料线体出口无料架 ,更改["
+
Config
.
L3_AgvName
+
"] 状态[None] "
);
AgvClient
.
SetToNone
(
Config
.
L3_AgvName
,
""
);
}
}
private
DateTime
l2_lastCallAgvTime
=
DateTime
.
Now
.
AddMinutes
(-
5
);
private
Stopwatch
l2_outstopCheckWarch
=
new
Stopwatch
();
private
DateTime
l2_lastSendShelfTime
=
DateTime
.
Now
;
private
Stopwatch
l2_noshelfWatch
=
new
Stopwatch
();
/// <summary>
/// 出料线体定时处理(入库料串)
///
料串
出料线体定时处理(入库料串)
/// </summary>
private
void
InStore
ReelStringLineTimerProcess
()
private
void
Out
ReelStringLineTimerProcess
()
{
TimeSpan
span
=
DateTime
.
Now
-
il_lastCallAgvTime
;
TimeSpan
span
=
DateTime
.
Now
-
l2_lastSendShelfTime
;
//如果出口无料架,持续1000以上,放开阻挡放出一个料架
//每次放料架时间间隔5秒
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_StopCheck1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
span
.
TotalSeconds
>
5
)
{
//如果包装出料线体出口无料架,放一个料架到出口
if
(
LineManager
.
checkWatch
(
l2_noshelfWatch
,
1000
))
{
IOManager
.
CIOMove
(
IO_Type
.
L2_OutStopDown
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" 料串出料线体出口无料架,下降 ["
+
IO_Type
.
L2_StopDown
+
"] ["
+
StopDownMS
+
"] 秒"
);
l2_lastSendShelfTime
=
DateTime
.
Now
;
StopIOMove
(
IO_Type
.
L2_StopDown
,
StopDownMS
);
}
}
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
{
l2_noshelfWatch
.
Stop
();
IOManager
.
CIOMove
(
IO_Type
.
L2_StopDown
,
IO_VALUE
.
LOW
);
}
TimeSpan
span1
=
DateTime
.
Now
-
l2_lastCallAgvTime
;
//出口有料架,需要通知agv取走料架
//每次叫小车时间间隔3分钟?
//出口信号需要持续1秒钟
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
span
.
TotalSeconds
>
60
)
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
span
1
.
TotalSeconds
>
60
)
{
if
(
LastOutShelfId
.
Equals
(
"000"
).
Equals
(
false
))
{
if
(
LineManager
.
checkWatch
(
il
_outstopCheckWarch
,
1000
))
if
(
LineManager
.
checkWatch
(
l2
_outstopCheckWarch
,
1000
))
{
il
_lastCallAgvTime
=
DateTime
.
Now
;
l2
_lastCallAgvTime
=
DateTime
.
Now
;
LogUtil
.
info
(
" 出料线体出口有料架"
+
LastOutShelfId
+
",呼叫agv小车["
+
Config
.
L2_AgvName
+
"] [NeedLeave] "
);
LogUtil
.
info
(
"
料串
出料线体出口有料架"
+
LastOutShelfId
+
",呼叫agv小车["
+
Config
.
L2_AgvName
+
"] [NeedLeave] "
);
AgvClient
.
NeedLeave
(
Config
.
L2_AgvName
,
LastOutShelfId
);
}
}
}
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
else
if
(
span
1
.
TotalMilliseconds
>
StopDownMS
)
{
il
_outstopCheckWarch
.
Stop
();
l2
_outstopCheckWarch
.
Stop
();
ClientAction
currA
=
AgvClient
.
GetAction
(
Config
.
L2_AgvName
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
))
{
...
...
@@ -344,107 +467,170 @@ namespace OnlineStore.DeviceLibrary
//如果是出口无料架,NeedLeave状态,改为None
if
(
IOManager
.
IOValue
(
IO_Type
.
L2_OutCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
AgvClient
.
GetAction
(
Config
.
L2_AgvName
).
Equals
(
ClientAction
.
NeedLeave
))
{
il
_outstopCheckWarch
.
Stop
();
l2
_outstopCheckWarch
.
Stop
();
LogUtil
.
info
(
" 出料线体出口无料架 ,更改["
+
Config
.
L2_AgvName
+
"] 状态[None] "
);
AgvClient
.
SetToNone
(
Config
.
L2_AgvName
,
""
);
AgvClient
.
SetToNone
(
Config
.
L2_AgvName
,
""
);
}
}
private
Task
TranverseTask
;
private
Stopwatch
ol_tranverseShelfWatch
=
new
Stopwatch
();
private
void
TranverseTimerProcess
()
{
//人工取料
if
(
IOManager
.
IOValue
(
IO_Type
.
L
1
_ManualRecSig
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOManager
.
IOValue
(
IO_Type
.
L
2
_ManualRecSig
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L2_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
// if (LineManager.checkWatch(ol_tranverseShelfWatch, 2000))
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L2_InCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
IO_Type
.
PackingShelf_Sig
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
TranverseTask
==
null
)
{
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
TranverseProcess
));
il_lastCallAgvTime
=
DateTime
.
Now
;
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
Tranverse1Process
));
}
else
if
(
TranverseTask
.
IsCompleted
)
{
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
Tranverse
Process
));
il_lastCallAgvTime
=
DateTime
.
Now
;
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
Tranverse1
Process
));
}
}
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_ManualRecSig
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L3_InCheck
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
IO_Type
.
PackingShelf_Sig
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(
TranverseTask
==
null
)
{
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
Tranverse2Process
));
}
else
else
if
(
TranverseTask
.
IsCompleted
)
{
ol_tranverseShelfWatch
.
Stop
();
TranverseTask
=
Task
.
Factory
.
StartNew
(
new
Action
(
Tranverse2Process
));
}
}
}
}
private
static
void
TranverseProcess
()
private
static
void
Tranverse
1
Process
()
{
LogUtil
.
info
(
" TranverseProcess"
);
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
PackingShelf_Sig
).
Equals
(
IO_VALUE
.
HIGH
))
LogUtil
.
info
(
" Tranverse L1->L2"
);
//if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.PackingShelf_Sig).Equals(IO_VALUE.HIGH))
//{
// IOManager.CIOMove(IO_Type.Switch_Forward, IO_VALUE.LOW);
// Thread.Sleep(500);
// IOManager.CIOMove(IO_Type.Switch_Back, IO_VALUE.HIGH);
// LogUtil.info(" L1->L2 横移包装料架");
// while (IOManager.IOValue(IO_Type.Switch_Back_Sig).Equals(IO_VALUE.LOW))
// {
// }
// LogUtil.info(" L1->L2 料串气缸到达后退端");
//}
//else if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.PackingShelf_Sig).Equals(IO_VALUE.LOW))
//{
// IOManager.CIOMove(IO_Type.Switch_Back, IO_VALUE.LOW);
// Thread.Sleep(500);
// IOManager.CIOMove(IO_Type.Switch_Forward, IO_VALUE.HIGH);
// LogUtil.info(" L1->L2 横移料串");
// //while (IOManager.IOValue(IO_Type.Switch_Forward_Sig).Equals(IO_VALUE.LOW))
// //{
// //}
// //LogUtil.info(" L1->L2 料串气缸到达前进端");
//}
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L2_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
IOManager
.
CIOMove
(
IO_Type
.
Switch_Forward
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L2_Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
CIOMove
(
IO_Type
.
Switch_Back
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" 横移包装料架"
);
while
(
IOManager
.
IOValue
(
IO_Type
.
Switch_Back_Sig
).
Equals
(
IO_VALUE
.
LOW
))
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
500
);
LogUtil
.
info
(
" L1->L2 横移机构上升"
);
while
(
IOManager
.
IOValue
(
IO_Type
.
L2_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
L1_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
LOW
))
{
}
LogUtil
.
info
(
" 料串气缸到达后退端"
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" L1->L2 横移机构电机运行"
);
}
else
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
PackingShelf_Sig
).
Equals
(
IO_VALUE
.
LOW
))
Stopwatch
stopwatch
=
new
Stopwatch
();
stopwatch
.
Start
();
while
(
IOManager
.
IOValue
(
IO_Type
.
L2_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
IOManager
.
CIOMove
(
IO_Type
.
Switch_Back
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
CIOMove
(
IO_Type
.
Switch_Forward
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" 横移料串"
);
while
(
IOManager
.
IOValue
(
IO_Type
.
Switch_Forward_Sig
).
Equals
(
IO_VALUE
.
LOW
))
if
(
stopwatch
.
Elapsed
.
TotalMinutes
>=
2
)
{
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" L1->L2 横移机构转移料串超时"
);
}
}
LogUtil
.
info
(
" 料串气缸到达前进端"
);
stopwatch
.
Stop
();
Thread
.
Sleep
(
2000
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" L1->L2 横移电机停止"
);
Thread
.
Sleep
(
1000
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
CIOMove
(
IO_Type
.
L2_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" 横移机构下降"
);
LogUtil
.
info
(
" L1->L2 Tranverse Finish"
);
}
if
(
IOManager
.
IOValue
(
IO_Type
.
L1_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
IO_Type
.
L2_InCheck
).
Equals
(
IO_VALUE
.
LOW
)
)
private
static
void
Tranverse2Process
(
)
{
IOManager
.
CIOMove
(
IO_Type
.
Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" Tranverse L1->L3"
);
IOManager
.
CIOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L3_Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
IOMove
(
IO_Type
.
Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
Thread
.
Sleep
(
500
);
LogUtil
.
info
(
"
横移机构上升"
);
while
(
IOManager
.
IOValue
(
IO_Type
.
L2
_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
LOW
))
LogUtil
.
info
(
" L1->L3
横移机构上升"
);
while
(
IOManager
.
IOValue
(
IO_Type
.
L3_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
LOW
)
||
IOManager
.
IOValue
(
IO_Type
.
L1
_UpDown_Up_Sig
).
Equals
(
IO_VALUE
.
LOW
))
{
}
//IOManager.IOMove(IO_Type.Traverse2_Run, IO_VALUE.HIGH);
IOManager
.
IOMove
(
IO_Type
.
Traverse1_Run
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" 横移机构电机运行"
);
}
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_RollerRun
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" L1->L3 横移机构电机运行"
);
Stopwatch
stopwatch
=
new
Stopwatch
();
stopwatch
.
Start
();
while
(
IOManager
.
IOValue
(
IO_Type
.
L
2
_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
while
(
IOManager
.
IOValue
(
IO_Type
.
L
3
_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
stopwatch
.
Elapsed
.
TotalMinutes
>=
2
)
{
//stopwatch.Stop(
);
//IOManager.CIOMove(IO_Type.Traverse_Run, IO_VALUE.LOW
);
//IOManager.CIOMove(IO_Type.Roller_Run, IO_VALUE.LOW
);
LogUtil
.
info
(
" 横移机构转移料架超时 ["
+
IO_Type
.
L1_StopDown
+
"] 大于2分钟"
);
//break
;
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_RollerRun
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" L1->L3 横移机构转移料架超时"
)
;
}
}
stopwatch
.
Stop
();
Thread
.
Sleep
(
2000
);
IOManager
.
IOMove
(
IO_Type
.
Traverse1_Run
,
IO_VALUE
.
LOW
);
//IOManager.IOMove(IO_Type.Traverse2_Run, IO_VALUE.LOW);
LogUtil
.
info
(
" 横移电机停止"
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_BackRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_RollerRun
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Run
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
" L1->L3 横移电机停止"
);
Thread
.
Sleep
(
1000
);
IOManager
.
CIOMove
(
IO_Type
.
Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
CIOMove
(
IO_Type
.
Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L1_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
IOManager
.
CIOMove
(
IO_Type
.
L1_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
IOManager
.
CIOMove
(
IO_Type
.
L3_Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
LogUtil
.
info
(
" 横移机构下降"
);
LogUtil
.
info
(
"
TranverseProcess
Finish"
);
LogUtil
.
info
(
"
L1->L3 Tranverse
Finish"
);
}
private
void
LedProcess
()
{
...
...
@@ -588,8 +774,8 @@ namespace OnlineStore.DeviceLibrary
LedProcess
();
LastInShelfId
=
RFIDManager
.
ReadRFID
(
Config
.
L2_In_RFIDIP
,
true
).
NumStr
();
LastOutShelfId
=
RFIDManager
.
ReadRFID
(
Config
.
L2_Out_RFIDIP
,
true
).
NumStr
();
LastInShelfId
=
RFIDManager
.
ReadRFID
(
Config
.
L2_In_RFIDIP
,
true
).
NumStr
();
LastOutShelfId
=
RFIDManager
.
ReadRFID
(
Config
.
L2_Out_RFIDIP
,
true
).
NumStr
();
bool
result
=
SendVmiRfid
(
LastInShelfId
);
if
(
result
)
{
...
...
@@ -632,7 +818,7 @@ namespace OnlineStore.DeviceLibrary
{
Dictionary
<
string
,
string
>
paramMap
=
new
Dictionary
<
string
,
string
>();
paramMap
.
Add
(
"rfid"
,
rfid
);
string
addr
=
GetAddr
(
api_communication
,
paramMap
)
;
string
addr
=
GetAddr
(
api_communication
,
paramMap
)
;
string
resultStr
=
HttpHelper
.
Post
(
addr
,
""
);
string
log
=
"vmiRfid 【"
+
addr
+
"】【"
+
resultStr
+
"】"
;
if
(
lastLog
.
Equals
(
log
).
Equals
(
false
))
...
...
source/DeviceLibrary/acVmiLine/VMILineBean_Partial.cs
查看文件 @
acb7d13
...
...
@@ -126,8 +126,9 @@ namespace OnlineStore.DeviceLibrary
public
string
GetRunInfo
()
{
return
"进料线入口"
+
Config
.
L1_AgvName
+
":"
+
AgvClient
.
GetAction
(
Config
.
L1_AgvName
)
+
",料架: "
+
LastInShelfId
+
"\r\n"
+
"出料线出口"
+
Config
.
L2_AgvName
+
":"
+
AgvClient
.
GetAction
(
Config
.
L2_AgvName
)
+
",料架: "
+
LastOutShelfId
+
"\r\n"
;
return
"空入料线入口"
+
Config
.
L1_AgvName
+
":"
+
AgvClient
.
GetAction
(
Config
.
L1_AgvName
)
+
",料架: "
+
LastInShelfId
+
"\r\n"
+
"料串出料线出口"
+
Config
.
L2_AgvName
+
":"
+
AgvClient
.
GetAction
(
Config
.
L2_AgvName
)
+
",料架: "
+
LastOutShelfId
+
"\r\n"
+
"包装出料线出口"
+
Config
.
L3_AgvName
+
":"
+
AgvClient
.
GetAction
(
Config
.
L3_AgvName
);
}
#
endregion
...
...
@@ -158,9 +159,12 @@ namespace OnlineStore.DeviceLibrary
needCheckList
.
Add
(
IO_Type
.
L2_InCheck
);
needCheckList
.
Add
(
IO_Type
.
L2_StopCheck1
);
needCheckList
.
Add
(
IO_Type
.
L2_OutCheck
);
needCheckList
.
Add
(
IO_Type
.
L3_InCheck
);
needCheckList
.
Add
(
IO_Type
.
L3_StopCheck
);
needCheckList
.
Add
(
IO_Type
.
L3_OutCheck
);
needCheckList
.
Add
(
IO_Type
.
L2_StopDown
);
needCheckList
.
Add
(
IO_Type
.
L1_StopDown
);
needCheckList
.
Add
(
IO_Type
.
L3_StopDown
);
}
bool
agvBusy
=
false
;
ClientAction
currA
=
AgvClient
.
GetAction
(
Config
.
L1_AgvName
);
...
...
@@ -231,6 +235,7 @@ namespace OnlineStore.DeviceLibrary
IsSleep
=
true
;
IOManager
.
IOMove
(
IO_Type
.
L1_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L2_Run
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
L3_Run
,
IO_VALUE
.
LOW
);
}
else
{
...
...
@@ -238,6 +243,7 @@ namespace OnlineStore.DeviceLibrary
LastBusyTime
=
DateTime
.
Now
;
IOManager
.
IOMove
(
IO_Type
.
L1_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L2_Run
,
IO_VALUE
.
HIGH
);
IOManager
.
IOMove
(
IO_Type
.
L3_Run
,
IO_VALUE
.
HIGH
);
};
}
#
endregion
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
acb7d13
...
...
@@ -156,6 +156,36 @@ namespace OnlineStore.DeviceLibrary
SetStatus
(
id
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
}
}
else
if
(
id
.
Equals
(
LineManager
.
Config
.
L3_AgvName
))
{
if
(
IOManager
.
IOValue
(
IO_Type
.
L3_OutCheck
).
Equals
(
IO_VALUE
.
HIGH
))
{
SetStatus
(
id
,
"Pkg"
,
ClientAction
.
MayLeave
);
LineManager
.
VMILine
.
UpdateSleep
(
false
);
LineManager
.
VMILine
.
StopIOMove
(
IO_Type
.
L3_OutStopDown
,
1500
);
//agvClient.MayLeave(id);
LogUtil
.
info
(
logName
+
"下降 L3_OutStopDown "
);
Task
.
Factory
.
StartNew
(
delegate
{
//两秒后改为离开状态
Thread
.
Sleep
(
5000
);
LogUtil
.
info
(
logName
+
" ,调用 FinishLeave "
);
SetStatus
(
id
,
"Pkg"
,
ClientAction
.
FinishLeave
);
Thread
.
Sleep
(
5000
);
LogUtil
.
info
(
logName
+
" ,处理结束 更新状态为None "
);
SetStatus
(
id
,
"Pkg"
,
ClientAction
.
None
);
});
}
else
{
LogUtil
.
error
(
logName
+
" L3_OutCheck 未检测到料架,无法将料架进入AGV"
);
SetStatus
(
id
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
}
}
}
private
static
void
AgvClient_Arrive
(
string
id
,
string
rfid
)
{
...
...
source/LoadCVSLibrary/Config/bean/IO_Type.cs
查看文件 @
acb7d13
...
...
@@ -33,12 +33,12 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public
static
string
Reset_BTN
=
"Reset_BTN"
;
/// <summary>
/// DI,
出料线入口检测,L2_InCheck,2,PRO_AOI_IP_1,0,
出料线入口检测,X723,DI-03,0,
/// DI,
料串出料线入口检测,L2_InCheck,2,PRO_AOI_IP_1,0,料串
出料线入口检测,X723,DI-03,0,
/// </summary>
public
static
string
L2_InCheck
=
"L2_InCheck"
;
/// <summary>
/// DI,
出料线检测1,L2_StopCheck1,3,PRO_AOI_IP_1,0,出料线检测1
,X724,DI-04,0,
/// DI,
料串出料线阻挡检测,L2_StopCheck1,3,PRO_AOI_IP_1,0,料串出料线阻挡检测
,X724,DI-04,0,
/// </summary>
public
static
string
L2_StopCheck1
=
"L2_StopCheck1"
;
/// <summary>
...
...
@@ -46,123 +46,191 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
public
static
string
Switch_Forward_Sig
=
"Switch_Forward_Sig"
;
/// <summary>
///DI,
出料线出口检测,L2_OutCheck,5,PRO_AOI_IP_1,0,
出料线出口检测,X726,DI-06,0,
///DI,
料串出料线出口检测,L2_OutCheck,5,PRO_AOI_IP_1,0,料串
出料线出口检测,X726,DI-06,0,
/// </summary>
public
static
string
L2_OutCheck
=
"L2_OutCheck"
;
/// <summary>
/// DI,
入料线入口检测,L1_InCheck,6,PRO_AOI_IP_1,0,
入料线入口检测,X727,DI-07,0,
/// DI,
空入料线入口检测,L1_InCheck,6,PRO_AOI_IP_1,0,空
入料线入口检测,X727,DI-07,0,
/// </summary>
public
static
string
L1_InCheck
=
"L1_InCheck"
;
/// <summary>
///DI,
入料线阻挡检测,L1_StopCheck,7,PRO_AOI_IP_1,0,
入料线阻挡检测,X728,DI-08,0,
///DI,
空入料线阻挡检测,L1_StopCheck,7,PRO_AOI_IP_1,0,空
入料线阻挡检测,X728,DI-08,0,
/// </summary>
public
static
string
L1_StopCheck
=
"L1_StopCheck"
;
/// <summary>
/// DI,料串切换气缸后退端,Switch_Back_Sig,8,PRO_AOI_IP_1,0,料串切换气缸后退端,X729,D
O-01
,0,
/// DI,料串切换气缸后退端,Switch_Back_Sig,8,PRO_AOI_IP_1,0,料串切换气缸后退端,X729,D
I-09
,0,
/// </summary>
public
static
string
Switch_Back_Sig
=
"Switch_Back_Sig"
;
/// <summary>
///DI,
入料线出口检测,L1_OutCheck,9,PRO_AOI_IP_1,0,入料线出口检测,X730,DO-02
,0,
///DI,
空入料线出口检测,L1_OutCheck,9,PRO_AOI_IP_1,0,空入料线出口检测,X730,DI-10
,0,
/// </summary>
public
static
string
L1_OutCheck
=
"L1_OutCheck"
;
/// <summary>
/// DI,
出料线人工取料信号,L1_ManualRecSig,10,PRO_AOI_IP_1,0,出料线人工取料信号,X731,DO-03
,0,
/// DI,
料串出料线脚踏信号,L2_ManualRecSig,10,PRO_AOI_IP_1,0,料串出料线脚踏信号,X731,DI-11
,0,
/// </summary>
public
static
string
L
1_ManualRecSig
=
"L1
_ManualRecSig"
;
public
static
string
L
2_ManualRecSig
=
"L2
_ManualRecSig"
;
/// <summary>
/// DI,
进料线体横移上升端,L1_UpDown_Up_Sig,11,PRO_AOI_IP_1,0,进料线体横移上升端,X732,DO-04
,0,
/// DI,
空入料线体横移上升端,L1_UpDown_Up_Sig,11,PRO_AOI_IP_1,0,空入料线体横移上升端,X732,DI-12
,0,
/// </summary>
public
static
string
L1_UpDown_Up_Sig
=
"L1_UpDown_Up_Sig"
;
/// <summary>
/// DI,
进料线体横移下降端,L1_UpDown_Down_Sig,12,PRO_AOI_IP_1,0,进料线体横移下降端,X733,DO-05
,0,
/// DI,
空入料线体横移下降端,L1_UpDown_Down_Sig,12,PRO_AOI_IP_1,0,空入料线体横移下降端,X733,DI-13
,0,
/// </summary>
public
static
string
L1_UpDown_Down_Sig
=
"L1_UpDown_Down_Sig"
;
/// <summary>
///DI,
出料线体横移上升端,L2_UpDown_Up_Sig,13,PRO_AOI_IP_1,0,出料线体横移上升端,X734,DO-06
,0,
///DI,
料串出料线体横移上升端,L2_UpDown_Up_Sig,13,PRO_AOI_IP_1,0,料串出料线体横移上升端,X734,DI-14
,0,
/// </summary>
public
static
string
L2_UpDown_Up_Sig
=
"L2_UpDown_Up_Sig"
;
/// <summary>
/// DI,
出料线体横移下降端,L2_UpDown_Down_Sig,14,PRO_AOI_IP_1,0,出料线体横移下降端,X735,DO-07
,0,
/// DI,
料串出料线体横移下降端,L2_UpDown_Down_Sig,14,PRO_AOI_IP_1,0,料串出料线体横移下降端,X735,DI-15
,0,
/// </summary>
public
static
string
L2_UpDown_Down_Sig
=
"L2_UpDown_Down_Sig"
;
/// <summary>
/// DI,包装料架检测信号
,PackingShelf_Sig,15,PRO_AOI_IP_1,0,包装料架检测信号,X736,DO-08
,0,
/// DI,包装料架检测信号
(空入料线体出口),PackingShelf_Sig,15,PRO_AOI_IP_1,0,包装料架检测信号(空入料线体出口),X736,DI-16
,0,
/// </summary>
public
static
string
PackingShelf_Sig
=
"PackingShelf_Sig"
;
/// <summary>
/// DO,运行状态(指示灯),AutoRun_HddLed,0,PRO_AOI_IP_1,0,运行状态(指示灯),Y721,D
I
-01,0,
/// DO,运行状态(指示灯),AutoRun_HddLed,0,PRO_AOI_IP_1,0,运行状态(指示灯),Y721,D
O
-01,0,
/// </summary>
public
static
string
AutoRun_HddLed
=
"AutoRun_HddLed"
;
/// <summary>
///DO,故障状态(指示灯),Alarm_HddLed,1,PRO_AOI_IP_1,0,故障状态(指示灯),Y722,D
I
-02,0,
///DO,故障状态(指示灯),Alarm_HddLed,1,PRO_AOI_IP_1,0,故障状态(指示灯),Y722,D
O
-02,0,
/// </summary>
public
static
string
Alarm_HddLed
=
"Alarm_HddLed"
;
/// <summary>
///DO,
进料线驱动电机运转,L1_Run,2,PRO_AOI_IP_1,0,进料线驱动电机运转,Y723,DI
-03,0,
///DO,
空入料线驱动电机运转,L1_Run,2,PRO_AOI_IP_1,0,空入料线驱动电机运转,Y723,DO
-03,0,
/// </summary>
public
static
string
L1_Run
=
"L1_Run"
;
/// <summary>
/// DO,
出料线驱动电机运转,L2_Run,3,PRO_AOI_IP_1,0,出料线驱动电机运转,Y724,DI
-04,0,
/// DO,
料串出料线驱动电机运转,L2_Run,3,PRO_AOI_IP_1,0,料串出料线驱动电机运转,Y724,DO
-04,0,
/// </summary>
public
static
string
L2_Run
=
"L2_Run"
;
/// <summary>
/// DO,
进料线阻挡1下降,L1_StopDown,4,PRO_AOI_IP_1,0,进料线阻挡1下降,Y725,DI
-05,0,
/// DO,
空入料线阻挡下降,L1_StopDown,4,PRO_AOI_IP_1,0,空入料线阻挡下降,Y725,DO
-05,0,
/// </summary>
public
static
string
L1_StopDown
=
"L1_StopDown"
;
/// <summary>
/// DO,
进料线阻挡2下降,L1_StopDown2,5,PRO_AOI_IP_1,0,进料线阻挡2下降,Y726,DI
-06,0,
/// DO,
料串出料线横移机构上升SOL,L2_Traverse_Up_SOL,5,PRO_AOI_IP_1,0,料串出料线横移机构上升SOL,Y726,DO
-06,0,
/// </summary>
//public static string L1_StopDown2 = "L1_StopDown2
";
public
static
string
L2_Traverse_Up_SOL
=
"L2_Traverse_Up_SOL
"
;
/// <summary>
/// DO,
进料线出口阻挡下降,L1_OutStopDown,6,PRO_AOI_IP_1,0,进料线出口阻挡下降,Y727,DI
-07,0,
/// DO,
空入料线出口阻挡下降,L1_OutStopDown,6,PRO_AOI_IP_1,0,空入料线出口阻挡下降,Y727,DO
-07,0,
/// </summary>
public
static
string
L1_OutStopDown
=
"L1_OutStopDown"
;
/// <summary>
/// DO,
出料线出口阻挡下降,L2_OutStopDown,7,PRO_AOI_IP_1,0,出料线阻挡1下降,Y728,DI
-08,0,
/// DO,
料串出料线出口阻挡下降,L2_OutStopDown,7,PRO_AOI_IP_1,0,料串出料线出口阻挡下降,Y728,DO
-08,0,
/// </summary>
public
static
string
L2_OutStopDown
=
"L2_OutStopDown"
;
/// <summary>
/// DO,
出料线阻挡2下降,L2_OutStopDown2,8,PRO_AOI_IP_1,0,出料线阻挡2下降,Y729,DO-01
,0,
/// DO,
料串出料线横移机构下降SOL,L2_Traverse_Down_SOL,8,PRO_AOI_IP_1,0,料串出料线横移机构下降SOL,Y729,DO-09
,0,
/// </summary>
//public static string L2_StopDown2 = "L2_StopDown2
";
public
static
string
L2_Traverse_Down_SOL
=
"L2_Traverse_Down_SOL
"
;
/// <summary>
/// DO,
出料线出口阻挡下降,L2_StopDown,9,PRO_AOI_IP_1,0,出料线出口阻挡下降,Y730,DO-02
,0,
/// DO,
料串出料线阻挡下降,L2_StopDown,9,PRO_AOI_IP_1,0,料串出料线阻挡下降,Y730,DO-10
,0,
/// </summary>
public
static
string
L2_StopDown
=
"L2_StopDown"
;
/// <summary>
/// DO,
横移机构上升SOL,Traverse_Up_SOL,10,PRO_AOI_IP_1,0,横移机构上升SOL,Y731,DO-03
,0,
/// DO,
空入料线横移机构上升SOL,L1_Traverse_Up_SOL,10,PRO_AOI_IP_1,0,空入料线横移机构上升SOL,Y731,DO-11
,0,
/// </summary>
public
static
string
Traverse_Up_SOL
=
"
Traverse_Up_SOL"
;
public
static
string
L1_Traverse_Up_SOL
=
"L1_
Traverse_Up_SOL"
;
/// <summary>
/// DO,
横移机构下降SOL,Traverse_Down_SOL,11,PRO_AOI_IP_1,0,横移机构下降SOL,Y732,DO-04
,0,
/// DO,
空入料线横移机构下降SOL,L1_Traverse_Down_SOL,11,PRO_AOI_IP_1,0,空入料线横移机构下降SOL,Y732,DO-12
,0,
/// </summary>
public
static
string
Traverse_Down_SOL
=
"
Traverse_Down_SOL"
;
public
static
string
L1_Traverse_Down_SOL
=
"L1_
Traverse_Down_SOL"
;
/// <summary>
/// DO,
横移电机1运转,Traverse1_Run,12,PRO_AOI_IP_1,0,横移电机1运转,Y733,DO-05
,0,
/// DO,
空入料线横移电机正转,L1_Traverse_Run,12,PRO_AOI_IP_1,0,空入料线横移电机正转,Y733,DO-13
,0,
/// </summary>
public
static
string
Traverse1_Run
=
"Traverse1
_Run"
;
public
static
string
L1_Traverse_Run
=
"L1_Traverse
_Run"
;
/// <summary>
/// DO,
横移电机2运转,Traverse2_Run,13,PRO_AOI_IP_1,0,横移电机2运转,Y734,DO-06
,0,
/// DO,
空入料线横移电机反转,L1_Traverse_BackRun,13,PRO_AOI_IP_1,0,空入料线横移电机反转,Y734,DO-14
,0,
/// </summary>
public
static
string
Traverse2_Run
=
"Traverse2_
Run"
;
public
static
string
L1_Traverse_BackRun
=
"L1_Traverse_Back
Run"
;
/// <summary>
/// DO,料串切换气缸前进,Switch_Forward,14,PRO_AOI_IP_1,0,料串切换气缸前进,Y735,DO-
07,0,
/// DO,料串切换气缸前进,Switch_Forward,14,PRO_AOI_IP_1,0,料串切换气缸前进,Y735,DO-
15,0,
/// </summary>
public
static
string
Switch_Forward
=
"Switch_Forward"
;
/// <summary>
/// DO,料串切换气缸后退,Switch_Back,15,PRO_AOI_IP_1,0,料串切换气缸后退,Y736,DO-
08
,0,
/// DO,料串切换气缸后退,Switch_Back,15,PRO_AOI_IP_1,0,料串切换气缸后退,Y736,DO-
16
,0,
/// </summary>
public
static
string
Switch_Back
=
"Switch_Back"
;
/// <summary>
/// DI,包装料架检测信号(料串出料线体出口),L2Out_PkgTypeDetect_Sig,0,PRO_AOI_IP_2,0,包装料架检测信号(料串出料线体出口),X781,DI-01,0,
/// </summary>
public
static
string
L2Out_PkgTypeDetect_Sig
=
"L2Out_PkgTypeDetect_Sig"
;
/// <summary>
/// DI,包装料架检测信号(包装料架出料线体出口),L3Out_PkgTypeDetect_Sig,1,PRO_AOI_IP_2,0,包装料架检测信号(包装料架出料线体出口),X782,DI-02,0,
/// </summary>
public
static
string
L3Out_PkgTypeDetect_Sig
=
"L3Out_PkgTypeDetect_Sig"
;
/// <summary>
///DI,包装料架出料线脚踏信号,L3_ManualRecSig,2,PRO_AOI_IP_2,0,包装料架出料线脚踏信号,X783,DI-03,0,
/// </summary>
public
static
string
L3_ManualRecSig
=
"L3_ManualRecSig"
;
/// <summary>
///DI,包装料架出料线体横移上升端,L3_UpDown_Up_Sig,3,PRO_AOI_IP_2,0,包装料架出料线体横移上升端,X784,DI-04,0,
/// </summary>
public
static
string
L3_UpDown_Up_Sig
=
"L3_UpDown_Up_Sig"
;
/// <summary>
/// DI,包装料架出料线体横移下降端,L3_UpDown_Down_Sig,4,PRO_AOI_IP_2,0,包装料架出料线体横移下降端,X785,DI-05,0,
/// </summary>
public
static
string
L3_UpDown_Down_Sig
=
"L3_UpDown_Down_Sig"
;
/// <summary>
/// DI,包装料架出料线入口检测,L3_InCheck,5,PRO_AOI_IP_2,0,包装料架出料线入口检测,X786,DI-06,0,
/// </summary>
public
static
string
L3_InCheck
=
"L3_InCheck"
;
/// <summary>
/// DI,包装料架出料线阻挡检测,L3_StopCheck,6,PRO_AOI_IP_2,0,包装料架出料线阻挡检测,X787,DI-07,0,
/// </summary>
public
static
string
L3_StopCheck
=
"L3_StopCheck"
;
/// <summary>
/// DI,包装料架出料线出口检测,L3_OutCheck,7,PRO_AOI_IP_2,0,包装料架出料线出口检测,X788,DI-08,0,
/// </summary>
public
static
string
L3_OutCheck
=
"L3_OutCheck"
;
/// <summary>
///DO,包装料架出料线驱动电机运转,L3_Run,0,PRO_AOI_IP_2,0,包装料架出料线驱动电机运转,Y781,DO-01,0,
/// </summary>
public
static
string
L3_Run
=
"L3_Run"
;
/// <summary>
/// DO,包装料架出料线过渡滚筒电机运转,L3_RollerRun,1,PRO_AOI_IP_2,0,包装料架出料线过渡滚筒电机运转,Y782,DO-02,0,
/// </summary>
public
static
string
L3_RollerRun
=
"L3_RollerRun"
;
/// <summary>
/// DO,料串出料线横移电机运转,L2_Traverse_Run,2,PRO_AOI_IP_2,0,料串出料线横移电机运转,Y783,DO-03,0,
/// </summary>
public
static
string
L2_Traverse_Run
=
"L2_Traverse_Run"
;
/// <summary>
/// DO,包装料架出料线横移电机运转,L3_Traverse_Run,3,PRO_AOI_IP_2,0,包装料架出料线横移电机运转,Y784,DO-04,0,
/// </summary>
public
static
string
L3_Traverse_Run
=
"L3_Traverse_Run"
;
/// <summary>
/// DO,包装料架出料线横移机构上升SOL,L3_Traverse_Up_SOL,4,PRO_AOI_IP_2,0,包装料架出料线横移机构上升SOL,Y785,DO-05,0,
/// </summary>
public
static
string
L3_Traverse_Up_SOL
=
"L3_Traverse_Up_SOL"
;
/// <summary>
/// DO,包装料架出料线横移机构下降SOL,L3_Traverse_Down_SOL,5,PRO_AOI_IP_2,0,包装料架出料线横移机构下降SOL,Y786,DO-06,0,
/// </summary>
public
static
string
L3_Traverse_Down_SOL
=
"L3_Traverse_Down_SOL"
;
/// <summary>
///DO,包装料架出料线阻挡下降,L3_StopDown,6,PRO_AOI_IP_2,0,包装料架出料线阻挡下降,Y787,DO-07,0,
/// </summary>
public
static
string
L3_StopDown
=
"L3_StopDown"
;
/// <summary>
/// DO,包装料架出料线出口阻挡下降,L3_OutStopDown,7,PRO_AOI_IP_2,0,包装料架出料线出口阻挡下降,Y788,DO-08,0,
/// </summary>
public
static
string
L3_OutStopDown
=
"L3_OutStopDown"
;
}
public
enum
IO_VALUE
{
...
...
source/LoadCVSLibrary/Config/bean/VMLLineConfig.cs
查看文件 @
acb7d13
...
...
@@ -50,7 +50,11 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[
ConfigProAttribute
(
"L2_AgvName"
)]
public
string
L2_AgvName
{
get
;
set
;
}
/// <summary>
/// PRO,L3包装料架出料线AGV节点名称,L3_AgvName,A11,,,,,,,
/// </summary>
[
ConfigProAttribute
(
"L3_AgvName"
)]
public
string
L3_AgvName
{
get
;
set
;
}
public
double
AirCheckSeconds
=
60
;
/// <summary>
...
...
source/VMILineClient/App.config
查看文件 @
acb7d13
...
...
@@ -8,7 +8,7 @@
<
add
key
=
"App_AutoRun"
value
=
"1"
/>
<
add
key
=
"App_Title"
value
=
"VMI总仓进出料架缓存线"
/>
<!--
Server
address
-->
<
add
key
=
"http.server"
value
=
"http://10.85.1
60
.25/myproject/"
/>
<
add
key
=
"http.server"
value
=
"http://10.85.1
99
.25/myproject/"
/>
<!--
storeType
-->
<
add
key
=
"store_count"
value
=
"1"
/>
<!--
start
one
store
config
-->
...
...
@@ -22,7 +22,9 @@
<
add
key
=
"AgvServerIp"
value
=
"192.168.103.12"
/>
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"Agv_Log_Open"
value
=
"1"
/>
<
add
key
=
"Agv_Log_Open"
value
=
"1"
/>
<
add
key
=
"RfidServer_Port"
value
=
"13005"
/>
<
add
key
=
"ClientSettingsProvider.ServiceUri"
value
=
""
/>
</
appSettings
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
...
@@ -36,16 +38,15 @@
</
layout
>
</
appender
>
<
appender
name
=
"TheRFID"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/TheRFID-vmi.log"
/>
<
file
value
=
"logs/TheRFID-vmi.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
source/VMILineClient/FrmVMIClient.Designer.cs
查看文件 @
acb7d13
...
...
@@ -39,19 +39,19 @@
this
.
btnDis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox2
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
numericUpDown1
=
new
System
.
Windows
.
Forms
.
NumericUpDown
();
this
.
btnStopTDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cmbStopList
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
button2
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtDOIndex
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label14
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnWriteSingleDO
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
txtWriteTime
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
txtDoName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label17
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbWriteIO
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnCloseA
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearL
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLogDebug
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOLOutStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOLInStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInLOutStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInLInStopDown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInLineRun
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnOutL
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel2
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
...
@@ -68,13 +68,10 @@
this
.
btnVmiStop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbAuto
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnTranverse
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnUpdown
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSwitch
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
groupBox5
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numericUpDown1
)).
BeginIni
t
();
this
.
groupBox6
.
SuspendLayou
t
();
this
.
groupBox4
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
...
...
@@ -133,7 +130,7 @@
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedLeave
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnDis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnInit
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
450
,
1
32
);
this
.
groupBox5
.
Location
=
new
System
.
Drawing
.
Point
(
450
,
1
89
);
this
.
groupBox5
.
Name
=
"groupBox5"
;
this
.
groupBox5
.
Size
=
new
System
.
Drawing
.
Size
(
728
,
77
);
this
.
groupBox5
.
TabIndex
=
277
;
...
...
@@ -218,97 +215,140 @@
//
this
.
groupBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnSwitch
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnUpdown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnTranverse
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
numericUpDown1
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnStopTDown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
cmbStopList
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
groupBox6
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnCloseA
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnClearL
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnLogDebug
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOLOutStopDown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOLInStopDown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInLOutStopDown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInLInStopDown
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnInLineRun
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
btnOutL
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
groupBox4
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
32
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
1
76
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
434
,
5
51
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
434
,
5
07
);
this
.
groupBox2
.
TabIndex
=
276
;
this
.
groupBox2
.
TabStop
=
false
;
//
// label1
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
248
,
441
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
25
,
17
);
this
.
label1
.
TabIndex
=
286
;
this
.
label1
.
Text
=
"ms"
;
//
// numericUpDown1
//
this
.
numericUpDown1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
numericUpDown1
.
Increment
=
new
decimal
(
new
int
[]
{
50
,
0
,
0
,
0
});
this
.
numericUpDown1
.
Location
=
new
System
.
Drawing
.
Point
(
181
,
436
);
this
.
numericUpDown1
.
Maximum
=
new
decimal
(
new
int
[]
{
300000
,
0
,
0
,
0
});
this
.
numericUpDown1
.
Minimum
=
new
decimal
(
new
int
[]
{
100
,
0
,
0
,
0
});
this
.
numericUpDown1
.
Name
=
"numericUpDown1"
;
this
.
numericUpDown1
.
Size
=
new
System
.
Drawing
.
Size
(
61
,
26
);
this
.
numericUpDown1
.
TabIndex
=
285
;
this
.
numericUpDown1
.
Value
=
new
decimal
(
new
int
[]
{
600
,
0
,
0
,
0
});
//
// btnStopTDown
//
this
.
btnStopTDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnStopTDown
.
Location
=
new
System
.
Drawing
.
Point
(
279
,
430
);
this
.
btnStopTDown
.
Name
=
"btnStopTDown"
;
this
.
btnStopTDown
.
Size
=
new
System
.
Drawing
.
Size
(
127
,
39
);
this
.
btnStopTDown
.
TabIndex
=
284
;
this
.
btnStopTDown
.
Text
=
"阻挡定时下降"
;
this
.
btnStopTDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnStopTDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnStopTDown_Click
);
//
// cmbStopList
//
this
.
cmbStopList
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
cmbStopList
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
cmbStopList
.
FormattingEnabled
=
true
;
this
.
cmbStopList
.
Items
.
AddRange
(
new
object
[]
{
"进料线_入口阻挡"
,
"进料线_出口阻挡"
,
"出料线_入口阻挡"
});
this
.
cmbStopList
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
435
);
this
.
cmbStopList
.
Name
=
"cmbStopList"
;
this
.
cmbStopList
.
Size
=
new
System
.
Drawing
.
Size
(
153
,
28
);
this
.
cmbStopList
.
TabIndex
=
283
;
// groupBox6
//
this
.
groupBox6
.
Controls
.
Add
(
this
.
button2
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtDOIndex
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label14
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
btnWriteSingleDO
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtWriteTime
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
txtDoName
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
label17
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
cmbWriteIO
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
279
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
411
,
165
);
this
.
groupBox6
.
TabIndex
=
283
;
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"DO写入"
;
//
// button2
//
this
.
button2
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button2
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
button2
.
Location
=
new
System
.
Drawing
.
Point
(
272
,
105
);
this
.
button2
.
Name
=
"button2"
;
this
.
button2
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
34
);
this
.
button2
.
TabIndex
=
262
;
this
.
button2
.
Text
=
"关闭"
;
this
.
button2
.
UseVisualStyleBackColor
=
true
;
this
.
button2
.
Click
+=
new
System
.
EventHandler
(
this
.
button2_Click
);
//
// txtDOIndex
//
this
.
txtDOIndex
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtDOIndex
.
Location
=
new
System
.
Drawing
.
Point
(
288
,
56
);
this
.
txtDOIndex
.
MaxLength
=
10
;
this
.
txtDOIndex
.
Name
=
"txtDOIndex"
;
this
.
txtDOIndex
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
23
);
this
.
txtDOIndex
.
TabIndex
=
261
;
this
.
txtDOIndex
.
Text
=
"0"
;
//
// label14
//
this
.
label14
.
AutoSize
=
true
;
this
.
label14
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label14
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label14
.
Location
=
new
System
.
Drawing
.
Point
(
219
,
62
);
this
.
label14
.
Name
=
"label14"
;
this
.
label14
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
17
);
this
.
label14
.
TabIndex
=
260
;
this
.
label14
.
Text
=
"地址:"
;
this
.
label14
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnWriteSingleDO
//
this
.
btnWriteSingleDO
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnWriteSingleDO
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnWriteSingleDO
.
Location
=
new
System
.
Drawing
.
Point
(
164
,
105
);
this
.
btnWriteSingleDO
.
Name
=
"btnWriteSingleDO"
;
this
.
btnWriteSingleDO
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
34
);
this
.
btnWriteSingleDO
.
TabIndex
=
257
;
this
.
btnWriteSingleDO
.
Text
=
"打开"
;
this
.
btnWriteSingleDO
.
UseVisualStyleBackColor
=
true
;
this
.
btnWriteSingleDO
.
Click
+=
new
System
.
EventHandler
(
this
.
btnWriteSingleDO_Click
);
//
// txtWriteTime
//
this
.
txtWriteTime
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtWriteTime
.
Location
=
new
System
.
Drawing
.
Point
(
76
,
111
);
this
.
txtWriteTime
.
MaxLength
=
10
;
this
.
txtWriteTime
.
Name
=
"txtWriteTime"
;
this
.
txtWriteTime
.
Size
=
new
System
.
Drawing
.
Size
(
52
,
23
);
this
.
txtWriteTime
.
TabIndex
=
259
;
this
.
txtWriteTime
.
Text
=
"0"
;
//
// label5
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label5
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
114
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
60
,
17
);
this
.
label5
.
TabIndex
=
258
;
this
.
label5
.
Text
=
"定时(ms):"
;
this
.
label5
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtDoName
//
this
.
txtDoName
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtDoName
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
56
);
this
.
txtDoName
.
MaxLength
=
10
;
this
.
txtDoName
.
Name
=
"txtDoName"
;
this
.
txtDoName
.
Size
=
new
System
.
Drawing
.
Size
(
133
,
23
);
this
.
txtDoName
.
TabIndex
=
242
;
this
.
txtDoName
.
Text
=
"0"
;
//
// label17
//
this
.
label17
.
AutoSize
=
true
;
this
.
label17
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label17
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
label17
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
59
);
this
.
label17
.
Name
=
"label17"
;
this
.
label17
.
Size
=
new
System
.
Drawing
.
Size
(
46
,
17
);
this
.
label17
.
TabIndex
=
241
;
this
.
label17
.
Text
=
"设备IP:"
;
this
.
label17
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// cmbWriteIO
//
this
.
cmbWriteIO
.
FormattingEnabled
=
true
;
this
.
cmbWriteIO
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
22
);
this
.
cmbWriteIO
.
Name
=
"cmbWriteIO"
;
this
.
cmbWriteIO
.
Size
=
new
System
.
Drawing
.
Size
(
396
,
25
);
this
.
cmbWriteIO
.
TabIndex
=
0
;
this
.
cmbWriteIO
.
SelectedIndexChanged
+=
new
System
.
EventHandler
(
this
.
cmbWriteIO_SelectedIndexChanged
);
//
// btnCloseA
//
this
.
btnCloseA
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnCloseA
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnCloseA
.
Location
=
new
System
.
Drawing
.
Point
(
22
,
495
);
this
.
btnCloseA
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
450
);
this
.
btnCloseA
.
Name
=
"btnCloseA"
;
this
.
btnCloseA
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
39
);
this
.
btnCloseA
.
TabIndex
=
282
;
...
...
@@ -320,7 +360,7 @@
//
this
.
btnClearL
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnClearL
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClearL
.
Location
=
new
System
.
Drawing
.
Point
(
30
1
,
495
);
this
.
btnClearL
.
Location
=
new
System
.
Drawing
.
Point
(
30
9
,
450
);
this
.
btnClearL
.
Name
=
"btnClearL"
;
this
.
btnClearL
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
39
);
this
.
btnClearL
.
TabIndex
=
14
;
...
...
@@ -332,7 +372,7 @@
//
this
.
btnLogDebug
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
btnLogDebug
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnLogDebug
.
Location
=
new
System
.
Drawing
.
Point
(
1
96
,
495
);
this
.
btnLogDebug
.
Location
=
new
System
.
Drawing
.
Point
(
1
88
,
450
);
this
.
btnLogDebug
.
Name
=
"btnLogDebug"
;
this
.
btnLogDebug
.
Size
=
new
System
.
Drawing
.
Size
(
104
,
39
);
this
.
btnLogDebug
.
TabIndex
=
13
;
...
...
@@ -340,76 +380,10 @@
this
.
btnLogDebug
.
UseVisualStyleBackColor
=
true
;
this
.
btnLogDebug
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLogDebug_Click
);
//
// btnOLOutStopDown
//
this
.
btnOLOutStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOLOutStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
369
);
this
.
btnOLOutStopDown
.
Name
=
"btnOLOutStopDown"
;
this
.
btnOLOutStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnOLOutStopDown
.
TabIndex
=
281
;
this
.
btnOLOutStopDown
.
Text
=
"出料线出口阻挡下降"
;
this
.
btnOLOutStopDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnOLOutStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOLOutStopDown_Click
);
//
// btnOLInStopDown
//
this
.
btnOLInStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOLInStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
324
);
this
.
btnOLInStopDown
.
Name
=
"btnOLInStopDown"
;
this
.
btnOLInStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnOLInStopDown
.
TabIndex
=
280
;
this
.
btnOLInStopDown
.
Text
=
"出料线入口阻挡下降"
;
this
.
btnOLInStopDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnOLInStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOLInStopDown_Click
);
//
// btnInLOutStopDown
//
this
.
btnInLOutStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInLOutStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
369
);
this
.
btnInLOutStopDown
.
Name
=
"btnInLOutStopDown"
;
this
.
btnInLOutStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnInLOutStopDown
.
TabIndex
=
279
;
this
.
btnInLOutStopDown
.
Text
=
"进料线出口阻挡下降"
;
this
.
btnInLOutStopDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnInLOutStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInLOutStopDown_Click
);
//
// btnInLInStopDown
//
this
.
btnInLInStopDown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInLInStopDown
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
324
);
this
.
btnInLInStopDown
.
Name
=
"btnInLInStopDown"
;
this
.
btnInLInStopDown
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnInLInStopDown
.
TabIndex
=
278
;
this
.
btnInLInStopDown
.
Text
=
"进料线入口阻挡下降"
;
this
.
btnInLInStopDown
.
UseVisualStyleBackColor
=
true
;
this
.
btnInLInStopDown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInLInStopDown_Click
);
//
// btnInLineRun
//
this
.
btnInLineRun
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInLineRun
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
279
);
this
.
btnInLineRun
.
Name
=
"btnInLineRun"
;
this
.
btnInLineRun
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnInLineRun
.
TabIndex
=
276
;
this
.
btnInLineRun
.
Text
=
"进料线体运转"
;
this
.
btnInLineRun
.
UseVisualStyleBackColor
=
true
;
this
.
btnInLineRun
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInLineRun_Click
);
//
// btnOutL
//
this
.
btnOutL
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutL
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
279
);
this
.
btnOutL
.
Name
=
"btnOutL"
;
this
.
btnOutL
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnOutL
.
TabIndex
=
277
;
this
.
btnOutL
.
Text
=
"出料线体运转"
;
this
.
btnOutL
.
UseVisualStyleBackColor
=
true
;
this
.
btnOutL
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOutL_Click
);
//
// groupBox4
//
this
.
groupBox4
.
Controls
.
Add
(
this
.
tableLayoutPanel2
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
2
18
,
15
);
this
.
groupBox4
.
Location
=
new
System
.
Drawing
.
Point
(
2
20
,
22
);
this
.
groupBox4
.
Name
=
"groupBox4"
;
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
208
,
251
);
this
.
groupBox4
.
TabIndex
=
275
;
...
...
@@ -433,7 +407,7 @@
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
tableLayoutPanel1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
15
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
22
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
208
,
251
);
this
.
groupBox1
.
TabIndex
=
274
;
...
...
@@ -460,9 +434,9 @@
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
richTextBox1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
450
,
2
15
);
this
.
richTextBox1
.
Location
=
new
System
.
Drawing
.
Point
(
450
,
2
72
);
this
.
richTextBox1
.
Name
=
"richTextBox1"
;
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
728
,
4
68
);
this
.
richTextBox1
.
Size
=
new
System
.
Drawing
.
Size
(
728
,
4
11
);
this
.
richTextBox1
.
TabIndex
=
256
;
this
.
richTextBox1
.
Text
=
""
;
this
.
richTextBox1
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
richTextBox1_VisibleChanged
);
...
...
@@ -476,7 +450,7 @@
this
.
groupBox3
.
Controls
.
Add
(
this
.
lblThisSta
);
this
.
groupBox3
.
Location
=
new
System
.
Drawing
.
Point
(
10
,
6
);
this
.
groupBox3
.
Name
=
"groupBox3"
;
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
1168
,
1
24
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
1168
,
1
77
);
this
.
groupBox3
.
TabIndex
=
268
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"设备状态"
;
...
...
@@ -485,7 +459,7 @@
//
this
.
lblWarnMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblWarnMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblWarnMsg
.
Location
=
new
System
.
Drawing
.
Point
(
267
,
66
);
this
.
lblWarnMsg
.
Location
=
new
System
.
Drawing
.
Point
(
309
,
115
);
this
.
lblWarnMsg
.
Name
=
"lblWarnMsg"
;
this
.
lblWarnMsg
.
Size
=
new
System
.
Drawing
.
Size
(
856
,
52
);
this
.
lblWarnMsg
.
TabIndex
=
224
;
...
...
@@ -504,7 +478,7 @@
this
.
panel1
.
Controls
.
Add
(
this
.
chbAuto
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
15
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1160
,
48
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1160
,
97
);
this
.
panel1
.
TabIndex
=
273
;
//
// chbMoveStop
...
...
@@ -594,45 +568,12 @@
this
.
lblThisSta
.
AutoSize
=
true
;
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Green
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
83
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
9
,
148
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
65
,
19
);
this
.
lblThisSta
.
TabIndex
=
216
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
//
// btnTranverse
//
this
.
btnTranverse
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnTranverse
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
279
);
this
.
btnTranverse
.
Name
=
"btnTranverse"
;
this
.
btnTranverse
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnTranverse
.
TabIndex
=
287
;
this
.
btnTranverse
.
Text
=
"横移运转"
;
this
.
btnTranverse
.
UseVisualStyleBackColor
=
true
;
this
.
btnTranverse
.
Click
+=
new
System
.
EventHandler
(
this
.
btnTranverse_Click
);
//
// btnUpdown
//
this
.
btnUpdown
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnUpdown
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
324
);
this
.
btnUpdown
.
Name
=
"btnUpdown"
;
this
.
btnUpdown
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnUpdown
.
TabIndex
=
288
;
this
.
btnUpdown
.
Text
=
"横移机构上升"
;
this
.
btnUpdown
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpdown
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpdown_Click
);
//
// btnSwitch
//
this
.
btnSwitch
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSwitch
.
Location
=
new
System
.
Drawing
.
Point
(
287
,
369
);
this
.
btnSwitch
.
Name
=
"btnSwitch"
;
this
.
btnSwitch
.
Size
=
new
System
.
Drawing
.
Size
(
134
,
39
);
this
.
btnSwitch
.
TabIndex
=
289
;
this
.
btnSwitch
.
Text
=
"料串切换气缸前进"
;
this
.
btnSwitch
.
UseVisualStyleBackColor
=
true
;
this
.
btnSwitch
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSwitch_Click
);
//
// FrmVMIClient
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -655,8 +596,8 @@
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
groupBox2
.
ResumeLayout
(
false
);
this
.
groupBox
2
.
PerformLayout
(
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numericUpDown1
)).
EndIni
t
();
this
.
groupBox
6
.
ResumeLayout
(
false
);
this
.
groupBox6
.
PerformLayou
t
();
this
.
groupBox4
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox3
.
ResumeLayout
(
false
);
...
...
@@ -693,29 +634,26 @@
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator8
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
toolStripMenuItem1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox5
;
private
System
.
Windows
.
Forms
.
Button
btnOLOutStopDown
;
private
System
.
Windows
.
Forms
.
Button
btnOLInStopDown
;
private
System
.
Windows
.
Forms
.
Button
btnInLOutStopDown
;
private
System
.
Windows
.
Forms
.
Button
btnInLInStopDown
;
private
System
.
Windows
.
Forms
.
Button
btnInLineRun
;
private
System
.
Windows
.
Forms
.
Button
btnOutL
;
private
System
.
Windows
.
Forms
.
Button
btnCloseA
;
private
System
.
Windows
.
Forms
.
Button
btnNeedEntry
;
private
System
.
Windows
.
Forms
.
Button
btnNeedLeave
;
private
System
.
Windows
.
Forms
.
Button
btnDis
;
private
System
.
Windows
.
Forms
.
Button
btnInit
;
private
System
.
Windows
.
Forms
.
Label
lblInfo
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
NumericUpDown
numericUpDown1
;
private
System
.
Windows
.
Forms
.
Button
btnStopTDown
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbStopList
;
private
System
.
Windows
.
Forms
.
TextBox
txtname
;
private
System
.
Windows
.
Forms
.
TextBox
txtShelfId
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
CheckBox
chbMoveStop
;
private
System
.
Windows
.
Forms
.
Button
btnSwitch
;
private
System
.
Windows
.
Forms
.
Button
btnUpdown
;
private
System
.
Windows
.
Forms
.
Button
btnTranverse
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox6
;
private
System
.
Windows
.
Forms
.
Button
button2
;
private
System
.
Windows
.
Forms
.
TextBox
txtDOIndex
;
private
System
.
Windows
.
Forms
.
Label
label14
;
private
System
.
Windows
.
Forms
.
Button
btnWriteSingleDO
;
private
System
.
Windows
.
Forms
.
TextBox
txtWriteTime
;
private
System
.
Windows
.
Forms
.
Label
label5
;
private
System
.
Windows
.
Forms
.
TextBox
txtDoName
;
private
System
.
Windows
.
Forms
.
Label
label17
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbWriteIO
;
}
}
source/VMILineClient/FrmVMIClient.cs
查看文件 @
acb7d13
...
...
@@ -38,8 +38,11 @@ namespace OnlineStore.VMILineClient
private
void
FrmTest_Load
(
object
sender
,
EventArgs
e
)
{
LogUtil
.
logBox
=
this
.
richTextBox1
;
cmbStopList
.
SelectedIndex
=
0
;
this
.
vmiLine
=
LineManager
.
InitStore
();
LoadIOList
();
cmbWriteIO
.
DataSource
=
new
List
<
ConfigIO
>(
LineManager
.
Config
.
StoreDOList
.
Values
);
cmbWriteIO
.
ValueMember
=
"ProName"
;
cmbWriteIO
.
DisplayMember
=
"DisplayStr"
;
if
(
vmiLine
==
null
)
{
LogUtil
.
error
(
LOGGER
,
"加载设备失败"
);
...
...
@@ -47,10 +50,9 @@ namespace OnlineStore.VMILineClient
return
;
}
timer1
.
Enabled
=
true
;
groupBox5
.
Text
=
"AGV调度通信,
入料线体 ["
+
vmiLine
.
Config
.
L1_AgvName
+
"] ,出料线体 ["
+
vmiLine
.
Config
.
L2_AgvName
+
"]
"
;
chbDebug
.
Checked
=
vmiLine
.
IsDebug
;
groupBox5
.
Text
=
"AGV调度通信,
空入料线体 ["
+
vmiLine
.
Config
.
L1_AgvName
+
"] ,料串出料线体 ["
+
vmiLine
.
Config
.
L2_AgvName
+
"],包装出料线体["
+
vmiLine
.
Config
.
L3_AgvName
+
"]
"
;
DebugMode
(
vmiLine
.
IsDebug
)
;
this
.
ShowInTaskbar
=
true
;
LoadIOList
();
txtname
.
Text
=
vmiLine
.
Config
.
L1_AgvName
;
notifyIcon1
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
HideForm
();
...
...
@@ -298,8 +300,14 @@ namespace OnlineStore.VMILineClient
}
}
}
DebugMode
(
vmiLine
.
IsDebug
);
}
private
void
DebugMode
(
bool
isdebug
)
{
groupBox6
.
Enabled
=
isdebug
;
chbDebug
.
Checked
=
isdebug
;
groupBox5
.
Enabled
=
isdebug
;
}
private
void
richTextBox1_VisibleChanged
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -331,35 +339,6 @@ namespace OnlineStore.VMILineClient
btn
.
BackColor
=
Color
.
White
;
}
}
private
void
btnInLineRun_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnInLineRun
,
"进料线体运转"
,
"进料线体停止"
,
IO_Type
.
L1_Run
);
}
private
void
btnInLInStopDown_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnInLInStopDown
,
"进料线入口阻挡下降"
,
"进料线入口阻挡上升"
,
IO_Type
.
L1_StopDown
);
}
private
void
btnInLOutStopDown_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnInLOutStopDown
,
"进料线出口阻挡下降"
,
"进料线出口阻挡上升"
,
IO_Type
.
L1_OutStopDown
);
}
private
void
btnOLInStopDown_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnOLInStopDown
,
"出料线入口阻挡下降"
,
"出料线入口阻挡上升"
,
IO_Type
.
L2_StopDown
);
}
private
void
btnOutL_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnOutL
,
"出料线体运转"
,
"出料线体停止"
,
IO_Type
.
L2_Run
);
}
private
void
btnOLOutStopDown_Click
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnOLOutStopDown
,
"出料线出口阻挡下降"
,
"出料线出口阻挡上升"
,
IO_Type
.
L2_OutStopDown
);
}
private
void
btnCloseA_Click
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -393,95 +372,65 @@ namespace OnlineStore.VMILineClient
AgvClient
.
Dispose
();
}
private
void
btnStopTDown_Click
(
object
sender
,
EventArgs
e
)
{
int
value
=
(
int
)
numericUpDown1
.
Value
;
///进料线_入口阻挡
//进料线_出口阻挡
//出料线_入口阻挡
string
iotype
=
IO_Type
.
L1_StopDown
;
if
(
cmbStopList
.
SelectedIndex
.
Equals
(
1
))
{
iotype
=
IO_Type
.
L1_OutStopDown
;
}
else
if
(
cmbStopList
.
SelectedIndex
.
Equals
(
2
))
{
iotype
=
IO_Type
.
L2_StopDown
;
}
vmiLine
.
StopIOMove
(
iotype
,
value
);
}
private
void
chbMoveStop_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
vmiLine
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
vmiLine
.
Name
+
"用户切换是否暂停: "
+
vmiLine
.
MoveStop
);
}
private
void
btnTranverse_Click
(
object
sender
,
EventArgs
e
)
IOTextControl
selectControl
=
null
;
private
void
cmbWriteIO_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
BtnMove
(
btnTranverse
,
"横移运转"
,
"横移停止"
,
IO_Type
.
Traverse1_Run
);
//Button btn = (Button)sender;
//LogUtil.info(vmiLine.Name + "点击【" + btn.Text + "】 ");
//if (btn.Text.Equals("横移运转"))
//{
// IOManager.IOMove(IO_Type.Traverse1_Run, IO_VALUE.HIGH);
// IOManager.IOMove(IO_Type.Traverse2_Run, IO_VALUE.HIGH);
// btn.Text = "横移停止";
// btn.BackColor = Color.Aqua;
//}
//else
//{
// IOManager.IOMove(IO_Type.Traverse1_Run, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.Traverse2_Run, IO_VALUE.LOW);
// btn.Text = "横移运转";
// btn.BackColor = Color.White;
//}
}
private
void
btnUpdown_Click
(
object
sender
,
EventArgs
e
)
if
(
cmbWriteIO
.
SelectedIndex
>=
0
)
{
Button
btn
=
(
Button
)
sender
;
LogUtil
.
info
(
vmiLine
.
Name
+
"点击【"
+
btn
.
Text
+
"】 "
);
if
(
btn
.
Text
.
Equals
(
"横移机构上升"
))
ConfigIO
io
=
GetSelectDO
();
if
(
io
!=
null
)
{
IOManager
.
IOMove
(
IO_Type
.
Traverse_Down_SOL
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
IOMove
(
IO_Type
.
Traverse_Up_SOL
,
IO_VALUE
.
HIGH
);
btn
.
Text
=
"横移机构下降"
;
btn
.
BackColor
=
Color
.
Aqua
;
// txtIp.Text = io.DeviceName;
txtDOIndex
.
Text
=
io
.
GetIOAddr
().
ToString
();
txtDoName
.
Text
=
io
.
IO_IP
;
IOTextControl
newControl
=
DOControlList
[
io
.
ProName
];
if
(
selectControl
!=
null
)
{
selectControl
.
BackColor
=
Color
.
White
;
}
newControl
.
BackColor
=
Color
.
SkyBlue
;
selectControl
=
newControl
;
}
else
}
}
private
ConfigIO
GetSelectDO
()
{
IOManager
.
IOMove
(
IO_Type
.
Traverse_Up_SOL
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
IOMove
(
IO_Type
.
Traverse_Down_SOL
,
IO_VALUE
.
HIGH
);
btn
.
Text
=
"横移机构上升"
;
btn
.
BackColor
=
Color
.
White
;
string
text
=
cmbWriteIO
.
SelectedValue
.
ToString
(
);
if
(
LineManager
.
Config
.
StoreDOList
.
ContainsKey
(
text
))
{
ConfigIO
io
=
LineManager
.
Config
.
StoreDOList
[
text
]
;
return
io
;
}
return
null
;
}
private
void
btn
Switch
_Click
(
object
sender
,
EventArgs
e
)
private
void
btn
WriteSingleDO
_Click
(
object
sender
,
EventArgs
e
)
{
Button
btn
=
(
Button
)
sender
;
LogUtil
.
info
(
vmiLine
.
Name
+
"点击【"
+
btn
.
Text
+
"】 "
);
if
(
btn
.
Text
.
Equals
(
"料串切换气缸前进"
)
)
WriteDO
(
IO_VALUE
.
HIGH
)
;
}
private
void
WriteDO
(
IO_VALUE
value
)
{
IOManager
.
IOMove
(
IO_Type
.
Switch_Back
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
IOMove
(
IO_Type
.
Switch_Forward
,
IO_VALUE
.
HIGH
);
btn
.
Text
=
"料串切换气缸后退"
;
btn
.
BackColor
=
Color
.
Aqua
;
string
deviceName
=
txtDoName
.
Text
;
int
index
=
FormUtil
.
GetIntValue
(
txtDOIndex
);
int
time
=
FormUtil
.
GetIntValue
(
txtWriteTime
);
if
(
time
>
0
)
{
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
0
,
(
ushort
)
index
,
value
,
time
);
}
else
{
IOManager
.
IOMove
(
IO_Type
.
Switch_Forward
,
IO_VALUE
.
LOW
);
Thread
.
Sleep
(
500
);
IOManager
.
IOMove
(
IO_Type
.
Switch_Back
,
IO_VALUE
.
HIGH
);
btn
.
Text
=
"料串切换气缸前进"
;
btn
.
BackColor
=
Color
.
White
;
IOManager
.
instance
.
WriteSingleDO
(
deviceName
,
(
byte
)
0
,
(
ushort
)
index
,
value
);
}
}
private
void
button2_Click
(
object
sender
,
EventArgs
e
)
{
WriteDO
(
IO_VALUE
.
LOW
);
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论