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
此文件类型无法预览
此文件类型无法预览
......@@ -36,5 +36,7 @@ namespace OnlineStore.Common
public static string Agv_Log_Open = "Agv_Log_Open";
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 @@
<Reference Include="Asa.IOModule.AIOBOX">
<HintPath>..\..\dll\Asa.IOModule.AIOBOX.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID">
<HintPath>..\..\dll\Asa.RFID.dll</HintPath>
<Reference Include="Asa.RFID.HiStation">
<HintPath>..\..\dll\Asa.RFID.HiStation.dll</HintPath>
</Reference>
<Reference Include="Asa.RFID.IReadAll">
<HintPath>..\..\dll\Asa.RFID.IReadAll.dll</HintPath>
</Reference>
<Reference Include="AsaPL.AgvClient">
<HintPath>..\..\dll\AsaPL.AgvClient.dll</HintPath>
</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">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\RFID\HFReader9CSharp.dll</HintPath>
......
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
PRO,IO模块对应的DI数量,IO_DILength,192.168.103.28#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,192.168.103.28#16,,,,,,,
PRO,IO模块IP,PRO_AOI_IP_1,192.168.103.28,,,,,,,
PRO,IO模块对应的DI数量,IO_DILength,10.85.197.121#16,,,,,,,
PRO,模块对应的DO数量,IO_DOLength,10.85.197.121#16,,,,,,,
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,Feeder1线入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,Feeder1线入口检测,X742,DI-02,0,
DI,Feeder1线阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,Feeder1线阻挡检测,X743,DI-03,0,
DI,Feeder1线出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,Feeder1线出口检测,X744,DI-04,0,
DI,Feeder2线入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,Feeder2线入口检测,X745,DI-05,0,
DI,Feeder2线阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,Feeder2线阻挡检测,X746,DI-06,0,
DI,Feeder2线出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,Feeder2线出口检测,X747,DI-07,0,
DI,Feeder1线人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,Feeder1线人工取料信号,X748,DI-08,0,
,,,9,PRO_AOI_IP_1,0,,X750,DO-02,0,
,,,10,PRO_AOI_IP_1,0,,X751,DO-03,0,
,,,11,PRO_AOI_IP_1,0,,X752,DO-04,0,
,,,12,PRO_AOI_IP_1,0,,X753,DO-05,0,
,,,13,PRO_AOI_IP_1,0,,X754,DO-06,0,
,,,14,PRO_AOI_IP_1,0,,X755,DO-07,0,
,,,15,PRO_AOI_IP_1,0,,X756,DO-08,0,
DO,Feeder1线驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,Feeder1线驱动电机运转,Y741,DI-01,0,
DO,Feeder2线驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,Feeder2线驱动电机运转,Y742,DI-02,0,
DO,Feeder1线阻挡1下降,L1_StopDown,2,PRO_AOI_IP_1,0,Feeder1线阻挡1下降,Y743,DI-03,0,
DO,Feeder1线出口阻挡下降,L1_OutStopDown,3,PRO_AOI_IP_1,0,Feeder1线出口阻挡下降,Y744,DI-04,0,
DO,Feeder2线出口阻挡下降,L2_OutStopDown,4,PRO_AOI_IP_1,0,Feeder2线出口阻挡下降,Y745,DI-05,0,
DO,Feeder2线阻挡1下降,L2_StopDown,5,PRO_AOI_IP_1,0,Feeder2线阻挡1下降,Y746,DI-06,0,
,,,6,PRO_AOI_IP_1,0,,Y747,DI-07,0,
,,,7,PRO_AOI_IP_1,0,,Y748,DI-08,0,
,,,8,PRO_AOI_IP_1,0,,Y749,DO-01,0,
,,,9,PRO_AOI_IP_1,0,,Y750,DO-02,0,
,,,10,PRO_AOI_IP_1,0,,Y751,DO-03,0,
,,,11,PRO_AOI_IP_1,0,,Y752,DO-04,0,
,,,12,PRO_AOI_IP_1,0,,Y753,DO-05,0,
,,,13,PRO_AOI_IP_1,0,,Y754,DO-06,0,
,,,14,PRO_AOI_IP_1,0,,Y755,DO-07,0,
,,,15,PRO_AOI_IP_1,0,,Y756,DO-08,0,
DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X21,DI-01,0,
DI,进料线体入口检测,L1_InCheck,1,PRO_AOI_IP_1,0,进料线体入口检测,X22,DI-02,0,
DI,进料线体阻挡检测,L1_StopCheck,2,PRO_AOI_IP_1,0,进料线体阻挡检测,X23,DI-03,0,
DI,进料线体出口检测,L1_OutCheck,3,PRO_AOI_IP_1,0,进料线体出口检测,X24,DI-04,0,
DI,出料线体入口检测,L2_InCheck,4,PRO_AOI_IP_1,0,出料线体入口检测,X25,DI-05,0,
DI,出料线体阻挡检测,L2_StopCheck,5,PRO_AOI_IP_1,0,出料线体阻挡检测,X26,DI-06,0,
DI,出料线体出口检测,L2_OutCheck,6,PRO_AOI_IP_1,0,出料线体出口检测,X27,DI-07,0,
DI,进料线体人工取料信号,L1_ManualRecSig,7,PRO_AOI_IP_1,0,进料线体人工取料信号,X28,DI-08,0,
DI,进料线体横移上升端,L1_Updown_Up_Sig,8,PRO_AOI_IP_1,0,进料线体横移上升端,X29,DI-09,0,
DI,进料线体横移下降端,L1_Updown_Down_Sig,9,PRO_AOI_IP_1,0,进料线体横移下降端,X30,DI-10,0,
DI,出料线体横移上升端,L2_Updown_Up_Sig,10,PRO_AOI_IP_1,0,出料线体横移上升端,X31,DI-11,0,
DI,出料线体横移下降端,L2_Updown_Down_Sig,11,PRO_AOI_IP_1,0,出料线体横移下降端,X32,DI-12,0,
DI,复位,Reset_BTN,12,PRO_AOI_IP_1,0,复位,X33,DI-13,0,
,,,13,PRO_AOI_IP_1,0,,X774,DI-14,0,
,,,14,PRO_AOI_IP_1,0,,X775,DI-15,0,
,,,15,PRO_AOI_IP_1,0,,X776,DI-16,0,
DO,进料线体驱动电机运转,L1_Run,0,PRO_AOI_IP_1,0,进料线体驱动电机运转,Y21,DO-01,0,
DO,出料线体驱动电机运转,L2_Run,1,PRO_AOI_IP_1,0,出料线体驱动电机运转,Y22,DO-02,0,
DO,进料线体阻挡下降,L1_StopDown,2,PRO_AOI_IP_1,0,进料线体阻挡下降,Y23,DO-03,0,
DO,进料线体出口缓冲器,L1_OutStopDown,3,PRO_AOI_IP_1,0,进料线体出口缓冲器,Y24,DO-04,0,
DO,出料线体阻挡下降,L2_StopDown,4,PRO_AOI_IP_1,0,出料线体阻挡下降,Y25,DO-05,0,
DO,出料线体出口阻挡下降,L2_OutStopDown,5,PRO_AOI_IP_1,0,出料线体出口阻挡下降,Y26,DO-06,0,
DO,横移机构电机运转,Tranverse_Run,6,PRO_AOI_IP_1,0,横移机构电机运转,Y27,DO-09,0,
DO,横移机构上升SOL,Tranverse_Up_SOL,7,PRO_AOI_IP_1,0,横移机构上升SOL,Y28,DO-07,0,
DO,横移机构下降SOL,Tranverse_Down_SOL,8,PRO_AOI_IP_1,0,横移机构下降SOL,Y29,DO-08,0,
DO,线体运行状态灯,Run_Status_Light,9,PRO_AOI_IP_1,0,线体运行状态灯,Y30,DO-10,0,
,,,10,PRO_AOI_IP_1,0,,Y31,DO-11,0,
,,,11,PRO_AOI_IP_1,0,,Y32,DO-12,0,
,,,12,PRO_AOI_IP_1,0,,Y33,DO-13,0,
,,,13,PRO_AOI_IP_1,0,,Y34,DO-14,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,Feeder1线AGV节点名称,L1_AgvName,D21,,,,,,,
PRO,Feeder2线AGV节点名称,L2_AgvName,D22,,,,,,,
PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,192.168.103.108,,,,,, ,
PRO,休眠秒数(秒),SleepSeconds,60,,,,,,,
PRO,进料线体线AGV节点名称,L1_AgvName,C21,,,,,,,
PRO,出料线体线AGV节点名称,L2_AgvName,C22,,,,,,,
PRO,Feeder线出口RFIDIP,L2Out_RFIDIP,10.85.197.2,,,,,, ,
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;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
public class RFIDManager
{
private static ReadAll readAll =new ReadAll ("TheRFID");
private static Asa.RFID.ReadAll read;
private static bool IsOpen = false;
// private static ConcurrentDictionary<string, string> LastRfidMap = new ConcurrentDictionary<string, string>();
public static void Open(string[] iparray)
public static bool IsAuto = false;
/// <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)
{
......@@ -22,15 +29,9 @@ namespace OnlineStore.DeviceLibrary
}
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);
read = new ReadAll("TheRFID");
read.Received += Read_Received;
read.Start(13001);
IsOpen = true;
}
catch (Exception ex)
......@@ -40,6 +41,26 @@ namespace OnlineStore.DeviceLibrary
}
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)
{
string str = "RFID : [" + ip + "] " + log;
......@@ -51,20 +72,21 @@ namespace OnlineStore.DeviceLibrary
lastStr = str;
}
public static RFIDData ReadRFID(string ip, bool isClear = false)
public static RFIDData ReadRFID(string ip,bool isClear= true)
{
try
{
if (String.IsNullOrEmpty(ip).Equals(false))
if (String.IsNullOrEmpty(ip).Equals(false) && read!=null)
{
string outValue = readAll.Read(ip);
if (isClear)
{
readAll.Clear(ip);
read.Clear(ip);
}
Thread.Sleep(100);
string outValue = read.Read(ip);
RFIDData data = new RFIDData(outValue);
return data;
}
}
......@@ -80,7 +102,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
readAll.Stop();
read.Stop();
}
catch (Exception ex)
{
......
......@@ -36,7 +36,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Interval = 300;
mainTimer.AutoReset = true;
mainTimer.Enabled = false;
mainTimer.Elapsed +=timersTimer_Elapsed;
mainTimer.Elapsed += timersTimer_Elapsed;
//添加调试
IsDebug = ConfigAppSettings.GetIntValue(Setting_Init.IsInDebug).Equals(1);
......@@ -73,7 +73,7 @@ namespace OnlineStore.DeviceLibrary
//}
//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;
MoveInfo.NewMove(LineMoveType.ReturnHome);
ReturnHome();
......@@ -175,7 +175,7 @@ namespace OnlineStore.DeviceLibrary
public void Alarm(AlarmType alarmType)
{
if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop )
if (this.alarmType.Equals(alarmType) && alarmType != AlarmType.SuddenStop)
{
return;
}
......@@ -199,6 +199,9 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.L1_OutStopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.L2_StopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW);
IOManager.IOMove(IO_Type.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;
......@@ -218,7 +221,7 @@ namespace OnlineStore.DeviceLibrary
{
InProcess = true;
stopwatch.Restart();
IoCheckProcess();
//IoCheckProcess();
if (runStatus >= RunStatus.HomeMoving)
{
......@@ -234,10 +237,10 @@ namespace OnlineStore.DeviceLibrary
}
else if (runStatus.Equals(RunStatus.Runing))
{
InLineTimerProcess();
//InLineTimerProcess();
OutLineTimerProcess();
TranverseTimerProcess();
IOTimeOutProcess();
SleepTimerProcess();
......@@ -258,6 +261,7 @@ namespace OnlineStore.DeviceLibrary
private Stopwatch ol_noshelfWatch = new Stopwatch();
private Stopwatch ol_noshelfWatch1 = new Stopwatch();
private Stopwatch rfidWatch = new Stopwatch();
private DateTime ol_lastSendShelfTime = DateTime.Now;
private int StopDownMS = 1500;
/// <summary>
......@@ -267,9 +271,12 @@ namespace OnlineStore.DeviceLibrary
{
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以上,放开阻挡放出一个料架
//每次放料架时间间隔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))
......@@ -277,15 +284,18 @@ namespace OnlineStore.DeviceLibrary
IOManager.CIOMove(IO_Type.L2_OutStopDown, IO_VALUE.LOW);
LogUtil.info(" Feeder2线体出口无料架,下降 [" + IO_Type.L2_StopDown + "] [" + StopDownMS + "] 秒");
ol_lastSendShelfTime = DateTime.Now;
agvClient.OutLine_RFID = "";
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)
{
//如果出料线体出口无料架,放一个料架到出口
if (LineManager.checkWatch(ol_noshelfWatch1, 1000))
//如果Feeder1出口无料架,放一个料架到出口
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 + "] 秒");
ol_lastSendShelfTime = DateTime.Now;
StopIOMove(IO_Type.L1_StopDown, StopDownMS);
......@@ -297,66 +307,91 @@ namespace OnlineStore.DeviceLibrary
ol_noshelfWatch1.Stop();
IOManager.CIOMove(IO_Type.L2_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.L1_InCheck).Equals(IO_VALUE.LOW))
//{
// AgvClient.NeedEnter(Config.L1_AgvName, "");
//}else
//{
// AgvClient.SetToNone(Config.L1_AgvName, "");
//}
if(IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && LineManager.checkWatch(rfidWatch, 2000))
{
agvClient.OutLine_NeedLeave(LastOutShelfId);
}
private DateTime il_lastCallAgvTime = DateTime.Now.AddMinutes(-5);
private Stopwatch il_outstopCheckWarch = new Stopwatch();
//private Stopwatch il_manualCheckWatch = new Stopwatch();
/// <summary>
/// 入料线体定时处理
/// </summary>
private void InLineTimerProcess()
}
private Task TranverseTask;
private static void TranverseProcess()
{
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))
{
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;
//出口有料架,需要通知agv取走料架
//每次叫小车时间间隔3分钟?
//出口信号需要持续1秒钟
//if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.HIGH) && span.TotalSeconds > 60)
//{
// // if (LastOutShelfId.Equals("000").Equals(false))
// // {
// //if (LineManager.checkWatch(il_outstopCheckWarch, 1000))
// //{
// // il_lastCallAgvTime = DateTime.Now;
// // //StopIOMove(IO_Type.InL_OutStopDown, StopDownMS);
// // LogUtil.info(" Feeder2线体出口有料架" + LastOutShelfId + ",呼叫agv小车[" + Config.L2_AgvName + "] [NeedLeave] ");
// // AgvClient.NeedLeave(Config.L2_AgvName, LastOutShelfId);
// //}
// //}
//}
//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, "" );
//}
//Feeder1出口有料架,Feeder2入口空
//出口信号需要持续6秒钟
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 (LineManager.checkWatch(ol_tranverseShelfWatch, 2000))
{
if (TranverseTask ==null)
{
TranverseTask = Task.Factory.StartNew(new Action(TranverseProcess));
il_lastCallAgvTime = DateTime.Now;
}
else if (TranverseTask.IsCompleted)
{
TranverseTask = Task.Factory.StartNew(new Action(TranverseProcess));
il_lastCallAgvTime = DateTime.Now;
}
}
}
else
{
ol_tranverseShelfWatch.Stop();
}
}
private DateTime il_lastCallAgvTime = DateTime.Now.AddMinutes(-5);
//private void LedProcess()
//{
// try
......@@ -418,41 +453,41 @@ namespace OnlineStore.DeviceLibrary
// 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();
// }
//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;
/// <summary>
......@@ -501,16 +536,7 @@ namespace OnlineStore.DeviceLibrary
//LedProcess();
//LastInShelfId = RFIDManager.ReadRFID(Config.L1In_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);
//}
LastOutShelfId = RFIDManager.ReadRFID(Config.L2Out_RFIDIP, true).NumStr();
}
catch (Exception ex)
{
......@@ -544,7 +570,7 @@ namespace OnlineStore.DeviceLibrary
{
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("rfid", rfid);
string addr = GetAddr(api_communication, paramMap ) ;
string addr = GetAddr(api_communication, paramMap);
string resultStr = HttpHelper.Post(addr, "");
string log = "feederRfid 【" + addr + "】【" + resultStr + "】";
if (lastLog.Equals(log).Equals(false))
......
......@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
//return "进料线出口" + Config.L2_AgvName + ":" + AgvClient.GetAction(Config.L2_AgvName) + ",料架: " + LastInShelfId + "\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)
"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
......@@ -170,7 +170,7 @@ namespace OnlineStore.DeviceLibrary
needCheckList.Add(IO_Type.L2_StopDown);
}
bool agvBusy = false;
if (agvClient.D21_InProcess || agvClient.D22_InProcess)
if (agvClient.InLine_InProcess || agvClient.OutLine_InProcess)
agvBusy = true;
if (agvBusy && IsSleep)
{
......
......@@ -18,42 +18,49 @@ namespace OnlineStore.DeviceLibrary
private AsaPL.AgvClient agvClient;
private static bool isInit = false;
public static Dictionary<string, AsaPL.ClientAction> actionMap = new Dictionary<string, AsaPL.ClientAction>();
public bool D21_InProcess = false;
public bool D22_InProcess = false;
public bool InLine_InProcess = false;
public bool OutLine_InProcess = false;
public string D22_RFID { get; set; } = "";
#region D21 Action
private static string InLine_Name = ConfigAppSettings.GetValue(Setting_Init.InLine_Name);
private static string OutLine_Name = ConfigAppSettings.GetValue(Setting_Init.OutLine_Name);
public string OutLine_RFID { get; set; } = "";
#region InLine Action
/// <summary>
/// 无状态
/// </summary>
public void D21_None()
public void InLine_None()
{
SetStatus("D21", "", ClientAction.None);
SetStatus(InLine_Name, "", ClientAction.None);
}
/// <summary>
/// 可以进入状态
/// </summary>
public void D21_NeedEnter()
public void InLine_NeedEnter()
{
SetStatus("D21", "", ClientAction.NeedEnter);
SetStatus(InLine_Name, "", ClientAction.NeedEnter);
}
#endregion
#region D22 Action
#region OutLine Action
/// <summary>
/// 无状态
/// </summary>
public void D22_None()
public void OutLine_None(string rfid="")
{
SetStatus("D22", "", ClientAction.None);
SetStatus(OutLine_Name, rfid, ClientAction.None);
}
/// <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
......@@ -72,8 +79,8 @@ namespace OnlineStore.DeviceLibrary
agvClient.AGVFinishLeave += AgvClient_FinishLeave;
}
actionMap = new Dictionary<string, AsaPL.ClientAction>();
agvClient.SetStatus("D21", "", ClientAction.None);
agvClient.SetStatus("D22", "", ClientAction.None);
agvClient.SetStatus(InLine_Name, "", ClientAction.None);
agvClient.SetStatus(OutLine_Name, "", ClientAction.None);
agvClient.Connect();
LogUtil.info("初始化AGV服务");
}
......@@ -100,9 +107,9 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name">节点名称</param>
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
{
Feeder_In_Msg = "Feeder In: 等待 L1_InCheck=HIGH";
......@@ -123,10 +130,10 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(5000);
Feeder_In_Msg = "Feeder In: 调用 FinishEnter ";
LogUtil.info(Feeder_In_Msg);
FinishEnter("D21");
FinishEnter(InLine_Name);
Feeder_In_Msg = "Feeder In: 处理结束 更新状态为None ";
LogUtil.info(Feeder_In_Msg);
D21_None();
InLine_None();
});
}
......@@ -136,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L1_InCheck).Equals(IO_VALUE.HIGH))
Feeder_In_Msg = "Feeder In: L1_InCheck 检测到有料架,AGV的料架无法进入";
LogUtil.info(Feeder_In_Msg);
D21_None();
InLine_None();
}
LogUtil.info("收到 AgvClient_ReadyEnter [" + name + "]");
}
......@@ -154,10 +161,9 @@ namespace OnlineStore.DeviceLibrary
// D22_InProcess = 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("D22");
MayLeave(OutLine_Name, OutLine_RFID);
//LineManager.feederLine.UpdateSleep(false);
LineManager.feederLine.StopIOMove(IO_Type.L2_OutStopDown, 1500);
//agvClient.MayLeave(id);
......@@ -171,12 +177,12 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(10000);
Feeder_Out_Msg = "Feeder Out: 调用 FinishLeave ";
LogUtil.info(Feeder_Out_Msg);
FinishLeave("D22");
FinishLeave(OutLine_Name, OutLine_RFID);
Thread.Sleep(5000);
Feeder_Out_Msg = "Feeder Out: 处理结束 更新状态为None ";
LogUtil.info(Feeder_Out_Msg);
D22_None();
OutLine_None();
});
}
else
......@@ -184,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
if (IOManager.IOValue(IO_Type.L2_OutCheck).Equals(IO_VALUE.LOW))
Feeder_Out_Msg = "Feeder Out: L2_OutCheck 未检测到料架,无法将料架进入AGV";
LogUtil.info(Feeder_Out_Msg);
D22_None();
OutLine_None();
}
LogUtil.info("收到 AgvClient_ReadyLeave [" + name + "] ");
......@@ -197,13 +203,13 @@ namespace OnlineStore.DeviceLibrary
/// <param name="name"></param>
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 + "] ");
}
......@@ -227,19 +233,21 @@ namespace OnlineStore.DeviceLibrary
public void MayEnter(string name)
{
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);
if (name.Equals("D22"))
SetStatus(name, rfid, ClientAction.MayLeave);
if (name.Equals(OutLine_Name))
{
D22_InProcess = true;
OutLine_InProcess = true;
}
LogUtil.info("MayLeave [" + name + "] ");
}
/// <summary>
......@@ -253,13 +261,13 @@ namespace OnlineStore.DeviceLibrary
SetStatus(name, "", ClientAction.FinishEnter);
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
/// 料架离开产线完成
/// </summary>
/// <param name="name"></param>
public void FinishLeave(string name)
public void FinishLeave(string name, string rfid = "")
{
Task.Factory.StartNew(delegate
{
SetStatus(name, "", ClientAction.FinishLeave);
SetStatus(name, rfid, ClientAction.FinishLeave);
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
}
// actionMap[name] = action;
// agvClient.SetStatus(name, shelfId, action, level);
//LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
LogUtil.info("设置 " + name + " [" + shelfId + "] " + action.ToString());
return true;
}
agvClient.SetStatus(name, shelfId, action, level);
//actionMap.Add(name, action);
//LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
LogUtil.info("设置 " + name + " ["+ shelfId + "] "+ action.ToString());
return true;
}
......
......@@ -4,16 +4,14 @@
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<appSettings>
<!--Feeder流水线名称-->
<add key="InLine_Name" value="C21" />
<add key="OutLine_Name" value="C22" />
<!--是否开机自动启动Feeder流水线-->
<add key="App_AutoRun" value="1" />
<add key="App_Title" value="Feeder线" />
<!--Server address-->
<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配置-->
<add key="UseAIOBOX" value="1" />
<add key="DIMS" value="60" />
......@@ -24,24 +22,33 @@
<add key="IsInDebug" value="1" />
<add key="Agv_Log_Open" value="1" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="Line_Config" value="\LineConfig\FeederLineConfig.csv" />
</appSettings>
<log4net>
<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" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<param name="MaxSizeRollBackups" value="30"/>
<!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="100MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<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" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<param name="MaxSizeRollBackups" value="30"/>
<!-- 切割最多文件数 -->
<param name="MaximumFileSize" value="50MB"/>
<!-- 每个文件的大小 -->
<param name="RollingStyle" value="Size"/>
<param name="StaticLogFileName" value="true"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
......
......@@ -30,6 +30,8 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
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.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.btnStopTDown = new System.Windows.Forms.Button();
......@@ -83,25 +85,25 @@
this.toolStripSeparator8,
this.toolStripMenuItem1});
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);
//
// 显示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.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(121, 6);
this.toolStripSeparator8.Size = new System.Drawing.Size(109, 6);
//
// 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.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
//
......@@ -109,6 +111,8 @@
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBox2.Controls.Add(this.btnTranverseRun);
this.groupBox2.Controls.Add(this.btnTranverse);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Controls.Add(this.numericUpDown1);
this.groupBox2.Controls.Add(this.btnStopTDown);
......@@ -124,21 +128,40 @@
this.groupBox2.Controls.Add(this.btnOutL);
this.groupBox2.Controls.Add(this.groupBox4);
this.groupBox2.Controls.Add(this.groupBox1);
this.groupBox2.Location = new System.Drawing.Point(12, 165);
this.groupBox2.Margin = new System.Windows.Forms.Padding(4);
this.groupBox2.Location = new System.Drawing.Point(10, 132);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(4);
this.groupBox2.Size = new System.Drawing.Size(542, 689);
this.groupBox2.Size = new System.Drawing.Size(434, 551);
this.groupBox2.TabIndex = 276;
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
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(310, 551);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(248, 441);
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.Text = "ms";
//
......@@ -150,8 +173,7 @@
0,
0,
0});
this.numericUpDown1.Location = new System.Drawing.Point(226, 545);
this.numericUpDown1.Margin = new System.Windows.Forms.Padding(4);
this.numericUpDown1.Location = new System.Drawing.Point(181, 436);
this.numericUpDown1.Maximum = new decimal(new int[] {
300000,
0,
......@@ -163,7 +185,7 @@
0,
0});
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.Value = new decimal(new int[] {
600,
......@@ -174,10 +196,9 @@
// btnStopTDown
//
this.btnStopTDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStopTDown.Location = new System.Drawing.Point(349, 538);
this.btnStopTDown.Margin = new System.Windows.Forms.Padding(4);
this.btnStopTDown.Location = new System.Drawing.Point(279, 430);
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.Text = "阻挡定时下降";
this.btnStopTDown.UseVisualStyleBackColor = true;
......@@ -192,20 +213,18 @@
"Feeder1进料线_阻挡",
"Feeder1进料线_出口阻挡",
"Feeder2出料线_阻挡"});
this.cmbStopList.Location = new System.Drawing.Point(28, 544);
this.cmbStopList.Margin = new System.Windows.Forms.Padding(4);
this.cmbStopList.Location = new System.Drawing.Point(22, 435);
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;
//
// btnCloseA
//
this.btnCloseA.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnCloseA.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseA.Location = new System.Drawing.Point(28, 619);
this.btnCloseA.Margin = new System.Windows.Forms.Padding(4);
this.btnCloseA.Location = new System.Drawing.Point(22, 495);
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.Text = "关闭所有DO";
this.btnCloseA.UseVisualStyleBackColor = true;
......@@ -215,10 +234,9 @@
//
this.btnClearL.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnClearL.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClearL.Location = new System.Drawing.Point(376, 619);
this.btnClearL.Margin = new System.Windows.Forms.Padding(4);
this.btnClearL.Location = new System.Drawing.Point(301, 495);
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.Text = "清理日志";
this.btnClearL.UseVisualStyleBackColor = true;
......@@ -228,10 +246,9 @@
//
this.btnLogDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btnLogDebug.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLogDebug.Location = new System.Drawing.Point(245, 619);
this.btnLogDebug.Margin = new System.Windows.Forms.Padding(4);
this.btnLogDebug.Location = new System.Drawing.Point(196, 495);
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.Text = "开启DEBUG";
this.btnLogDebug.UseVisualStyleBackColor = true;
......@@ -240,10 +257,9 @@
// btnOLOutStopDown
//
this.btnOLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOLOutStopDown.Location = new System.Drawing.Point(291, 460);
this.btnOLOutStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnOLOutStopDown.Location = new System.Drawing.Point(168, 368);
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.Text = "Feeder2线体出口阻挡下降";
this.btnOLOutStopDown.UseVisualStyleBackColor = true;
......@@ -252,10 +268,9 @@
// btnOLInStopDown
//
this.btnOLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOLInStopDown.Location = new System.Drawing.Point(291, 404);
this.btnOLInStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnOLInStopDown.Location = new System.Drawing.Point(168, 323);
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.Text = "Feeder2线体阻挡下降";
this.btnOLInStopDown.UseVisualStyleBackColor = true;
......@@ -264,22 +279,20 @@
// btnInLOutStopDown
//
this.btnInLOutStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLOutStopDown.Location = new System.Drawing.Point(28, 460);
this.btnInLOutStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnInLOutStopDown.Location = new System.Drawing.Point(22, 368);
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.Text = "Feeder1线体出口阻挡下降";
this.btnInLOutStopDown.Text = "Feeder1出口缓冲打开";
this.btnInLOutStopDown.UseVisualStyleBackColor = true;
this.btnInLOutStopDown.Click += new System.EventHandler(this.btnInLOutStopDown_Click);
//
// btnInLInStopDown
//
this.btnInLInStopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLInStopDown.Location = new System.Drawing.Point(28, 404);
this.btnInLInStopDown.Margin = new System.Windows.Forms.Padding(4);
this.btnInLInStopDown.Location = new System.Drawing.Point(22, 323);
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.Text = "Feeder1线体阻挡下降";
this.btnInLInStopDown.UseVisualStyleBackColor = true;
......@@ -288,10 +301,9 @@
// btnInLineRun
//
this.btnInLineRun.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInLineRun.Location = new System.Drawing.Point(28, 348);
this.btnInLineRun.Margin = new System.Windows.Forms.Padding(4);
this.btnInLineRun.Location = new System.Drawing.Point(22, 278);
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.Text = "Feeder1线体运转";
this.btnInLineRun.UseVisualStyleBackColor = true;
......@@ -300,10 +312,9 @@
// btnOutL
//
this.btnOutL.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOutL.Location = new System.Drawing.Point(291, 348);
this.btnOutL.Margin = new System.Windows.Forms.Padding(4);
this.btnOutL.Location = new System.Drawing.Point(168, 278);
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.Text = "Feeder2线体运转";
this.btnOutL.UseVisualStyleBackColor = true;
......@@ -312,39 +323,33 @@
// groupBox4
//
this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(272, 19);
this.groupBox4.Margin = new System.Windows.Forms.Padding(4);
this.groupBox4.Location = new System.Drawing.Point(218, 15);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Padding = new System.Windows.Forms.Padding(4);
this.groupBox4.Size = new System.Drawing.Size(260, 314);
this.groupBox4.Size = new System.Drawing.Size(208, 251);
this.groupBox4.TabIndex = 275;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表";
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tableLayoutPanel2.AutoScroll = true;
this.tableLayoutPanel2.ColumnCount = 1;
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.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 19);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
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, 21F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(246, 289);
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, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(202, 229);
this.tableLayoutPanel2.TabIndex = 103;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tableLayoutPanel1);
this.groupBox1.Location = new System.Drawing.Point(8, 19);
this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Location = new System.Drawing.Point(6, 15);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
this.groupBox1.Size = new System.Drawing.Size(260, 314);
this.groupBox1.Size = new System.Drawing.Size(208, 251);
this.groupBox1.TabIndex = 274;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DI列表";
......@@ -354,15 +359,15 @@
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.Right)));
this.tableLayoutPanel1.AutoScroll = true;
this.tableLayoutPanel1.ColumnCount = 1;
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.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Location = new System.Drawing.Point(6, 14);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
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, 21F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(246, 289);
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, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(197, 231);
this.tableLayoutPanel1.TabIndex = 102;
//
// richTextBox1
......@@ -371,10 +376,9 @@
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(562, 171);
this.richTextBox1.Margin = new System.Windows.Forms.Padding(4);
this.richTextBox1.Location = new System.Drawing.Point(450, 137);
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.Text = "";
this.richTextBox1.VisibleChanged += new System.EventHandler(this.richTextBox1_VisibleChanged);
......@@ -386,11 +390,9 @@
this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Controls.Add(this.panel1);
this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Location = new System.Drawing.Point(12, 8);
this.groupBox3.Margin = new System.Windows.Forms.Padding(4);
this.groupBox3.Location = new System.Drawing.Point(10, 6);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Padding = new System.Windows.Forms.Padding(4);
this.groupBox3.Size = new System.Drawing.Size(1460, 155);
this.groupBox3.Size = new System.Drawing.Size(1168, 124);
this.groupBox3.TabIndex = 268;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "设备状态";
......@@ -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.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(334, 82);
this.lblWarnMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblWarnMsg.Location = new System.Drawing.Point(267, 66);
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.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -417,10 +418,9 @@
this.panel1.Controls.Add(this.chbDebug);
this.panel1.Controls.Add(this.btnVmiStop);
this.panel1.Controls.Add(this.chbAuto);
this.panel1.Location = new System.Drawing.Point(6, 19);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Location = new System.Drawing.Point(5, 15);
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;
//
// chbMoveStop
......@@ -428,10 +428,9 @@
this.chbMoveStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Location = new System.Drawing.Point(881, 12);
this.chbMoveStop.Margin = new System.Windows.Forms.Padding(4);
this.chbMoveStop.Location = new System.Drawing.Point(704, 10);
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.Text = "暂停运动";
this.chbMoveStop.UseVisualStyleBackColor = true;
......@@ -440,10 +439,9 @@
// lblInfo
//
this.lblInfo.AutoSize = true;
this.lblInfo.Location = new System.Drawing.Point(346, 6);
this.lblInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblInfo.Location = new System.Drawing.Point(277, 5);
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.Text = "运行信息";
//
......@@ -451,10 +449,9 @@
//
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.Location = new System.Drawing.Point(1279, 4);
this.btnVmiExit.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiExit.Location = new System.Drawing.Point(1023, 3);
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.Text = "退出";
this.btnVmiExit.UseVisualStyleBackColor = true;
......@@ -463,10 +460,9 @@
// btnVmiStart
//
this.btnVmiStart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnVmiStart.Location = new System.Drawing.Point(5, 4);
this.btnVmiStart.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiStart.Location = new System.Drawing.Point(4, 3);
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.Text = "启动";
this.btnVmiStart.UseVisualStyleBackColor = true;
......@@ -477,10 +473,9 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Location = new System.Drawing.Point(1166, 12);
this.chbDebug.Margin = new System.Windows.Forms.Padding(4);
this.chbDebug.Location = new System.Drawing.Point(932, 10);
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.Text = "调试状态";
this.chbDebug.UseVisualStyleBackColor = true;
......@@ -489,10 +484,9 @@
// btnVmiStop
//
this.btnVmiStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnVmiStop.Location = new System.Drawing.Point(174, 4);
this.btnVmiStop.Margin = new System.Windows.Forms.Padding(4);
this.btnVmiStop.Location = new System.Drawing.Point(139, 3);
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.Text = "停止";
this.btnVmiStop.UseVisualStyleBackColor = true;
......@@ -503,10 +497,9 @@
this.chbAuto.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
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.Location = new System.Drawing.Point(1014, 12);
this.chbAuto.Margin = new System.Windows.Forms.Padding(4);
this.chbAuto.Location = new System.Drawing.Point(812, 10);
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.Text = "开机自动启动";
this.chbAuto.UseVisualStyleBackColor = true;
......@@ -517,10 +510,9 @@
this.lblThisSta.AutoSize = true;
this.lblThisSta.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblThisSta.ForeColor = System.Drawing.Color.Green;
this.lblThisSta.Location = new System.Drawing.Point(10, 104);
this.lblThisSta.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.lblThisSta.Location = new System.Drawing.Point(8, 83);
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.Text = "等待启动";
//
......@@ -533,14 +525,14 @@
//
// 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.ClientSize = new System.Drawing.Size(1480, 859);
this.ClientSize = new System.Drawing.Size(1184, 687);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.groupBox3);
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.Name = "FrmFeederClient";
this.Opacity = 0D;
......@@ -601,6 +593,8 @@
private System.Windows.Forms.ComboBox cmbStopList;
private System.Windows.Forms.CheckBox chbMoveStop;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.Button btnTranverseRun;
private System.Windows.Forms.Button btnTranverse;
}
}
......@@ -121,7 +121,7 @@ namespace OnlineStore.FeederLineClient
return;
}
ReadIOList();
lblThisSta.Text = LineManager.GetRunStr(feederLine.runStatus)+" "+(feederLine.IsSleep ? "休眠中" :"");
lblThisSta.Text = LineManager.GetRunStr(feederLine.runStatus) + " " + (feederLine.IsSleep ? "休眠中" : "");
lblWarnMsg.Text = feederLine.WarnMsg;
lblInfo.Text = feederLine.GetRunInfo();
}
......@@ -145,7 +145,8 @@ namespace OnlineStore.FeederLineClient
else if (feederLine.StartRun())
{
btnVmiStart.Text = "复位";
}else
}
else
{
btnVmiStart.Text = "启动";
}
......@@ -341,7 +342,7 @@ namespace OnlineStore.FeederLineClient
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)
......@@ -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
}
/// <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>
public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <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>
public static string L1_InCheck = "L1_InCheck";
/// <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>
public static string L1_StopCheck = "L1_StopCheck";
/// <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>
public static string L1_OutCheck = "L1_OutCheck";
/// <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>
public static string L2_InCheck = "L2_InCheck";
/// <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>
public static string L2_StopCheck = "L2_StopCheck";
/// <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>
public static string L2_OutCheck = "L2_OutCheck";
/// <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>
public static string L1_ManualRecSig = "L1_ManualRecSig";
/// <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>
public static string L1_Run = "L1_Run";
/// <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>
public static string L2_Run = "L2_Run";
/// <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>
public static string L1_StopDown = "L1_StopDown";
/// <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>
public static string L1_OutStopDown = "L1_OutStopDown";
/// <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>
public static string L2_StopDown = "L2_StopDown";
/// <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>
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
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!