Commit 1748e87e 张东亮

合并分支 '添加横移机构' 到 'master'

添加横移机构

查看合并请求 !1
2 个父辈 62fa69bf 0c638219
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
\ No newline at end of file \ No newline at end of file
此文件类型无法预览
此文件类型无法预览
...@@ -36,5 +36,7 @@ namespace OnlineStore.Common ...@@ -36,5 +36,7 @@ namespace OnlineStore.Common
public static string Agv_Log_Open = "Agv_Log_Open"; public static string Agv_Log_Open = "Agv_Log_Open";
public static string RfidServer_Port = "RfidServer_Port"; public static string RfidServer_Port = "RfidServer_Port";
public static string InLine_Name = "InLine_Name";
public static string OutLine_Name = "OutLine_Name";
} }
} }
...@@ -39,18 +39,15 @@ ...@@ -39,18 +39,15 @@
<Reference Include="Asa.IOModule.AIOBOX"> <Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath> <HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.RFID"> <Reference Include="Asa.RFID.HiStation">
<HintPath>..\..\dll\Asa.RFID.dll</HintPath> <HintPath>..\..\dll\Asa.RFID.HiStation.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.IReadAll">
<HintPath>..\..\dll\Asa.RFID.IReadAll.dll</HintPath>
</Reference> </Reference>
<Reference Include="AsaPL.AgvClient"> <Reference Include="AsaPL.AgvClient">
<HintPath>..\..\dll\AsaPL.AgvClient.dll</HintPath> <HintPath>..\..\dll\AsaPL.AgvClient.dll</HintPath>
</Reference> </Reference>
<Reference Include="CodeLibrary">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\CodeLibrary.dll</HintPath>
</Reference>
<Reference Include="halcondotnet">
<HintPath>..\..\..\RC32-SZBOSCH-ACSingleStore\dll\halcondotnet.dll</HintPath>
</Reference>
<Reference Include="HFReader9CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64"> <Reference Include="HFReader9CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\RFID\HFReader9CSharp.dll</HintPath> <HintPath>..\..\dll\RFID\HFReader9CSharp.dll</HintPath>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID, 类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.28#16,,,,,,, PRO,IO模块对应的DI数量,IO_DILength,10.85.197.121#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.103.28#16,,,,,,, PRO,模块对应的DO数量,IO_DOLength,10.85.197.121#16,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.28,,,,,,, PRO,IO模块IP,PRO_AOI_IP_1,10.85.197.121,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X741,DI-01,0, DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X21,DI-01,0,
DI,Feeder1线入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,Feeder1线入口检测,X742,DI-02,0, DI,进料线体入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,进料线体入口检测,X22,DI-02,0,
DI,Feeder1线阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,Feeder1线阻挡检测,X743,DI-03,0, DI,进料线体阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,进料线体阻挡检测,X23,DI-03,0,
DI,Feeder1线出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,Feeder1线出口检测,X744,DI-04,0, DI,进料线体出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,进料线体出口检测,X24,DI-04,0,
DI,Feeder2线入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,Feeder2线入口检测,X745,DI-05,0, DI,出料线体入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,出料线体入口检测,X25,DI-05,0,
DI,Feeder2线阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,Feeder2线阻挡检测,X746,DI-06,0, DI,出料线体阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,出料线体阻挡检测,X26,DI-06,0,
DI,Feeder2线出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,Feeder2线出口检测,X747,DI-07,0, DI,出料线体出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,出料线体出口检测,X27,DI-07,0,
DI,Feeder1线人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,Feeder1线人工取料信号,X748,DI-08,0, DI,进料线体人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,进料线体人工取料信号,X28,DI-08,0,
,,,9,PRO_AOI_IP_1,0,,X750,DO-02,0, DI,进料线体横移上升端,L1_Updown_Up_Sig,8,PRO_AOI_IP_1,0,进料线体横移上升端,X29,DI-09,0,
,,,10,PRO_AOI_IP_1,0,,X751,DO-03,0, DI,进料线体横移下降端,L1_Updown_Down_Sig,9,PRO_AOI_IP_1,0,进料线体横移下降端,X30,DI-10,0,
,,,11,PRO_AOI_IP_1,0,,X752,DO-04,0, DI,出料线体横移上升端,L2_Updown_Up_Sig,10,PRO_AOI_IP_1,0,出料线体横移上升端,X31,DI-11,0,
,,,12,PRO_AOI_IP_1,0,,X753,DO-05,0, DI,出料线体横移下降端,L2_Updown_Down_Sig,11,PRO_AOI_IP_1,0,出料线体横移下降端,X32,DI-12,0,
,,,13,PRO_AOI_IP_1,0,,X754,DO-06,0, DI,复位,Reset_BTN,12,PRO_AOI_IP_1,0,复位,X33,DI-13,0,
,,,14,PRO_AOI_IP_1,0,,X755,DO-07,0, ,,,13,PRO_AOI_IP_1,0,,X774,DI-14,0,
,,,15,PRO_AOI_IP_1,0,,X756,DO-08,0, ,,,14,PRO_AOI_IP_1,0,,X775,DI-15,0,
DO,Feeder1线驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,Feeder1线驱动电机运转,Y741,DI-01,0, ,,,15,PRO_AOI_IP_1,0,,X776,DI-16,0,
DO,Feeder2线驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,Feeder2线驱动电机运转,Y742,DI-02,0, DO,进料线体驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,进料线体驱动电机运转,Y21,DO-01,0,
DO,Feeder1线阻挡1下降,L1_StopDown,2,PRO_AOI_IP_1,0,Feeder1线阻挡1下降,Y743,DI-03,0, DO,出料线体驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,出料线体驱动电机运转,Y22,DO-02,0,
DO,Feeder1线出口阻挡下降,L1_OutStopDown,3,PRO_AOI_IP_1,0,Feeder1线出口阻挡下降,Y744,DI-04,0, DO,进料线体阻挡下降,L1_StopDown,2,PRO_AOI_IP_1,0,进料线体阻挡下降,Y23,DO-03,0,
DO,Feeder2线出口阻挡下降,L2_OutStopDown,4,PRO_AOI_IP_1,0,Feeder2线出口阻挡下降,Y745,DI-05,0, DO,进料线体出口缓冲器,L1_OutStopDown,3,PRO_AOI_IP_1,0,进料线体出口缓冲器,Y24,DO-04,0,
DO,Feeder2线阻挡1下降,L2_StopDown,5,PRO_AOI_IP_1,0,Feeder2线阻挡1下降,Y746,DI-06,0, DO,出料线体阻挡下降,L2_StopDown,4,PRO_AOI_IP_1,0,出料线体阻挡下降,Y25,DO-05,0,
,,,6,PRO_AOI_IP_1,0,,Y747,DI-07,0, DO,出料线体出口阻挡下降,L2_OutStopDown,5,PRO_AOI_IP_1,0,出料线体出口阻挡下降,Y26,DO-06,0,
,,,7,PRO_AOI_IP_1,0,,Y748,DI-08,0, DO,横移机构电机运转,Tranverse_Run,6,PRO_AOI_IP_1,0,横移机构电机运转,Y27,DO-09,0,
,,,8,PRO_AOI_IP_1,0,,Y749,DO-01,0, DO,横移机构上升SOL,Tranverse_Up_SOL,7,PRO_AOI_IP_1,0,横移机构上升SOL,Y28,DO-07,0,
,,,9,PRO_AOI_IP_1,0,,Y750,DO-02,0, DO,横移机构下降SOL,Tranverse_Down_SOL,8,PRO_AOI_IP_1,0,横移机构下降SOL,Y29,DO-08,0,
,,,10,PRO_AOI_IP_1,0,,Y751,DO-03,0, DO,线体运行状态灯,Run_Status_Light,9,PRO_AOI_IP_1,0,线体运行状态灯,Y30,DO-10,0,
,,,11,PRO_AOI_IP_1,0,,Y752,DO-04,0, ,,,10,PRO_AOI_IP_1,0,,Y31,DO-11,0,
,,,12,PRO_AOI_IP_1,0,,Y753,DO-05,0, ,,,11,PRO_AOI_IP_1,0,,Y32,DO-12,0,
,,,13,PRO_AOI_IP_1,0,,Y754,DO-06,0, ,,,12,PRO_AOI_IP_1,0,,Y33,DO-13,0,
,,,14,PRO_AOI_IP_1,0,,Y755,DO-07,0, ,,,13,PRO_AOI_IP_1,0,,Y34,DO-14,0,
,,,15,PRO_AOI_IP_1,0,,Y756,DO-08,0, ,,,14,PRO_AOI_IP_1,0,,Y35,DO-15,0,
,,,15,PRO_AOI_IP_1,0,,Y36,DO-16,0,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,, PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,Feeder1线AGV节点名称,L1_AgvName,D21,,,,,,, PRO,进料线体线AGV节点名称,L1_AgvName,C21,,,,,,,
PRO,Feeder2线AGV节点名称,L2_AgvName,D22,,,,,,, PRO,出料线体线AGV节点名称,L2_AgvName,C22,,,,,,,
PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,192.168.103.108,,,,,, , PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,10.85.197.2,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,60,,,,,,, PRO,休眠秒数(秒),SleepSeconds,30,,,,,,,
using Asa.RFID;
using OnlineStore.Common;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
private static ReadAll readAll =new ReadAll ("TheRFID");
private static bool IsOpen = false;
// private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>();
public static void Open(string[] iparray)
{
if (IsOpen)
{
return;
}
try
{
int port = ConfigAppSettings.GetIntValue(Setting_Init.RfidServer_Port);
if (port <= 0)
{
port = 13001;
}
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
LogUtil.info("RFID Server Open,port=" + port);
readAll.Start(port);
IsOpen = true;
}
catch (Exception ex)
{
LogUtil.error("Open 出错:" + ex.ToString());
}
}
private static string lastStr = "";
private static void ReadAll_Log(string ip, string log)
{
string str = "RFID : [" + ip + "] " + log;
if (lastStr.Equals(str))
{
return;
}
LogUtil.info(str);
lastStr = str;
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
{
string outValue = readAll.Read(ip);
if (isClear)
{
readAll.Clear(ip);
}
RFIDData data = new RFIDData(outValue);
return data;
}
}
catch (Exception ex)
{
LogUtil.error("ReadRFID[" + ip + "] [" + isClear + "] 出错:" + ex.ToString());
}
return new RFIDData();
}
public static void Close()
{
try
{
readAll.Stop();
}
catch (Exception ex)
{
LogUtil.error("关闭RFID出错:" + ex.ToString());
}
}
}
public class RFIDData
{
public string StrData = "";
public RFIDData(string data = "00")
{
if (String.IsNullOrEmpty(data))
{
data = "00";
}
this.StrData = data;
}
public string NumStr()
{
return StrData;
}
internal static bool IsRealRfid(string shelfRfid)
{
//判断料架号是否是真实的料架号
if (shelfRfid.StartsWith("C") || shelfRfid.StartsWith("D"))
{
int num = -1;
try
{
num = Convert.ToInt32(shelfRfid.Substring(1, shelfRfid.Length - 1));
}
catch (Exception ex)
{
}
if (num > 0)
{
return true;
}
}
return false;
}
}
}
...@@ -5,16 +5,23 @@ using System.Collections.Concurrent; ...@@ -5,16 +5,23 @@ using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class RFIDManager public class RFIDManager
{ {
private static ReadAll readAll =new ReadAll ("TheRFID"); private static Asa.RFID.ReadAll read;
private static bool IsOpen = false; private static bool IsOpen = false;
// private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>(); public static bool IsAuto = false;
public static void Open(string[] iparray) /// <summary>
/// 是否连接
/// </summary>
public static bool IsConnected { get; set; } = false;
private static Dictionary<string, string> LastRfidMap = new Dictionary<string, string>();
public static void Open(string[] ip)
{ {
if (IsOpen) if (IsOpen)
{ {
...@@ -22,15 +29,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -22,15 +29,9 @@ namespace OnlineStore.DeviceLibrary
} }
try try
{ {
int port = ConfigAppSettings.GetIntValue(Setting_Init.RfidServer_Port); read = new ReadAll("TheRFID");
if (port <= 0) read.Received += Read_Received;
{ read.Start(13001);
port = 13001;
}
// readAll.Received += ReadAll_Received;
// readAll.Log += ReadAll_Log;
LogUtil.info("RFID Server Open,port=" + port);
readAll.Start(port);
IsOpen = true; IsOpen = true;
} }
catch (Exception ex) catch (Exception ex)
...@@ -39,7 +40,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,7 +40,27 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private static string lastStr = ""; private static string lastStr = "";
private static void Read_Received(string ip, string id)
{
try
{
if(LastRfidMap.ContainsKey(ip))
{
LastRfidMap[ip] = id;
}
else
{
LastRfidMap.Add(ip,id);
}
}
catch (ObjectDisposedException ex)
{
//程序刚退出,又回传数据
}
}
private static void ReadAll_Log(string ip, string log) private static void ReadAll_Log(string ip, string log)
{ {
string str = "RFID : [" + ip + "] " + log; string str = "RFID : [" + ip + "] " + log;
...@@ -51,20 +72,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -51,20 +72,21 @@ namespace OnlineStore.DeviceLibrary
lastStr = str; lastStr = str;
} }
public static RFIDData ReadRFID(string ip, bool isClear = false) public static RFIDData ReadRFID(string ip,bool isClear= true)
{ {
try try
{ {
if (String.IsNullOrEmpty(ip).Equals(false)) if (String.IsNullOrEmpty(ip).Equals(false) && read!=null)
{ {
string outValue = readAll.Read(ip);
if (isClear) if (isClear)
{ {
readAll.Clear(ip); read.Clear(ip);
} }
Thread.Sleep(100);
string outValue = read.Read(ip);
RFIDData data = new RFIDData(outValue); RFIDData data = new RFIDData(outValue);
return data; return data;
} }
} }
...@@ -80,7 +102,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
readAll.Stop(); read.Stop();
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
using AsaPL; using AsaPL;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
...@@ -11,14 +11,14 @@ using System.Threading; ...@@ -11,14 +11,14 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public partial class FeederLineBean public partial class FeederLineBean
{ {
public FeederLineConfig Config; public FeederLineConfig Config;
public bool IsDebug = false; public bool IsDebug = false;
public string Name = ""; public string Name = "";
public bool isInSuddenDown = false; public bool isInSuddenDown = false;
public LineMoveInfo MoveInfo = null; public LineMoveInfo MoveInfo = null;
public AlarmType alarmType = AlarmType.None; public AlarmType alarmType = AlarmType.None;
public RunStatus runStatus = RunStatus.Wait; public RunStatus runStatus = RunStatus.Wait;
public AgvClient agvClient; public AgvClient agvClient;
...@@ -36,13 +36,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -36,13 +36,13 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Interval = 300; mainTimer.Interval = 300;
mainTimer.AutoReset = true; mainTimer.AutoReset = true;
mainTimer.Enabled = false; mainTimer.Enabled = false;
mainTimer.Elapsed +=timersTimer_Elapsed; mainTimer.Elapsed += timersTimer_Elapsed;
//添加调试 //添加调试
IsDebug = ConfigAppSettings.GetIntValue(Setting_Init.IsInDebug).Equals(1); IsDebug = ConfigAppSettings.GetIntValue(Setting_Init.IsInDebug).Equals(1);
MoveInfo = new LineMoveInfo(); MoveInfo = new LineMoveInfo();
Name = ("Feeder线 ").ToUpper(); Name = ("Feeder线 ").ToUpper();
this.Config = config; this.Config = config;
IOManager.Init(); IOManager.Init();
IOManager.instance.ConnectionIOList(Config.DIODeviceNameList); IOManager.instance.ConnectionIOList(Config.DIODeviceNameList);
...@@ -52,7 +52,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -52,7 +52,7 @@ namespace OnlineStore.DeviceLibrary
{ {
mainTimer.Enabled = true; mainTimer.Enabled = true;
} }
agvClient = new AgvClient(); agvClient = new AgvClient();
agvClient.Init(); agvClient.Init();
//Thread.Sleep(300); //Thread.Sleep(300);
} }
...@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary
//} //}
//AgvClient.SetCancelState(false); //AgvClient.SetCancelState(false);
RFIDManager.Open(new string[] { Config.L2Out_RFIDIP});//, Config.L1In_RFIDIP RFIDManager.Open(new string[] { Config.L2Out_RFIDIP });//, Config.L1In_RFIDIP
runStatus = RunStatus.HomeMoving; runStatus = RunStatus.HomeMoving;
MoveInfo.NewMove(LineMoveType.ReturnHome); MoveInfo.NewMove(LineMoveType.ReturnHome);
ReturnHome(); ReturnHome();
...@@ -92,11 +92,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,11 +92,11 @@ namespace OnlineStore.DeviceLibrary
{ {
isInSuddenDown = false; isInSuddenDown = false;
alarmType = AlarmType.None; alarmType = AlarmType.None;
SetWarnMsg(""); SetWarnMsg("");
MoveInfo.NextMoveStep(MoveStep.Feeder_H_StopUp); MoveInfo.NextMoveStep(MoveStep.Feeder_H_StopUp);
LogUtil.info(Name + " 开始复位:所有阻挡上升,设置状态为None"); LogUtil.info(Name + " 开始复位:所有阻挡上升,设置状态为None");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
IOManager.IOMove(IO_Type.L1_StopDown, 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.L1_OutStopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.L2_StopDown, IO_VALUE.LOW); IOManager.IOMove(IO_Type.L2_StopDown, IO_VALUE.LOW);
...@@ -112,14 +112,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -112,14 +112,14 @@ namespace OnlineStore.DeviceLibrary
{ {
mainTimer.Enabled = false; mainTimer.Enabled = false;
serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
runStatus = RunStatus.Reset; runStatus = RunStatus.Reset;
MoveInfo.NewMove(LineMoveType.StoreReset); MoveInfo.NewMove(LineMoveType.StoreReset);
ReturnHome(); ReturnHome();
} }
else else
{ {
SetWarnMsg("复位失败:急停未开"); SetWarnMsg("复位失败:急停未开");
} }
} }
/// <summary> /// <summary>
/// 复位处理 /// 复位处理
...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -151,7 +151,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
default: break; default: break;
} }
} }
#endregion #endregion
...@@ -162,20 +162,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -162,20 +162,20 @@ namespace OnlineStore.DeviceLibrary
public void StopRun() public void StopRun()
{ {
WarnMsg = ""; WarnMsg = "";
RFIDManager.Close(); RFIDManager.Close();
agvClient.SetCancelState(true); agvClient.SetCancelState(true);
mainTimer.Enabled = false; mainTimer.Enabled = false;
serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
StopMove(); StopMove();
runStatus = RunStatus.Wait; runStatus = RunStatus.Wait;
IOManager.instance.CloseAllDO(); IOManager.instance.CloseAllDO();
LogUtil.info(Name + ",停止运行"); LogUtil.info(Name + ",停止运行");
} }
public void Alarm(AlarmType alarmType) public void Alarm(AlarmType alarmType)
{ {
if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop ) if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop)
{ {
return; return;
} }
...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,7 +188,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "收到急停信号,停止运行 "); LogUtil.error(Name + "收到急停信号,停止运行 ");
MoveInfo.EndMove(); MoveInfo.EndMove();
StopMove(); StopMove();
} }
} }
public void StopMove() public void StopMove()
...@@ -198,10 +198,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -198,10 +198,13 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.L1_StopDown, 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.L1_OutStopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.L2_StopDown, 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.L2_OutStopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Tranverse_Run, IO_VALUE.LOW);
} }
private bool InProcess = false; private bool InProcess = false;
private Stopwatch stopwatch = new Stopwatch(); private Stopwatch stopwatch = new Stopwatch();
public bool MoveStop = false; public bool MoveStop = false;
protected void timersTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) protected void timersTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
...@@ -216,9 +219,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -216,9 +219,9 @@ namespace OnlineStore.DeviceLibrary
} }
try try
{ {
InProcess = true; InProcess = true;
stopwatch.Restart(); stopwatch.Restart();
IoCheckProcess(); //IoCheckProcess();
if (runStatus >= RunStatus.HomeMoving) if (runStatus >= RunStatus.HomeMoving)
{ {
...@@ -234,10 +237,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,10 +237,10 @@ namespace OnlineStore.DeviceLibrary
} }
else if (runStatus.Equals(RunStatus.Runing)) else if (runStatus.Equals(RunStatus.Runing))
{ {
InLineTimerProcess(); //InLineTimerProcess();
OutLineTimerProcess(); OutLineTimerProcess();
TranverseTimerProcess();
IOTimeOutProcess(); IOTimeOutProcess();
SleepTimerProcess(); SleepTimerProcess();
...@@ -258,6 +261,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -258,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch ol_noshelfWatch = new Stopwatch(); private Stopwatch ol_noshelfWatch = new Stopwatch();
private Stopwatch ol_noshelfWatch1 = new Stopwatch(); private Stopwatch ol_noshelfWatch1 = new Stopwatch();
private Stopwatch rfidWatch = new Stopwatch();
private DateTime ol_lastSendShelfTime = DateTime.Now; private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500; private int StopDownMS = 1500;
/// <summary> /// <summary>
...@@ -265,11 +269,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -265,11 +269,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
private void OutLineTimerProcess() private void OutLineTimerProcess()
{ {
TimeSpan span = DateTime.Now - ol_lastSendShelfTime; TimeSpan span = DateTime.Now - ol_lastSendShelfTime;
// bool manualSig = IOManager.IOValue(IO_Type.L1_ManualRecSig).Equals(IO_VALUE.HIGH);
bool l1_down_sig = IOManager.IOValue(IO_Type.L1_Updown_Down_Sig).Equals(IO_VALUE.HIGH);
// bool l2_up_sig = IOManager.IOValue(IO_Type.L2_Updown_Up_Sig).Equals(IO_VALUE.HIGH);
//如果出口无料架,持续1000以上,放开阻挡放出一个料架 //如果出口无料架,持续1000以上,放开阻挡放出一个料架
//每次放料架时间间隔3秒 //每次放料架时间间隔3秒
if (IOManager.IOValue(IO_Type.L2_StopCheck).Equals(IO_VALUE.HIGH)&&IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 3) if (IOManager.IOValue(IO_Type.L2_StopCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 3)
{ {
//如果出料线体出口无料架,放一个料架到出口 //如果出料线体出口无料架,放一个料架到出口
if (LineManager.checkWatch(ol_noshelfWatch, 1000)) if (LineManager.checkWatch(ol_noshelfWatch, 1000))
...@@ -277,15 +284,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -277,15 +284,18 @@ namespace OnlineStore.DeviceLibrary
IOManager.CIOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW);
LogUtil.info(" Feeder2线体出口无料架,下降 [" + IO_Type.L2_StopDown + "] [" + StopDownMS + "] 秒"); LogUtil.info(" Feeder2线体出口无料架,下降 [" + IO_Type.L2_StopDown + "] [" + StopDownMS + "] 秒");
ol_lastSendShelfTime = DateTime.Now; ol_lastSendShelfTime = DateTime.Now;
agvClient.OutLine_RFID = "";
StopIOMove(IO_Type.L2_StopDown, StopDownMS); StopIOMove(IO_Type.L2_StopDown, StopDownMS);
} }
} }
else if (IOManager.IOValue(IO_Type.L1_StopCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 3) else if (IOManager.IOValue(IO_Type.L1_StopCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.LOW)
&& l1_down_sig && span.TotalSeconds > 3)
{ {
//如果出料线体出口无料架,放一个料架到出口 //如果Feeder1出口无料架,放一个料架到出口
if (LineManager.checkWatch(ol_noshelfWatch1, 1000)) if (LineManager.checkWatch(ol_noshelfWatch1, 5000))
{ {
IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW); StopIOMove(IO_Type.L1_OutStopDown, StopDownMS);
Thread.Sleep(1000);
LogUtil.info(" Feeder1线体出口无料架,下降 [" + IO_Type.L1_StopDown + "] [" + StopDownMS + "] 秒"); LogUtil.info(" Feeder1线体出口无料架,下降 [" + IO_Type.L1_StopDown + "] [" + StopDownMS + "] 秒");
ol_lastSendShelfTime = DateTime.Now; ol_lastSendShelfTime = DateTime.Now;
StopIOMove(IO_Type.L1_StopDown, StopDownMS); StopIOMove(IO_Type.L1_StopDown, StopDownMS);
...@@ -297,163 +307,188 @@ namespace OnlineStore.DeviceLibrary ...@@ -297,163 +307,188 @@ namespace OnlineStore.DeviceLibrary
ol_noshelfWatch1.Stop(); ol_noshelfWatch1.Stop();
IOManager.CIOMove(IO_Type.L2_StopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L2_StopDown, IO_VALUE.LOW);
IOManager.CIOMove(IO_Type.L1_StopDown, IO_VALUE.LOW); IOManager.CIOMove(IO_Type.L1_StopDown, IO_VALUE.LOW);
IOManager.CIOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW);
}
if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000))
{
agvClient.OutLine_NeedLeave(LastOutShelfId);
} }
//如果入口无料架即可进入
//if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW))
//{
// AgvClient.NeedEnter(Config.L1_AgvName, "");
//}else
//{
// AgvClient.SetToNone(Config.L1_AgvName, "");
//}
} }
private DateTime il_lastCallAgvTime = DateTime.Now.AddMinutes(-5); private Task TranverseTask;
private Stopwatch il_outstopCheckWarch = new Stopwatch(); private static void TranverseProcess()
//private Stopwatch il_manualCheckWatch = new Stopwatch(); {
/// <summary> LogUtil.info(" TranverseProcess Run");
/// 入料线体定时处理 if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L2_InCheck).Equals(IO_VALUE.LOW))
/// </summary> {
private void InLineTimerProcess() IOManager.CIOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.LOW);
Thread.Sleep(1000);
IOManager.IOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.HIGH);
Thread.Sleep(1000);
LogUtil.info(" 横移机构上升");
if (IOManager.IOValue(IO_Type.L1_Updown_Up_Sig).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L2_Updown_Up_Sig).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Tranverse_Run, IO_VALUE.HIGH);
//IOManager.IOMove(IO_Type.Roller_Run, IO_VALUE.HIGH);
LogUtil.info(" 滚筒电机、横移机构电机运行");
}
}
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
while (IOManager.IOValue(IO_Type.L2_InCheck).Equals(IO_VALUE.LOW))
{
IOManager.CIOMove(IO_Type.Tranverse_Run, IO_VALUE.HIGH);
if (stopwatch.Elapsed.TotalMinutes >= 2)
{
//stopwatch.Stop();
//IOManager.CIOMove(IO_Type.Tranverse_Run, IO_VALUE.LOW);
// IOManager.CIOMove(IO_Type.Roller_Run, IO_VALUE.LOW);
//IOManager.CIOMove(IO_Type.Traverse_Down_SOL, IO_VALUE.HIGH);
//Thread.Sleep(1000);
//IOManager.IOMove(IO_Type.Traverse_Up_SOL, IO_VALUE.LOW);
//Thread.Sleep(1000);
LogUtil.info(" 横移机构转移料架超时 [" + IO_Type.L1_StopDown + "] 大于2分钟");
//break;
}
}
stopwatch.Stop();
Thread.Sleep(5000);
IOManager.CIOMove(IO_Type.Tranverse_Run, IO_VALUE.LOW);
// IOManager.IOMove(IO_Type.Roller_Run, IO_VALUE.LOW);
LogUtil.info(" 横移电机停止");
IOManager.CIOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW);
Thread.Sleep(1000);
IOManager.CIOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.HIGH);
Thread.Sleep(1000);
LogUtil.info(" 横移机构下降");
LogUtil.info(" TranverseProcess Finish");
}
private Stopwatch ol_tranverseShelfWatch = new Stopwatch();
private void TranverseTimerProcess()
{ {
TimeSpan span = DateTime.Now - il_lastCallAgvTime; TimeSpan span = DateTime.Now - il_lastCallAgvTime;
//出口有料架,需要通知agv取走料架 //Feeder1出口有料架,Feeder2入口空
//每次叫小车时间间隔3分钟? //出口信号需要持续6秒钟
//出口信号需要持续1秒钟 if (IOManager.IOValue(IO_Type.L1_OutCheck).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.L2_InCheck).Equals(IO_VALUE.LOW) && span.TotalSeconds > 6)
//if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && span.TotalSeconds > 60) {
//{ if (LineManager.checkWatch(ol_tranverseShelfWatch, 2000))
// // if (LastOutShelfId.Equals("000").Equals(false)) {
// // { if (TranverseTask ==null)
// //if (LineManager.checkWatch(il_outstopCheckWarch, 1000)) {
// //{ TranverseTask = Task.Factory.StartNew(new Action(TranverseProcess));
// // il_lastCallAgvTime = DateTime.Now; il_lastCallAgvTime = DateTime.Now;
// // //StopIOMove(IO_Type.InL_OutStopDown, StopDownMS); }
else if (TranverseTask.IsCompleted)
// // LogUtil.info(" Feeder2线体出口有料架" + LastOutShelfId + ",呼叫agv小车[" + Config.L2_AgvName + "] [NeedLeave] "); {
// // AgvClient.NeedLeave(Config.L2_AgvName, LastOutShelfId); TranverseTask = Task.Factory.StartNew(new Action(TranverseProcess));
// //} il_lastCallAgvTime = DateTime.Now;
// //} }
//} }
//else if (span.TotalMilliseconds > StopDownMS)
//{
// il_outstopCheckWarch.Stop();
// ClientAction currA = AgvClient.GetAction(Config.L2_AgvName);
// if (currA.Equals(ClientAction.None) || currA.Equals(ClientAction.NeedLeave) || currA.Equals(ClientAction.NeedEnter))
// {
// if (IOManager.IOValue(IO_Type.L1_StopDown).Equals(IO_VALUE.HIGH))
// {
// IOManager.IOMove(IO_Type.L1_StopDown, IO_VALUE.LOW);
// }
// }
//}
//如果是出口无料架,NeedLeave状态,改为None
//if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW) && AgvClient.GetAction(Config.L2_AgvName).Equals(ClientAction.NeedLeave))
//{
// il_outstopCheckWarch.Stop();
// LogUtil.info(" Feeder2线体出口无料架 ,更改[" + Config.L2_AgvName + "] 状态[None] ");
// AgvClient.SetToNone(Config.L2_AgvName, "" );
//}
}
else
{
ol_tranverseShelfWatch.Stop();
}
} }
//private void LedProcess() private DateTime il_lastCallAgvTime = DateTime.Now.AddMinutes(-5);
//private void LedProcess()
//{
// try
// {
// if (runStatus >= RunStatus.HomeMoving)
// {
// if (alarmType.Equals(AlarmType.None).Equals(false) && IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW))
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.HIGH);
// }
// else if (IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW))
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
// }
// if (alarmType.Equals(AlarmType.None))
// {
// if (IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW))
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.HIGH);
// }
// else
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
// }
// }
// }
// }
// catch (Exception ex)
// {
// LogUtil.error(Name + "灯处理定时器出错:", ex);
// }
//}
//private IO_VALUE LastResetValue = IO_VALUE.LOW;
public void IoCheckProcess()
{
DateTime time = DateTime.Now;
//if (runStatus.Equals(RunStatus.Wait))
//{ //{
// try // //获取新的Io状态
// IO_VALUE autoSingle = IOManager.IOValue(IO_Type.Reset_BTN);
// if (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1))
// { // {
// if (runStatus >= RunStatus.HomeMoving) // if (autoSingle.Equals(IO_VALUE.HIGH) && LastResetValue.Equals(IO_VALUE.LOW))
// { // {
// if (alarmType.Equals(AlarmType.None).Equals(false) && IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW)) // //没有启动时收到复位按钮,相当于启动按钮
// { // LogUtil.info(Name + "没有启动时收到复位按钮,相当于启动按钮,开始调用启动方法!");
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.HIGH); // bool result = StartRun();
// } // if (result.Equals(false))
// else if (IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW))
// { // {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW); // LogUtil.error("Feeder流水线启动失败,继续等待下次启动!");
// } // mainTimer.Enabled = true;
// if (alarmType.Equals(AlarmType.None))
// {
// if (IOManager.IOValue(IO_Type.Alarm_HddLed).Equals(IO_VALUE.LOW))
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.HIGH);
// }
// else
// {
// IOManager.IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
// }
// } // }
// } // }
// LastResetValue = autoSingle;
// return;
// } // }
// catch (Exception ex) // LastResetValue = autoSingle;
// { //}
// LogUtil.error(Name + "灯处理定时器出错:", ex); //判断急停
// } //if (runStatus >= RunStatus.HomeMoving)
//{ //判断急停
// //if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
// //{
// // if (isInSuddenDown.Equals(false))
// // {
// // isInSuddenDown = true;
// // SetWarnMsg("收到急停信号,报警急停");
// // //报警时会关闭所有轴
// // Alarm(AlarmType.SuddenStop);
// // }
// //}
// //else if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Reset_BTN).Equals(IO_VALUE.HIGH))
// //{
// // //收到复位信号,若报警直接复位,若不报警且无操作,回到待机点
// // if (alarmType.Equals(AlarmType.None) && isInSuddenDown.Equals(false))
// // {
// // if (MoveInfo.MoveType.Equals(LineMoveType.None))
// // {
// // LogUtil.info("收到复位信号,当前无报警,暂不复位");
// // }
// // else
// // {
// // LogUtil.info("收到复位信号,当前无报警, 在" + MoveInfo.MoveType + "处理中,暂不复位");
// // }
// // }
// // else
// // {
// // //收到复位信号
// // LogUtil.info("收到复位信号,自动复位");
// // Reset();
// // }
// //}
//} //}
}
//private IO_VALUE LastResetValue = IO_VALUE.LOW;
public void IoCheckProcess()
{
DateTime time = DateTime.Now;
//if (runStatus.Equals(RunStatus.Wait))
//{
// //获取新的Io状态
// IO_VALUE autoSingle = IOManager.IOValue(IO_Type.Reset_BTN);
// if (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1))
// {
// if (autoSingle.Equals(IO_VALUE.HIGH) && LastResetValue.Equals(IO_VALUE.LOW))
// {
// //没有启动时收到复位按钮,相当于启动按钮
// LogUtil.info(Name + "没有启动时收到复位按钮,相当于启动按钮,开始调用启动方法!");
// bool result = StartRun();
// if (result.Equals(false))
// {
// LogUtil.error("Feeder流水线启动失败,继续等待下次启动!");
// mainTimer.Enabled = true;
// }
// }
// LastResetValue = autoSingle;
// return;
// }
// LastResetValue = autoSingle;
//}
//判断急停
if (runStatus >= RunStatus.HomeMoving)
{ //判断急停
if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
if (isInSuddenDown.Equals(false))
{
isInSuddenDown = true;
SetWarnMsg("收到急停信号,报警急停");
//报警时会关闭所有轴
Alarm(AlarmType.SuddenStop);
}
}
//else if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Reset_BTN).Equals(IO_VALUE.HIGH))
//{
// //收到复位信号,若报警直接复位,若不报警且无操作,回到待机点
// if (alarmType.Equals(AlarmType.None) && isInSuddenDown.Equals(false))
// {
// if (MoveInfo.MoveType.Equals(LineMoveType.None))
// {
// LogUtil.info("收到复位信号,当前无报警,暂不复位");
// }
// else
// {
// LogUtil.info("收到复位信号,当前无报警, 在" + MoveInfo.MoveType + "处理中,暂不复位");
// }
// }
// else
// {
// //收到复位信号
// LogUtil.info("收到复位信号,自动复位");
// Reset();
// }
//}
}
}
private DateTime preIoTimerOutTime = DateTime.Now; private DateTime preIoTimerOutTime = DateTime.Now;
/// <summary> /// <summary>
/// io检测异常 /// io检测异常
...@@ -469,7 +504,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -469,7 +504,7 @@ namespace OnlineStore.DeviceLibrary
if (runStatus < RunStatus.Runing || isInSuddenDown) if (runStatus < RunStatus.Runing || isInSuddenDown)
{ {
return; return;
} }
if (alarmType.Equals(AlarmType.IoSingleTimeOut) && MoveInfo.IsInWait == false) if (alarmType.Equals(AlarmType.IoSingleTimeOut) && MoveInfo.IsInWait == false)
{ {
LogUtil.info(Name + "之前有IO超时报警,清理报警:" + WarnMsg); LogUtil.info(Name + "之前有IO超时报警,清理报警:" + WarnMsg);
...@@ -499,18 +534,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -499,18 +534,9 @@ namespace OnlineStore.DeviceLibrary
{ {
//LedProcess(); //LedProcess();
//LastInShelfId = RFIDManager.ReadRFID(Config.L1In_RFIDIP,true).NumStr(); //LastInShelfId = RFIDManager.ReadRFID(Config.L1In_RFIDIP,true).NumStr();
LastOutShelfId = RFIDManager.ReadRFID(Config.L2Out_RFIDIP,true).NumStr(); LastOutShelfId = RFIDManager.ReadRFID(Config.L2Out_RFIDIP, true).NumStr();
//bool result = SendDISTRfid(LastInShelfId);
//if (result)
//{
// IOManager.CIOMove(IO_Type.InL_InStopDown, IO_VALUE.HIGH);
//}
//else
//{
// IOManager.CIOMove(IO_Type.InL_InStopDown, IO_VALUE.LOW);
//}
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -535,7 +561,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -535,7 +561,7 @@ namespace OnlineStore.DeviceLibrary
return path; return path;
} }
private string http_server = ConfigAppSettings.GetValue(Setting_Init.http_server); private string http_server = ConfigAppSettings.GetValue(Setting_Init.http_server);
private string api_communication = "/service/store/qisda/feederRfid"; //Feeder线状态通信接口 private string api_communication = "/service/store/qisda/feederRfid"; //Feeder线状态通信接口
private string lastLog = ""; private string lastLog = "";
public bool SendFeederRfid(string rfid) public bool SendFeederRfid(string rfid)
...@@ -544,13 +570,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -544,13 +570,13 @@ namespace OnlineStore.DeviceLibrary
{ {
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid); paramMap.Add("rfid", rfid);
string addr = GetAddr(api_communication, paramMap ) ; string addr = GetAddr(api_communication, paramMap);
string resultStr = HttpHelper.Post(addr, ""); string resultStr = HttpHelper.Post(addr, "");
string log = "feederRfid 【" + addr + "】【" + resultStr + "】"; string log = "feederRfid 【" + addr + "】【" + resultStr + "】";
if (lastLog.Equals(log).Equals(false)) if (lastLog.Equals(log).Equals(false))
{ {
lastLog = log; lastLog = log;
LogUtil.info(log); LogUtil.info(log);
} }
if (resultStr.Equals("move")) if (resultStr.Equals("move"))
{ {
......
...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
//return "进料线出口" + Config.L2_AgvName + ":" + AgvClient.GetAction(Config.L2_AgvName) + ",料架: " + LastInShelfId + "\r\n" + //return "进料线出口" + Config.L2_AgvName + ":" + AgvClient.GetAction(Config.L2_AgvName) + ",料架: " + LastInShelfId + "\r\n" +
// "出料线进口" + Config.L1_AgvName + ":" + AgvClient.GetAction(Config.L1_AgvName) + ",料架: " + LastOutShelfId + "\r\n"; // "出料线进口" + Config.L1_AgvName + ":" + AgvClient.GetAction(Config.L1_AgvName) + ",料架: " + LastOutShelfId + "\r\n";
return "Feeder1线入料口" + Config.L1_AgvName + ":" +agvClient.Feeder_In_Msg+ "\r\n" + //"料架: " + LastInShelfId + AgvClient.GetAction(Config.L1_AgvName) return "Feeder1线入料口" + Config.L1_AgvName + ":" +agvClient.Feeder_In_Msg+ "\r\n" + //"料架: " + LastInShelfId + AgvClient.GetAction(Config.L1_AgvName)
"Feeder2线出料口" + Config.L2_AgvName + ":"+ agvClient.Feeder_Out_Msg + "\r\n";//+ "料架: " + LastOutShelfId + AgvClient.GetAction(Config.L2_AgvName) + "Feeder2线出料口" + Config.L2_AgvName + ":" + "料架: " + LastOutShelfId +" "+ agvClient.Feeder_Out_Msg + "\r\n";//+ "料架: " + LastOutShelfId + AgvClient.GetAction(Config.L2_AgvName) +
} }
#endregion #endregion
...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary
needCheckList.Add(IO_Type.L2_StopDown); needCheckList.Add(IO_Type.L2_StopDown);
} }
bool agvBusy = false; bool agvBusy = false;
if (agvClient.D21_InProcess || agvClient.D22_InProcess) if (agvClient.InLine_InProcess || agvClient.OutLine_InProcess)
agvBusy = true; agvBusy = true;
if (agvBusy && IsSleep) if (agvBusy && IsSleep)
{ {
......
...@@ -18,42 +18,49 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,42 +18,49 @@ namespace OnlineStore.DeviceLibrary
private AsaPL.AgvClient agvClient; private AsaPL.AgvClient agvClient;
private static bool isInit = false; private static bool isInit = false;
public static Dictionary<string, AsaPL.ClientAction> actionMap = new Dictionary<string, AsaPL.ClientAction>(); public static Dictionary<string, AsaPL.ClientAction> actionMap = new Dictionary<string, AsaPL.ClientAction>();
public bool D21_InProcess = false; public bool InLine_InProcess = false;
public bool D22_InProcess = false; public bool OutLine_InProcess = false;
public string D22_RFID { get; set; } = ""; private static string InLine_Name = ConfigAppSettings.GetValue(Setting_Init.InLine_Name);
#region D21 Action private static string OutLine_Name = ConfigAppSettings.GetValue(Setting_Init.OutLine_Name);
public string OutLine_RFID { get; set; } = "";
#region InLine Action
/// <summary> /// <summary>
/// 无状态 /// 无状态
/// </summary> /// </summary>
public void D21_None() public void InLine_None()
{ {
SetStatus("D21", "", ClientAction.None); SetStatus(InLine_Name, "", ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以进入状态 /// 可以进入状态
/// </summary> /// </summary>
public void D21_NeedEnter() public void InLine_NeedEnter()
{ {
SetStatus("D21", "", ClientAction.NeedEnter); SetStatus(InLine_Name, "", ClientAction.NeedEnter);
} }
#endregion #endregion
#region D22 Action #region OutLine Action
/// <summary> /// <summary>
/// 无状态 /// 无状态
/// </summary> /// </summary>
public void D22_None() public void OutLine_None(string rfid="")
{ {
SetStatus("D22", "", ClientAction.None); SetStatus(OutLine_Name, rfid, ClientAction.None);
} }
/// <summary> /// <summary>
/// 可以出去状态 /// 可以出去状态
/// </summary> /// </summary>
public void D22_NeedLeave() public void OutLine_NeedLeave(string rfid)
{ {
SetStatus("D22", D22_RFID, ClientAction.NeedLeave); if (!OutLine_RFID.Equals(rfid))
{
OutLine_RFID = rfid;
SetStatus(OutLine_Name, rfid, ClientAction.NeedLeave);
}
} }
#endregion #endregion
...@@ -72,8 +79,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -72,8 +79,8 @@ namespace OnlineStore.DeviceLibrary
agvClient.AGVFinishLeave += AgvClient_FinishLeave; agvClient.AGVFinishLeave += AgvClient_FinishLeave;
} }
actionMap = new Dictionary<string, AsaPL.ClientAction>(); actionMap = new Dictionary<string, AsaPL.ClientAction>();
agvClient.SetStatus("D21", "", ClientAction.None); agvClient.SetStatus(InLine_Name, "", ClientAction.None);
agvClient.SetStatus("D22", "", ClientAction.None); agvClient.SetStatus(OutLine_Name, "", ClientAction.None);
agvClient.Connect(); agvClient.Connect();
LogUtil.info("初始化AGV服务"); LogUtil.info("初始化AGV服务");
} }
...@@ -100,9 +107,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,9 +107,9 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name">节点名称</param> /// <param name="name">节点名称</param>
private void AgvClient_ReadyEnter(string name) private void AgvClient_ReadyEnter(string name)
{ {
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && !D21_InProcess && name.Equals("D21")) if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.LOW) && !InLine_InProcess && name.Equals(InLine_Name))
{ {
MayEnter("D21"); MayEnter(InLine_Name);
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
Feeder_In_Msg = "Feeder In: 等待 L1_InCheck=HIGH"; Feeder_In_Msg = "Feeder In: 等待 L1_InCheck=HIGH";
...@@ -123,10 +130,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -123,10 +130,10 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(5000); Thread.Sleep(5000);
Feeder_In_Msg = "Feeder In: 调用 FinishEnter "; Feeder_In_Msg = "Feeder In: 调用 FinishEnter ";
LogUtil.info(Feeder_In_Msg); LogUtil.info(Feeder_In_Msg);
FinishEnter("D21"); FinishEnter(InLine_Name);
Feeder_In_Msg = "Feeder In: 处理结束 更新状态为None "; Feeder_In_Msg = "Feeder In: 处理结束 更新状态为None ";
LogUtil.info(Feeder_In_Msg); LogUtil.info(Feeder_In_Msg);
D21_None(); InLine_None();
}); });
} }
...@@ -136,7 +143,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH))
Feeder_In_Msg = "Feeder In: L1_InCheck 检测到有料架,AGV的料架无法进入"; Feeder_In_Msg = "Feeder In: L1_InCheck 检测到有料架,AGV的料架无法进入";
LogUtil.info(Feeder_In_Msg); LogUtil.info(Feeder_In_Msg);
D21_None(); InLine_None();
} }
LogUtil.info("收到 AgvClient_ReadyEnter [" + name + "]"); LogUtil.info("收到 AgvClient_ReadyEnter [" + name + "]");
} }
...@@ -154,10 +161,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -154,10 +161,9 @@ namespace OnlineStore.DeviceLibrary
// D22_InProcess = true; // D22_InProcess = true;
// D22_ReadyLeave = true; // D22_ReadyLeave = true;
//} //}
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && !D22_InProcess && name.Equals("D22")) if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && !OutLine_InProcess && name.Equals(OutLine_Name))
{ {
MayLeave(OutLine_Name, OutLine_RFID);
MayLeave("D22");
//LineManager.feederLine.UpdateSleep(false); //LineManager.feederLine.UpdateSleep(false);
LineManager.feederLine.StopIOMove(IO_Type.L2_OutStopDown, 1500); LineManager.feederLine.StopIOMove(IO_Type.L2_OutStopDown, 1500);
//agvClient.MayLeave(id); //agvClient.MayLeave(id);
...@@ -171,12 +177,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -171,12 +177,12 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(10000); Thread.Sleep(10000);
Feeder_Out_Msg = "Feeder Out: 调用 FinishLeave "; Feeder_Out_Msg = "Feeder Out: 调用 FinishLeave ";
LogUtil.info(Feeder_Out_Msg); LogUtil.info(Feeder_Out_Msg);
FinishLeave("D22"); FinishLeave(OutLine_Name, OutLine_RFID);
Thread.Sleep(5000); Thread.Sleep(5000);
Feeder_Out_Msg = "Feeder Out: 处理结束 更新状态为None "; Feeder_Out_Msg = "Feeder Out: 处理结束 更新状态为None ";
LogUtil.info(Feeder_Out_Msg); LogUtil.info(Feeder_Out_Msg);
D22_None(); OutLine_None();
}); });
} }
else else
...@@ -184,7 +190,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -184,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW))
Feeder_Out_Msg = "Feeder Out: L2_OutCheck 未检测到料架,无法将料架进入AGV"; Feeder_Out_Msg = "Feeder Out: L2_OutCheck 未检测到料架,无法将料架进入AGV";
LogUtil.info(Feeder_Out_Msg); LogUtil.info(Feeder_Out_Msg);
D22_None(); OutLine_None();
} }
LogUtil.info("收到 AgvClient_ReadyLeave [" + name + "] "); LogUtil.info("收到 AgvClient_ReadyLeave [" + name + "] ");
...@@ -197,13 +203,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -197,13 +203,13 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name"></param> /// <param name="name"></param>
private void AgvClient_FinishLeave(string name) private void AgvClient_FinishLeave(string name)
{ {
if (name.Equals("D21")) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals("D22")) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
LogUtil.info("收到 AgvClient_FinishLeave [" + name + "] "); LogUtil.info("收到 AgvClient_FinishLeave [" + name + "] ");
} }
...@@ -227,19 +233,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -227,19 +233,21 @@ namespace OnlineStore.DeviceLibrary
public void MayEnter(string name) public void MayEnter(string name)
{ {
SetStatus(name, "", ClientAction.MayEnter); SetStatus(name, "", ClientAction.MayEnter);
if (name.Equals("D21")) if (name.Equals(InLine_Name))
{ {
D21_InProcess = true; InLine_InProcess = true;
} }
LogUtil.info("MayEnter [" + name + "] ");
} }
public void MayLeave(string name) public void MayLeave(string name, string rfid)
{ {
SetStatus(name, "", ClientAction.MayLeave); SetStatus(name, rfid, ClientAction.MayLeave);
if (name.Equals("D22")) if (name.Equals(OutLine_Name))
{ {
D22_InProcess = true; OutLine_InProcess = true;
} }
LogUtil.info("MayLeave [" + name + "] ");
} }
/// <summary> /// <summary>
...@@ -253,13 +261,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -253,13 +261,13 @@ namespace OnlineStore.DeviceLibrary
SetStatus(name, "", ClientAction.FinishEnter); SetStatus(name, "", ClientAction.FinishEnter);
Thread.Sleep(15000); Thread.Sleep(15000);
if (name.Equals("D21")) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals("D22")) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
}); });
...@@ -268,19 +276,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -268,19 +276,19 @@ namespace OnlineStore.DeviceLibrary
/// 料架离开产线完成 /// 料架离开产线完成
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public void FinishLeave(string name) public void FinishLeave(string name, string rfid = "")
{ {
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
SetStatus(name, "", ClientAction.FinishLeave); SetStatus(name, rfid, ClientAction.FinishLeave);
Thread.Sleep(15000); Thread.Sleep(15000);
if (name.Equals("D21")) if (name.Equals(InLine_Name))
{ {
D21_InProcess = false; InLine_InProcess = false;
} }
else if (name.Equals("D22")) else if (name.Equals(OutLine_Name))
{ {
D22_InProcess = false; OutLine_InProcess = false;
} }
}); });
...@@ -304,12 +312,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -304,12 +312,12 @@ namespace OnlineStore.DeviceLibrary
} }
// actionMap[name] = action; // actionMap[name] = action;
// agvClient.SetStatus(name, shelfId, action, level); // agvClient.SetStatus(name, shelfId, action, level);
//LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString()); LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
return true; return true;
} }
agvClient.SetStatus(name, shelfId, action, level); agvClient.SetStatus(name, shelfId, action, level);
//actionMap.Add(name, action); //actionMap.Add(name, action);
//LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString()); LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
return true; return true;
} }
......
...@@ -4,16 +4,14 @@ ...@@ -4,16 +4,14 @@
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections> </configSections>
<appSettings> <appSettings>
<!--Feeder流水线名称-->
<add key="InLine_Name" value="C21" />
<add key="OutLine_Name" value="C22" />
<!--是否开机自动启动Feeder流水线--> <!--是否开机自动启动Feeder流水线-->
<add key="App_AutoRun" value="1" /> <add key="App_AutoRun" value="1" />
<add key="App_Title" value="Feeder线" /> <add key="App_Title" value="Feeder线" />
<!--Server address--> <!--Server address-->
<add key="http.server" value="http://10.85.160.25/myproject/" /> <add key="http.server" value="http://10.85.160.25/myproject/" />
<!--storeType-->
<add key="store_count" value="1" />
<!--start one store config-->
<add key="Line_Config" value="\LineConfig\FeederLineConfig.csv" />
<add key="Config_Pwd" value="123456" />
<!--IO配置--> <!--IO配置-->
<add key="UseAIOBOX" value="1" /> <add key="UseAIOBOX" value="1" />
<add key="DIMS" value="60" /> <add key="DIMS" value="60" />
...@@ -24,24 +22,33 @@ ...@@ -24,24 +22,33 @@
<add key="IsInDebug" value="1" /> <add key="IsInDebug" value="1" />
<add key="Agv_Log_Open" value="1" /> <add key="Agv_Log_Open" value="1" />
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="Line_Config" value="\LineConfig\FeederLineConfig.csv" />
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString" value="logs/vmiLine.log" /> <file type="log4net.Util.PatternString" value="logs/FeederLine.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <param name="MaxSizeRollBackups" value="30"/>
<datePattern value="yyyy-MM-dd" /> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="100MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
</appender> </appender>
<appender name="TheRFID" type="log4net.Appender.RollingFileAppender"> <appender name="TheRFID" type="log4net.Appender.RollingFileAppender">
<file value="logs/TheRFID-vmi.log" /> <file value="logs/TheRFID-FeederLine.log" />
<param name="Encoding" value="UTF-8" /> <param name="Encoding" value="UTF-8" />
<appendToFile value="true" /> <appendToFile value="true" />
<rollingStyle value="Date" /> <param name="MaxSizeRollBackups" value="30"/>
<datePattern value="yyyy-MM-dd" /> <!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="50MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" /> <conversionPattern value="[%date][%t]%-5p %m%n" />
</layout> </layout>
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.btnTranverseRun = new System.Windows.Forms.Button();
this.btnTranverse = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.btnStopTDown = new System.Windows.Forms.Button(); this.btnStopTDown = new System.Windows.Forms.Button();
...@@ -83,25 +85,25 @@ ...@@ -83,25 +85,25 @@
this.toolStripSeparator8, this.toolStripSeparator8,
this.toolStripMenuItem1}); this.toolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(125, 74); this.contextMenuStrip1.Size = new System.Drawing.Size(113, 62);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening); this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
// //
// 显示ToolStripMenuItem // 显示ToolStripMenuItem
// //
this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem"; this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(124, 32); this.显示ToolStripMenuItem.Size = new System.Drawing.Size(112, 26);
this.显示ToolStripMenuItem.Text = "显示"; this.显示ToolStripMenuItem.Text = "显示";
this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click); this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
// //
// toolStripSeparator8 // toolStripSeparator8
// //
this.toolStripSeparator8.Name = "toolStripSeparator8"; this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(121, 6); this.toolStripSeparator8.Size = new System.Drawing.Size(109, 6);
// //
// toolStripMenuItem1 // toolStripMenuItem1
// //
this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(124, 32); this.toolStripMenuItem1.Size = new System.Drawing.Size(112, 26);
this.toolStripMenuItem1.Text = "退出"; this.toolStripMenuItem1.Text = "退出";
this.toolStripMenuItem1.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click); this.toolStripMenuItem1.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
// //
...@@ -109,6 +111,8 @@ ...@@ -109,6 +111,8 @@
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.btnTranverseRun);
this.groupBox2.Controls.Add(this.btnTranverse);
this.groupBox2.Controls.Add(this.label1); this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.numericUpDown1); this.groupBox2.Controls.Add(this.numericUpDown1);
this.groupBox2.Controls.Add(this.btnStopTDown); this.groupBox2.Controls.Add(this.btnStopTDown);
...@@ -124,21 +128,40 @@ ...@@ -124,21 +128,40 @@
this.groupBox2.Controls.Add(this.btnOutL); this.groupBox2.Controls.Add(this.btnOutL);
this.groupBox2.Controls.Add(this.groupBox4); this.groupBox2.Controls.Add(this.groupBox4);
this.groupBox2.Controls.Add(this.groupBox1); this.groupBox2.Controls.Add(this.groupBox1);
this.groupBox2.Location = new System.Drawing.Point(12, 165); this.groupBox2.Location = new System.Drawing.Point(10, 132);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4); this.groupBox2.Size = new System.Drawing.Size(434, 551);
this.groupBox2.Size = new System.Drawing.Size(542, 689);
this.groupBox2.TabIndex = 276; this.groupBox2.TabIndex = 276;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
// //
// btnTranverseRun
//
this.btnTranverseRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTranverseRun.Location = new System.Drawing.Point(314, 323);
this.btnTranverseRun.Name = "btnTranverseRun";
this.btnTranverseRun.Size = new System.Drawing.Size(106, 39);
this.btnTranverseRun.TabIndex = 288;
this.btnTranverseRun.Text = "横移电机运转";
this.btnTranverseRun.UseVisualStyleBackColor = true;
this.btnTranverseRun.Click += new System.EventHandler(this.btnTranverseRun_Click);
//
// btnTranverse
//
this.btnTranverse.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTranverse.Location = new System.Drawing.Point(314, 278);
this.btnTranverse.Name = "btnTranverse";
this.btnTranverse.Size = new System.Drawing.Size(106, 39);
this.btnTranverse.TabIndex = 287;
this.btnTranverse.Text = "横移机构上升";
this.btnTranverse.UseVisualStyleBackColor = true;
this.btnTranverse.Click += new System.EventHandler(this.btnTranverse_Click);
//
// label1 // label1
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(310, 551); this.label1.Location = new System.Drawing.Point(248, 441);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(30, 20); this.label1.Size = new System.Drawing.Size(25, 17);
this.label1.TabIndex = 286; this.label1.TabIndex = 286;
this.label1.Text = "ms"; this.label1.Text = "ms";
// //
...@@ -150,8 +173,7 @@ ...@@ -150,8 +173,7 @@
0, 0,
0, 0,
0}); 0});
this.numericUpDown1.Location = new System.Drawing.Point(226, 545); this.numericUpDown1.Location = new System.Drawing.Point(181, 436);
this.numericUpDown1.Margin = new System.Windows.Forms.Padding(4);
this.numericUpDown1.Maximum = new decimal(new int[] { this.numericUpDown1.Maximum = new decimal(new int[] {
300000, 300000,
0, 0,
...@@ -163,7 +185,7 @@ ...@@ -163,7 +185,7 @@
0, 0,
0}); 0});
this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(76, 31); this.numericUpDown1.Size = new System.Drawing.Size(61, 26);
this.numericUpDown1.TabIndex = 285; this.numericUpDown1.TabIndex = 285;
this.numericUpDown1.Value = new decimal(new int[] { this.numericUpDown1.Value = new decimal(new int[] {
600, 600,
...@@ -174,10 +196,9 @@ ...@@ -174,10 +196,9 @@
// btnStopTDown // btnStopTDown
// //
this.btnStopTDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnStopTDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStopTDown.Location = new System.Drawing.Point(349, 538); this.btnStopTDown.Location = new System.Drawing.Point(279, 430);
this.btnStopTDown.Margin = new System.Windows.Forms.Padding(4);
this.btnStopTDown.Name = "btnStopTDown"; this.btnStopTDown.Name = "btnStopTDown";
this.btnStopTDown.Size = new System.Drawing.Size(159, 49); this.btnStopTDown.Size = new System.Drawing.Size(127, 39);
this.btnStopTDown.TabIndex = 284; this.btnStopTDown.TabIndex = 284;
this.btnStopTDown.Text = "阻挡定时下降"; this.btnStopTDown.Text = "阻挡定时下降";
this.btnStopTDown.UseVisualStyleBackColor = true; this.btnStopTDown.UseVisualStyleBackColor = true;
...@@ -192,20 +213,18 @@ ...@@ -192,20 +213,18 @@
"Feeder1进料线_阻挡", "Feeder1进料线_阻挡",
"Feeder1进料线_出口阻挡", "Feeder1进料线_出口阻挡",
"Feeder2出料线_阻挡"}); "Feeder2出料线_阻挡"});
this.cmbStopList.Location = new System.Drawing.Point(28, 544); this.cmbStopList.Location = new System.Drawing.Point(22, 435);
this.cmbStopList.Margin = new System.Windows.Forms.Padding(4);
this.cmbStopList.Name = "cmbStopList"; this.cmbStopList.Name = "cmbStopList";
this.cmbStopList.Size = new System.Drawing.Size(190, 31); this.cmbStopList.Size = new System.Drawing.Size(153, 28);
this.cmbStopList.TabIndex = 283; this.cmbStopList.TabIndex = 283;
// //
// btnCloseA // btnCloseA
// //
this.btnCloseA.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseA.Location = new System.Drawing.Point(28, 619); this.btnCloseA.Location = new System.Drawing.Point(22, 495);
this.btnCloseA.Margin = new System.Windows.Forms.Padding(4);
this.btnCloseA.Name = "btnCloseA"; this.btnCloseA.Name = "btnCloseA";
this.btnCloseA.Size = new System.Drawing.Size(216, 49); this.btnCloseA.Size = new System.Drawing.Size(173, 39);
this.btnCloseA.TabIndex = 282; this.btnCloseA.TabIndex = 282;
this.btnCloseA.Text = "关闭所有DO"; this.btnCloseA.Text = "关闭所有DO";
this.btnCloseA.UseVisualStyleBackColor = true; this.btnCloseA.UseVisualStyleBackColor = true;
...@@ -215,10 +234,9 @@ ...@@ -215,10 +234,9 @@
// //
this.btnClearL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearL.Location = new System.Drawing.Point(376, 619); this.btnClearL.Location = new System.Drawing.Point(301, 495);
this.btnClearL.Margin = new System.Windows.Forms.Padding(4);
this.btnClearL.Name = "btnClearL"; this.btnClearL.Name = "btnClearL";
this.btnClearL.Size = new System.Drawing.Size(130, 49); this.btnClearL.Size = new System.Drawing.Size(104, 39);
this.btnClearL.TabIndex = 14; this.btnClearL.TabIndex = 14;
this.btnClearL.Text = "清理日志"; this.btnClearL.Text = "清理日志";
this.btnClearL.UseVisualStyleBackColor = true; this.btnClearL.UseVisualStyleBackColor = true;
...@@ -228,10 +246,9 @@ ...@@ -228,10 +246,9 @@
// //
this.btnLogDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLogDebug.Location = new System.Drawing.Point(245, 619); this.btnLogDebug.Location = new System.Drawing.Point(196, 495);
this.btnLogDebug.Margin = new System.Windows.Forms.Padding(4);
this.btnLogDebug.Name = "btnLogDebug"; this.btnLogDebug.Name = "btnLogDebug";
this.btnLogDebug.Size = new System.Drawing.Size(130, 49); this.btnLogDebug.Size = new System.Drawing.Size(104, 39);
this.btnLogDebug.TabIndex = 13; this.btnLogDebug.TabIndex = 13;
this.btnLogDebug.Text = "开启DEBUG"; this.btnLogDebug.Text = "开启DEBUG";
this.btnLogDebug.UseVisualStyleBackColor = true; this.btnLogDebug.UseVisualStyleBackColor = true;
...@@ -240,10 +257,9 @@ ...@@ -240,10 +257,9 @@
// btnOLOutStopDown // btnOLOutStopDown
// //
this.btnOLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOLOutStopDown.Location = new System.Drawing.Point(291, 460); this.btnOLOutStopDown.Location = new System.Drawing.Point(168, 368);
this.btnOLOutStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnOLOutStopDown.Name = "btnOLOutStopDown"; this.btnOLOutStopDown.Name = "btnOLOutStopDown";
this.btnOLOutStopDown.Size = new System.Drawing.Size(216, 49); this.btnOLOutStopDown.Size = new System.Drawing.Size(140, 39);
this.btnOLOutStopDown.TabIndex = 281; this.btnOLOutStopDown.TabIndex = 281;
this.btnOLOutStopDown.Text = "Feeder2线体出口阻挡下降"; this.btnOLOutStopDown.Text = "Feeder2线体出口阻挡下降";
this.btnOLOutStopDown.UseVisualStyleBackColor = true; this.btnOLOutStopDown.UseVisualStyleBackColor = true;
...@@ -252,10 +268,9 @@ ...@@ -252,10 +268,9 @@
// btnOLInStopDown // btnOLInStopDown
// //
this.btnOLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOLInStopDown.Location = new System.Drawing.Point(291, 404); this.btnOLInStopDown.Location = new System.Drawing.Point(168, 323);
this.btnOLInStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnOLInStopDown.Name = "btnOLInStopDown"; this.btnOLInStopDown.Name = "btnOLInStopDown";
this.btnOLInStopDown.Size = new System.Drawing.Size(216, 49); this.btnOLInStopDown.Size = new System.Drawing.Size(140, 39);
this.btnOLInStopDown.TabIndex = 280; this.btnOLInStopDown.TabIndex = 280;
this.btnOLInStopDown.Text = "Feeder2线体阻挡下降"; this.btnOLInStopDown.Text = "Feeder2线体阻挡下降";
this.btnOLInStopDown.UseVisualStyleBackColor = true; this.btnOLInStopDown.UseVisualStyleBackColor = true;
...@@ -264,22 +279,20 @@ ...@@ -264,22 +279,20 @@
// btnInLOutStopDown // btnInLOutStopDown
// //
this.btnInLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLOutStopDown.Location = new System.Drawing.Point(28, 460); this.btnInLOutStopDown.Location = new System.Drawing.Point(22, 368);
this.btnInLOutStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnInLOutStopDown.Name = "btnInLOutStopDown"; this.btnInLOutStopDown.Name = "btnInLOutStopDown";
this.btnInLOutStopDown.Size = new System.Drawing.Size(216, 49); this.btnInLOutStopDown.Size = new System.Drawing.Size(140, 39);
this.btnInLOutStopDown.TabIndex = 279; this.btnInLOutStopDown.TabIndex = 279;
this.btnInLOutStopDown.Text = "Feeder1线体出口阻挡下降"; this.btnInLOutStopDown.Text = "Feeder1出口缓冲打开";
this.btnInLOutStopDown.UseVisualStyleBackColor = true; this.btnInLOutStopDown.UseVisualStyleBackColor = true;
this.btnInLOutStopDown.Click += new System.EventHandler(this.btnInLOutStopDown_Click); this.btnInLOutStopDown.Click += new System.EventHandler(this.btnInLOutStopDown_Click);
// //
// btnInLInStopDown // btnInLInStopDown
// //
this.btnInLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLInStopDown.Location = new System.Drawing.Point(28, 404); this.btnInLInStopDown.Location = new System.Drawing.Point(22, 323);
this.btnInLInStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnInLInStopDown.Name = "btnInLInStopDown"; this.btnInLInStopDown.Name = "btnInLInStopDown";
this.btnInLInStopDown.Size = new System.Drawing.Size(216, 49); this.btnInLInStopDown.Size = new System.Drawing.Size(140, 39);
this.btnInLInStopDown.TabIndex = 278; this.btnInLInStopDown.TabIndex = 278;
this.btnInLInStopDown.Text = "Feeder1线体阻挡下降"; this.btnInLInStopDown.Text = "Feeder1线体阻挡下降";
this.btnInLInStopDown.UseVisualStyleBackColor = true; this.btnInLInStopDown.UseVisualStyleBackColor = true;
...@@ -288,10 +301,9 @@ ...@@ -288,10 +301,9 @@
// btnInLineRun // btnInLineRun
// //
this.btnInLineRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnInLineRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLineRun.Location = new System.Drawing.Point(28, 348); this.btnInLineRun.Location = new System.Drawing.Point(22, 278);
this.btnInLineRun.Margin = new System.Windows.Forms.Padding(4);
this.btnInLineRun.Name = "btnInLineRun"; this.btnInLineRun.Name = "btnInLineRun";
this.btnInLineRun.Size = new System.Drawing.Size(216, 49); this.btnInLineRun.Size = new System.Drawing.Size(140, 39);
this.btnInLineRun.TabIndex = 276; this.btnInLineRun.TabIndex = 276;
this.btnInLineRun.Text = "Feeder1线体运转"; this.btnInLineRun.Text = "Feeder1线体运转";
this.btnInLineRun.UseVisualStyleBackColor = true; this.btnInLineRun.UseVisualStyleBackColor = true;
...@@ -300,10 +312,9 @@ ...@@ -300,10 +312,9 @@
// btnOutL // btnOutL
// //
this.btnOutL.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOutL.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutL.Location = new System.Drawing.Point(291, 348); this.btnOutL.Location = new System.Drawing.Point(168, 278);
this.btnOutL.Margin = new System.Windows.Forms.Padding(4);
this.btnOutL.Name = "btnOutL"; this.btnOutL.Name = "btnOutL";
this.btnOutL.Size = new System.Drawing.Size(216, 49); this.btnOutL.Size = new System.Drawing.Size(140, 39);
this.btnOutL.TabIndex = 277; this.btnOutL.TabIndex = 277;
this.btnOutL.Text = "Feeder2线体运转"; this.btnOutL.Text = "Feeder2线体运转";
this.btnOutL.UseVisualStyleBackColor = true; this.btnOutL.UseVisualStyleBackColor = true;
...@@ -312,39 +323,33 @@ ...@@ -312,39 +323,33 @@
// groupBox4 // groupBox4
// //
this.groupBox4.Controls.Add(this.tableLayoutPanel2); this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(272, 19); this.groupBox4.Location = new System.Drawing.Point(218, 15);
this.groupBox4.Margin = new System.Windows.Forms.Padding(4);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(4); this.groupBox4.Size = new System.Drawing.Size(208, 251);
this.groupBox4.Size = new System.Drawing.Size(260, 314);
this.groupBox4.TabIndex = 275; this.groupBox4.TabIndex = 275;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表"; this.groupBox4.Text = "DO列表";
// //
// tableLayoutPanel2 // tableLayoutPanel2
// //
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel2.AutoScroll = true;
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.ColumnCount = 1; this.tableLayoutPanel2.ColumnCount = 1;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Location = new System.Drawing.Point(6, 18); this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 19);
this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(246, 289); this.tableLayoutPanel2.Size = new System.Drawing.Size(202, 229);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.tableLayoutPanel1); this.groupBox1.Controls.Add(this.tableLayoutPanel1);
this.groupBox1.Location = new System.Drawing.Point(8, 19); this.groupBox1.Location = new System.Drawing.Point(6, 15);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4); this.groupBox1.Size = new System.Drawing.Size(208, 251);
this.groupBox1.Size = new System.Drawing.Size(260, 314);
this.groupBox1.TabIndex = 274; this.groupBox1.TabIndex = 274;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DI列表"; this.groupBox1.Text = "DI列表";
...@@ -354,15 +359,15 @@ ...@@ -354,15 +359,15 @@
this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Location = new System.Drawing.Point(8, 18); this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 21F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(246, 289); this.tableLayoutPanel1.Size = new System.Drawing.Size(197, 231);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// richTextBox1 // richTextBox1
...@@ -371,10 +376,9 @@ ...@@ -371,10 +376,9 @@
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | 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.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(562, 171); this.richTextBox1.Location = new System.Drawing.Point(450, 137);
this.richTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(909, 682); this.richTextBox1.Size = new System.Drawing.Size(728, 546);
this.richTextBox1.TabIndex = 256; this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged); this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged);
...@@ -386,11 +390,9 @@ ...@@ -386,11 +390,9 @@
this.groupBox3.Controls.Add(this.lblWarnMsg); this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Controls.Add(this.panel1); this.groupBox3.Controls.Add(this.panel1);
this.groupBox3.Controls.Add(this.lblThisSta); this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Location = new System.Drawing.Point(12, 8); this.groupBox3.Location = new System.Drawing.Point(10, 6);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(4); this.groupBox3.Size = new System.Drawing.Size(1168, 124);
this.groupBox3.Size = new System.Drawing.Size(1460, 155);
this.groupBox3.TabIndex = 268; this.groupBox3.TabIndex = 268;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态"; this.groupBox3.Text = "设备状态";
...@@ -399,10 +401,9 @@ ...@@ -399,10 +401,9 @@
// //
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 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.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(334, 82); this.lblWarnMsg.Location = new System.Drawing.Point(267, 66);
this.lblWarnMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1070, 65); this.lblWarnMsg.Size = new System.Drawing.Size(856, 52);
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -417,10 +418,9 @@ ...@@ -417,10 +418,9 @@
this.panel1.Controls.Add(this.chbDebug); this.panel1.Controls.Add(this.chbDebug);
this.panel1.Controls.Add(this.btnVmiStop); this.panel1.Controls.Add(this.btnVmiStop);
this.panel1.Controls.Add(this.chbAuto); this.panel1.Controls.Add(this.chbAuto);
this.panel1.Location = new System.Drawing.Point(6, 19); this.panel1.Location = new System.Drawing.Point(5, 15);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1450, 60); this.panel1.Size = new System.Drawing.Size(1160, 48);
this.panel1.TabIndex = 273; this.panel1.TabIndex = 273;
// //
// chbMoveStop // chbMoveStop
...@@ -428,10 +428,9 @@ ...@@ -428,10 +428,9 @@
this.chbMoveStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbMoveStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbMoveStop.AutoSize = true; this.chbMoveStop.AutoSize = true;
this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbMoveStop.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbMoveStop.Location = new System.Drawing.Point(881, 12); this.chbMoveStop.Location = new System.Drawing.Point(704, 10);
this.chbMoveStop.Margin = new System.Windows.Forms.Padding(4);
this.chbMoveStop.Name = "chbMoveStop"; this.chbMoveStop.Name = "chbMoveStop";
this.chbMoveStop.Size = new System.Drawing.Size(104, 28); this.chbMoveStop.Size = new System.Drawing.Size(84, 24);
this.chbMoveStop.TabIndex = 274; this.chbMoveStop.TabIndex = 274;
this.chbMoveStop.Text = "暂停运动"; this.chbMoveStop.Text = "暂停运动";
this.chbMoveStop.UseVisualStyleBackColor = true; this.chbMoveStop.UseVisualStyleBackColor = true;
...@@ -440,10 +439,9 @@ ...@@ -440,10 +439,9 @@
// lblInfo // lblInfo
// //
this.lblInfo.AutoSize = true; this.lblInfo.AutoSize = true;
this.lblInfo.Location = new System.Drawing.Point(346, 6); this.lblInfo.Location = new System.Drawing.Point(277, 5);
this.lblInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblInfo.Name = "lblInfo"; this.lblInfo.Name = "lblInfo";
this.lblInfo.Size = new System.Drawing.Size(69, 20); this.lblInfo.Size = new System.Drawing.Size(56, 17);
this.lblInfo.TabIndex = 273; this.lblInfo.TabIndex = 273;
this.lblInfo.Text = "运行信息"; this.lblInfo.Text = "运行信息";
// //
...@@ -451,10 +449,9 @@ ...@@ -451,10 +449,9 @@
// //
this.btnVmiExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnVmiExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnVmiExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnVmiExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnVmiExit.Location = new System.Drawing.Point(1279, 4); this.btnVmiExit.Location = new System.Drawing.Point(1023, 3);
this.btnVmiExit.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiExit.Name = "btnVmiExit"; this.btnVmiExit.Name = "btnVmiExit";
this.btnVmiExit.Size = new System.Drawing.Size(165, 49); this.btnVmiExit.Size = new System.Drawing.Size(132, 39);
this.btnVmiExit.TabIndex = 4; this.btnVmiExit.TabIndex = 4;
this.btnVmiExit.Text = "退出"; this.btnVmiExit.Text = "退出";
this.btnVmiExit.UseVisualStyleBackColor = true; this.btnVmiExit.UseVisualStyleBackColor = true;
...@@ -463,10 +460,9 @@ ...@@ -463,10 +460,9 @@
// btnVmiStart // btnVmiStart
// //
this.btnVmiStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnVmiStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnVmiStart.Location = new System.Drawing.Point(5, 4); this.btnVmiStart.Location = new System.Drawing.Point(4, 3);
this.btnVmiStart.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiStart.Name = "btnVmiStart"; this.btnVmiStart.Name = "btnVmiStart";
this.btnVmiStart.Size = new System.Drawing.Size(165, 49); this.btnVmiStart.Size = new System.Drawing.Size(132, 39);
this.btnVmiStart.TabIndex = 0; this.btnVmiStart.TabIndex = 0;
this.btnVmiStart.Text = "启动"; this.btnVmiStart.Text = "启动";
this.btnVmiStart.UseVisualStyleBackColor = true; this.btnVmiStart.UseVisualStyleBackColor = true;
...@@ -477,10 +473,9 @@ ...@@ -477,10 +473,9 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(1166, 12); this.chbDebug.Location = new System.Drawing.Point(932, 10);
this.chbDebug.Margin = new System.Windows.Forms.Padding(4);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(104, 28); this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 271; this.chbDebug.TabIndex = 271;
this.chbDebug.Text = "调试状态"; this.chbDebug.Text = "调试状态";
this.chbDebug.UseVisualStyleBackColor = true; this.chbDebug.UseVisualStyleBackColor = true;
...@@ -489,10 +484,9 @@ ...@@ -489,10 +484,9 @@
// btnVmiStop // btnVmiStop
// //
this.btnVmiStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnVmiStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnVmiStop.Location = new System.Drawing.Point(174, 4); this.btnVmiStop.Location = new System.Drawing.Point(139, 3);
this.btnVmiStop.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiStop.Name = "btnVmiStop"; this.btnVmiStop.Name = "btnVmiStop";
this.btnVmiStop.Size = new System.Drawing.Size(165, 49); this.btnVmiStop.Size = new System.Drawing.Size(132, 39);
this.btnVmiStop.TabIndex = 1; this.btnVmiStop.TabIndex = 1;
this.btnVmiStop.Text = "停止"; this.btnVmiStop.Text = "停止";
this.btnVmiStop.UseVisualStyleBackColor = true; this.btnVmiStop.UseVisualStyleBackColor = true;
...@@ -503,10 +497,9 @@ ...@@ -503,10 +497,9 @@
this.chbAuto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbAuto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbAuto.AutoSize = true; this.chbAuto.AutoSize = true;
this.chbAuto.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAuto.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAuto.Location = new System.Drawing.Point(1014, 12); this.chbAuto.Location = new System.Drawing.Point(812, 10);
this.chbAuto.Margin = new System.Windows.Forms.Padding(4);
this.chbAuto.Name = "chbAuto"; this.chbAuto.Name = "chbAuto";
this.chbAuto.Size = new System.Drawing.Size(140, 28); this.chbAuto.Size = new System.Drawing.Size(112, 24);
this.chbAuto.TabIndex = 270; this.chbAuto.TabIndex = 270;
this.chbAuto.Text = "开机自动启动"; this.chbAuto.Text = "开机自动启动";
this.chbAuto.UseVisualStyleBackColor = true; this.chbAuto.UseVisualStyleBackColor = true;
...@@ -517,10 +510,9 @@ ...@@ -517,10 +510,9 @@
this.lblThisSta.AutoSize = true; 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.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.ForeColor = System.Drawing.Color.Green;
this.lblThisSta.Location = new System.Drawing.Point(10, 104); this.lblThisSta.Location = new System.Drawing.Point(8, 83);
this.lblThisSta.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(84, 25); this.lblThisSta.Size = new System.Drawing.Size(65, 19);
this.lblThisSta.TabIndex = 216; this.lblThisSta.TabIndex = 216;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
// //
...@@ -533,14 +525,14 @@ ...@@ -533,14 +525,14 @@
// //
// FrmFeederClient // FrmFeederClient
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.ClientSize = new System.Drawing.Size(1480, 859); this.ClientSize = new System.Drawing.Size(1184, 687);
this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox2);
this.Controls.Add(this.richTextBox1); this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox3);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(5); this.Margin = new System.Windows.Forms.Padding(4);
this.MaximizeBox = false; this.MaximizeBox = false;
this.Name = "FrmFeederClient"; this.Name = "FrmFeederClient";
this.Opacity = 0D; this.Opacity = 0D;
...@@ -601,6 +593,8 @@ ...@@ -601,6 +593,8 @@
private System.Windows.Forms.ComboBox cmbStopList; private System.Windows.Forms.ComboBox cmbStopList;
private System.Windows.Forms.CheckBox chbMoveStop; private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.NotifyIcon notifyIcon1; private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.Button btnTranverseRun;
private System.Windows.Forms.Button btnTranverse;
} }
} }
...@@ -11,7 +11,7 @@ using System.Threading; ...@@ -11,7 +11,7 @@ using System.Threading;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
using UserFromControl; using UserFromControl;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
...@@ -119,11 +119,11 @@ namespace OnlineStore.FeederLineClient ...@@ -119,11 +119,11 @@ namespace OnlineStore.FeederLineClient
if (!this.Visible) if (!this.Visible)
{ {
return; return;
} }
ReadIOList(); ReadIOList();
lblThisSta.Text = LineManager.GetRunStr(feederLine.runStatus)+" "+(feederLine.IsSleep ? "休眠中" :""); lblThisSta.Text = LineManager.GetRunStr(feederLine.runStatus) + " " + (feederLine.IsSleep ? "休眠中" : "");
lblWarnMsg.Text = feederLine.WarnMsg; lblWarnMsg.Text = feederLine.WarnMsg;
lblInfo.Text = feederLine.GetRunInfo(); lblInfo.Text = feederLine.GetRunInfo();
} }
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e) private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
...@@ -145,8 +145,9 @@ namespace OnlineStore.FeederLineClient ...@@ -145,8 +145,9 @@ namespace OnlineStore.FeederLineClient
else if (feederLine.StartRun()) else if (feederLine.StartRun())
{ {
btnVmiStart.Text = "复位"; btnVmiStart.Text = "复位";
}else }
{ else
{
btnVmiStart.Text = "启动"; btnVmiStart.Text = "启动";
} }
} }
...@@ -341,7 +342,7 @@ namespace OnlineStore.FeederLineClient ...@@ -341,7 +342,7 @@ namespace OnlineStore.FeederLineClient
private void btnInLOutStopDown_Click(object sender, EventArgs e) private void btnInLOutStopDown_Click(object sender, EventArgs e)
{ {
BtnMove(btnInLOutStopDown, "Feeder1线体出口阻挡下降", "Feeder1线体出口阻挡上升", IO_Type.L1_OutStopDown); BtnMove(btnInLOutStopDown, "Feeder1出口缓冲打开", "Feeder1出口缓冲关闭", IO_Type.L1_OutStopDown);
} }
private void btnOLInStopDown_Click(object sender, EventArgs e) private void btnOLInStopDown_Click(object sender, EventArgs e)
...@@ -363,17 +364,17 @@ namespace OnlineStore.FeederLineClient ...@@ -363,17 +364,17 @@ namespace OnlineStore.FeederLineClient
{ {
feederLine.StopMove(); feederLine.StopMove();
} }
// string agvName = "C2"; // string agvName = "C2";
private void btnNeedLeave_Click(object sender, EventArgs e) private void btnNeedLeave_Click(object sender, EventArgs e)
{ {
//AgvClient.NeedLeave(txtname.Text, txtShelfId.Text); //AgvClient.NeedLeave(txtname.Text, txtShelfId.Text);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedLeave); // AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedLeave);
} }
private void btnNeedEntry_Click(object sender, EventArgs e) private void btnNeedEntry_Click(object sender, EventArgs e)
{ {
//AgvClient.NeedEnter(txtname.Text, txtShelfId.Text); //AgvClient.NeedEnter(txtname.Text, txtShelfId.Text);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedEnter); // AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedEnter);
} }
/// <summary> /// <summary>
...@@ -393,7 +394,7 @@ namespace OnlineStore.FeederLineClient ...@@ -393,7 +394,7 @@ namespace OnlineStore.FeederLineClient
private void btnDis_Click(object sender, EventArgs e) private void btnDis_Click(object sender, EventArgs e)
{ {
// agvClient.Dispose(); // agvClient.Dispose();
} }
private void btnStopTDown_Click(object sender, EventArgs e) private void btnStopTDown_Click(object sender, EventArgs e)
...@@ -412,7 +413,7 @@ namespace OnlineStore.FeederLineClient ...@@ -412,7 +413,7 @@ namespace OnlineStore.FeederLineClient
} }
private void chbMoveStop_CheckedChanged(object sender, EventArgs e) private void chbMoveStop_CheckedChanged(object sender, EventArgs e)
{ {
feederLine.MoveStop = chbMoveStop.Checked; feederLine.MoveStop = chbMoveStop.Checked;
LogUtil.info(feederLine.Name + "用户切换是否暂停: " + feederLine.MoveStop); LogUtil.info(feederLine.Name + "用户切换是否暂停: " + feederLine.MoveStop);
} }
...@@ -426,5 +427,30 @@ namespace OnlineStore.FeederLineClient ...@@ -426,5 +427,30 @@ namespace OnlineStore.FeederLineClient
{ {
} }
private void btnTranverse_Click(object sender, EventArgs e)
{
if (btnTranverse.Text.Equals("横移机构上升"))
{
IOManager.CIOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.LOW);
Thread.Sleep(500);
IOManager.IOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.HIGH);
Thread.Sleep(500);
btnTranverse.Text = "横移机构下降";
}
else
{
IOManager.CIOMove(IO_Type.Tranverse_Up_SOL, IO_VALUE.LOW);
Thread.Sleep(500);
IOManager.IOMove(IO_Type.Tranverse_Down_SOL, IO_VALUE.HIGH);
Thread.Sleep(500);
btnTranverse.Text = "横移机构上升";
}
}
private void btnTranverseRun_Click(object sender, EventArgs e)
{
BtnMove(btnTranverseRun, "横移电机运转", "横移电机停止", IO_Type.Tranverse_Run);
}
} }
} }
...@@ -25,62 +25,92 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -25,62 +25,92 @@ namespace OnlineStore.LoadCSVLibrary
} }
/// <summary> /// <summary>
/// DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X741,DI-01,0, /// DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X761,DI-01,0,
/// </summary> /// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN"; public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <summary> /// <summary>
/// DI,Feeder1线入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,Feeder1线入口检测,X742,DI-02,0, /// DI,Feeder1线入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,Feeder1线入口检测,X762,DI-02,0,
/// </summary> /// </summary>
public static string L1_InCheck = "L1_InCheck"; public static string L1_InCheck = "L1_InCheck";
/// <summary> /// <summary>
/// DI,Feeder1线阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,Feeder1线阻挡检测,X743,DI-03,0, /// DI,Feeder1线阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,Feeder1线阻挡检测,X763,DI-03,0,
/// </summary> /// </summary>
public static string L1_StopCheck = "L1_StopCheck"; public static string L1_StopCheck = "L1_StopCheck";
/// <summary> /// <summary>
/// DI,Feeder1线出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,Feeder1线出口检测,X744,DI-04,0, ///DI,Feeder1线出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,Feeder1线出口检测,X764,DI-04,0,
/// </summary> /// </summary>
public static string L1_OutCheck = "L1_OutCheck"; public static string L1_OutCheck = "L1_OutCheck";
/// <summary> /// <summary>
/// DI,Feeder2线入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,Feeder2线入口检测,X745,DI-05,0, /// Feeder2线入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,Feeder2线入口检测,X765,DI-05,0,
/// </summary> /// </summary>
public static string L2_InCheck = "L2_InCheck"; public static string L2_InCheck = "L2_InCheck";
/// <summary> /// <summary>
/// DI,Feeder2线阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,Feeder2线阻挡检测,X746,DI-06,0, /// DI,Feeder2线阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,Feeder2线阻挡检测,X766,DI-06,0,
/// </summary> /// </summary>
public static string L2_StopCheck = "L2_StopCheck"; public static string L2_StopCheck = "L2_StopCheck";
/// <summary> /// <summary>
/// DI,Feeder2线出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,Feeder2线出口检测,X747,DI-07,0, /// DI,Feeder2线出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,Feeder2线出口检测,X767,DI-07,0,
/// </summary> /// </summary>
public static string L2_OutCheck = "L2_OutCheck"; public static string L2_OutCheck = "L2_OutCheck";
/// <summary> /// <summary>
/// DI,Feeder1线人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,Feeder1线人工取料信号,X748,DI-08,0, /// DI,Feeder1线人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,Feeder1线人工取料信号,X768,DI-08,0,
/// </summary> /// </summary>
public static string L1_ManualRecSig = "L1_ManualRecSig"; public static string L1_ManualRecSig = "L1_ManualRecSig";
/// <summary> /// <summary>
/// DO,Feeder1线驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,Feeder1线驱动电机运转,Y741,DI-01,0, /// DI,Feeder1线顶升上升端,L1_Updown_Up_Sig,8,PRO_AOI_IP_1,0,Feeder1线顶升上升端,X769,DI-09,0,
/// </summary>
public static string L1_Updown_Up_Sig = "L1_Updown_Up_Sig";
/// <summary>
/// DI,Feeder1线顶升下降端,L1_Updown_Down_Sig,9,PRO_AOI_IP_1,0,Feeder1线顶升下降端,X770,DI-10,0,
/// </summary>
public static string L1_Updown_Down_Sig = "L1_Updown_Down_Sig";
/// <summary>
/// DI,Feeder2线顶升上升端,L2_Updown_Up_Sig,10,PRO_AOI_IP_1,0,Feeder2线顶升上升端,X771,DI-11,0,
/// </summary>
public static string L2_Updown_Up_Sig = "L2_Updown_Up_Sig";
/// <summary>
/// DI,Feeder2线顶升下降端,L2_Updown_Down_Sig,11,PRO_AOI_IP_1,0,Feeder2线顶升下降端,X772,DI-12,0,
/// </summary>
public static string L2_Updown_Down_Sig = "L2_Updown_Down_Sig";
/// <summary>
/// DO,Feeder1线驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,Feeder1线驱动电机运转,Y761,DO-01,0,
/// </summary> /// </summary>
public static string L1_Run = "L1_Run"; public static string L1_Run = "L1_Run";
/// <summary> /// <summary>
/// DO,Feeder2线驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,Feeder2线驱动电机运转,Y742,DI-02,0, /// DO,Feeder2线驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,Feeder2线驱动电机运转,Y762,DI-02,0,
/// </summary> /// </summary>
public static string L2_Run = "L2_Run"; public static string L2_Run = "L2_Run";
/// <summary> /// <summary>
/// DO,Feeder1线阻挡1下降,L1_StopDown,2,PRO_AOI_IP_1,0,Feeder1线阻挡1下降,Y743,DI-03,0, /// DO,Feeder1线阻挡1下降,L1_StopDown,2,PRO_AOI_IP_1,0,Feeder1线阻挡1下降,Y763,DI-03,0,
/// </summary> /// </summary>
public static string L1_StopDown = "L1_StopDown"; public static string L1_StopDown = "L1_StopDown";
/// <summary> /// <summary>
/// DO,Feeder1线出口阻挡下降,L1_OutStopDown,3,PRO_AOI_IP_1,0,Feeder1线出口阻挡下降,Y744,DI-04,0, /// DO,Feeder1线出口阻挡下降,L1_OutStopDown,3,PRO_AOI_IP_1,0,Feeder1线出口阻挡下降,Y764,DI-04,0,
/// </summary> /// </summary>
public static string L1_OutStopDown = "L1_OutStopDown"; public static string L1_OutStopDown = "L1_OutStopDown";
/// <summary> /// <summary>
/// DO,Feeder2线阻挡1下降,L2_StopDown,4,PRO_AOI_IP_1,0,Feeder2线阻挡1下降,Y745,DI-05,0, /// DO,Feeder2线出口阻挡下降,L2_OutStopDown,4,PRO_AOI_IP_1,0,Feeder2线出口阻挡下降,Y765,DO-05,0,
/// </summary>
public static string L2_OutStopDown = "L2_OutStopDown";
/// <summary>
/// DO,Feeder2线阻挡1下降,L2_StopDown,5,PRO_AOI_IP_1,0,Feeder2线阻挡1下降,Y766,DO-06,0,
/// </summary> /// </summary>
public static string L2_StopDown = "L2_StopDown"; public static string L2_StopDown = "L2_StopDown";
/// <summary> /// <summary>
/// DO,Feeder2线出口阻挡下降,L2_OutStopDown,5,PRO_AOI_IP_1,0,Feeder2线出口阻挡下降,Y746,DI-06,0, /// DO,Feeder线横移机构上升SOL,Tranverse_Up_SOL,6,PRO_AOI_IP_1,0,Feeder线横移机构上升SOL,Y767,DO-07,0,
/// </summary> /// </summary>
public static string L2_OutStopDown = "L2_OutStopDown"; public static string Tranverse_Up_SOL = "Tranverse_Up_SOL";
/// <summary>
/// DO,Feeder线横移机构下降SOL,Tranverse_Down_SOL,7,PRO_AOI_IP_1,0,Feeder线横移机构下降SOL,Y768,DO-08,0,
/// </summary>
public static string Tranverse_Down_SOL = "Tranverse_Down_SOL";
/// <summary>
/// DO,Feeder线横移电机运转,Tranverse_Run,8,PRO_AOI_IP_1,0,Feeder线横移电机运转,Y769,DO-09,0,
/// </summary>
public static string Tranverse_Run = "Tranverse_Run";
} }
public enum IO_VALUE public enum IO_VALUE
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!