Commit b1b020de 刘韬

1

1 个父辈 43fb10e8
正在显示 68 个修改的文件 包含 658 行增加3035 行删除
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ConfigHelper">
<HintPath>..\..\..\ConfigHelper\ConfigHelper\bin\Debug\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
......
using System; using ConfigHelper;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -53,5 +54,15 @@ namespace OnlineStore.Common ...@@ -53,5 +54,15 @@ namespace OnlineStore.Common
public static string QRCodeCount= "QRCodeCount"; public static string QRCodeCount= "QRCodeCount";
public static string CodeType= "CodeType"; public static string CodeType= "CodeType";
public static string CodeParamPath= "CodeParamPath"; public static string CodeParamPath= "CodeParamPath";
[MyConfigComment("X高压端口")]
public static MyConfig<string> XRay_Port = "COM2";
[MyConfigComment("X高压电压")]
public static MyConfig<double> XRay_Voltage = 50;
[MyConfigComment("X高压电流")]
public static MyConfig<double> XRay_Current = 0.6;
[MyConfigComment("X高压点亮后延迟,毫秒")]
public static MyConfig<int> XRay_Light_Delay = 2500;
} }
} }
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DeviceLibrary
{
using crc = OnlineStore.CodeResourceControl;
public partial class FilterMachine : MachineBase, IRobot
{
private Config_Filter _config;
public new Config_Filter Config
{
get => _config;
set
{
base.Config = value;
_config = value;
}
}
public override string DeviceName { get; } = "分盘线";
public bool canRunning { get; set; }
public bool isBusy { get; set; }
public bool isAlarm { get; set; }
//public RunStatus runStatus { get; set; }
//public bool UserPause { get; set; }
public bool IgnoreSafecheck { get; set; }
public bool IgnoreGratingSignal { get; set; }
public int NGBox_Count { get => nGBox_Count; set { nGBox_Count = value; ConfigHelper.Config.Set("NGBox_Count", value); } }
public int MSDBox_Count { get => mSDBox_Count; set { mSDBox_Count = value; ConfigHelper.Config.Set("MSDBox_Count", value); } }
public int PaperBox_Count { get => paperBox_Count; set { paperBox_Count = value; ConfigHelper.Config.Set("PaperBox_Count", value); } }
private int nGBox_Count = 0;
private int mSDBox_Count = 0;
private int paperBox_Count = 0;
public bool Init(out string msg)
{
msg = "";
try
{
string configFile = "config\\FilterConfig.csv";
Config = new Config_Filter(0, "", configFile);
Config = (Config_Filter)CSVConfigReader.LoadConfig<IO_Filter_Type>(Config);
MoveInfo = new MoveInfo(DeviceName);
ResetMoveInfo = MoveInfo;
NGBox_Count = ConfigHelper.Config.Get("NGBox_Count", 0);
MSDBox_Count = ConfigHelper.Config.Get("MSDBox_Count", 0);
PaperBox_Count = ConfigHelper.Config.Get("PaperBox_Count", 0);
}
catch (Exception e)
{
msg = e.Message;
return false;
}
return true;
}
protected override void LoopProcess()
{
mstart = true;
while (mstart)
{
try
{
//HomeReset();
canRunning = DeviceCheck();
if (canRunning)
{
//BtnProcess();
canRunning = SafeCheck();
}
Thread.Sleep(stepDelaytime);
if (!canRunning || !mstart)
continue;
if (runStatus == RunStatus.Running)
{
WorkProcess();
}
else if (runStatus == RunStatus.HomeReset)
{
HomeReset();
}
}
catch (Exception ex)
{
Msg.add(ex.Message, MsgLevel.warning);
LogUtil.error(DeviceName + " " + ex.ToString());
}
finally
{
ProcessMsgEventFire(Msg);
//ProcessMoveinfoEventFire(MoveInfo.List);
Msg.Clear();
}
}
LogUtil.info($"{DeviceName} 主线程已退出.");
}
public bool DeviceCheck()
{
bool ok = true;
if (alarmType == AlarmType.SuddenStop)
{
Msg.add(crc.GetString("system_need_reset","系统需要重置"), MsgLevel.warning);
ok = false;
}
if (NGBox_Count >= Config.NG_BOX_MAXCOUNT) {
Msg.add(crc.GetString("ng_box_full", "NG箱已满"), MsgLevel.warning);
ok = false;
}
if (MSDBox_Count >= Config.MSD_BOX_MAXCOUNT)
{
Msg.add(crc.GetString("msd_box_full", "MSD箱已满"), MsgLevel.warning);
ok = false;
}
if (PaperBox_Count >= Config.PAPER_BOX_MAXCOUNT)
{
Msg.add(crc.GetString("paper_box_full", "Paper箱已满"), MsgLevel.warning);
ok = false;
}
if (alarmType != AlarmType.SuddenStop)
{
TimeSpan span = DateTime.Now - checkAlarmTime;
//在回原点,复位,出入库时,检测报警间隔减小
if ((!runStatus.Equals(RunStatus.Stop) && span.TotalSeconds > 3) || span.TotalSeconds > 1)
{
foreach (ConfigMoveAxis configMoveAxis in Config.moveAxisList)
{
if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1)
{
Msg.add(crc.GetString("axis_run_alert","{0}:运动报警", configMoveAxis.Explain), MsgLevel.warning);
ok = false;
LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
}
}
}
}
return ok;
}
public void BeginHomeReset(bool firstRun = false)
{
if (!firstRun)
{
StopMove();
Thread.Sleep(500);
}
OpenAllServo();
alarmType = AlarmType.None;
runStatus = RunStatus.HomeReset;
ResetMoveInfo.NewMove(MoveStep.H01_HomeReset);
ResetMoveInfo.log("开始回原");
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
private void HomeReset()
{
if (CheckWait(ResetMoveInfo))
return;
switch (ResetMoveInfo.MoveStep)
{
case MoveStep.H01_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset);
ResetMoveInfo.log("正在回原, 所有阻挡上升");
CylinderMove(ResetMoveInfo, IO_Filter_Type.NG_TaryStop_Down, IO_Filter_Type.NG_TaryStop_Up, IO_VALUE.HIGH);
CylinderMove(ResetMoveInfo, IO_Filter_Type.Paper_TaryStop_Down, IO_Filter_Type.Paper_TaryStop_Up, IO_VALUE.HIGH);
CylinderMove(ResetMoveInfo, IO_Filter_Type.MSD_TaryStop_Down, IO_Filter_Type.MSD_TaryStop_Up, IO_VALUE.HIGH);
break;
case MoveStep.H02_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H03_HomeReset);
ResetMoveInfo.log("正在回原");
IOMove(IO_Filter_Type.Line3_Run, IO_VALUE.HIGH);
break;
case MoveStep.H03_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H04_HomeReset);
ResetMoveInfo.log("正在回原");
CylinderMove(ResetMoveInfo, IO_Filter_Type.NG_GetOut_Bck, IO_Filter_Type.NG_GetOut_Fwd, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Filter_Type.Paper_GetOut_Bck, IO_Filter_Type.Paper_GetOut_Fwd, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Filter_Type.MSD_GetOut_Bck, IO_Filter_Type.MSD_GetOut_Fwd, IO_VALUE.LOW);
break;
case MoveStep.H04_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H05_HomeReset);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
break;
case MoveStep.H05_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.HEND_HomeReset);
ResetMoveInfo.log("正在回原, 所有阻挡下升");
CylinderMove(ResetMoveInfo, IO_Filter_Type.NG_TaryStop_Down, IO_Filter_Type.NG_TaryStop_Up, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Filter_Type.Paper_TaryStop_Down, IO_Filter_Type.Paper_TaryStop_Up, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Filter_Type.MSD_TaryStop_Down, IO_Filter_Type.MSD_TaryStop_Up, IO_VALUE.LOW);
IOMove(IO_Filter_Type.Line3_Run, IO_VALUE.LOW);
break;
case MoveStep.HEND_HomeReset:
ResetMoveInfo.log("回源完成");
ResetMoveInfo.EndMove();
MoveInfo.NewMove(MoveStep.Filter_01_WaitReel);
runStatus = RunStatus.Running;
break;
}
}
}
}
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DeviceLibrary
{
public partial class LabelMachine
{
Led AlarmLed;
Led RunningLed;
System.Threading.Timer ledtimer;
private void LedProcessInit()
{
AlarmLed = new Led(Config.DOList[IO_Label_Type.Alarm_Led].GetIOAddr(),DeviceName);
RunningLed = new Led(Config.DOList[IO_Label_Type.Run_Led].GetIOAddr(), DeviceName);
ledtimer = new System.Threading.Timer(new TimerCallback(LedProcess), null, 0, 1000);
GC.KeepAlive(ledtimer);
}
void LedProcess(object o)
{
AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off;
if (runStatus == RunStatus.Running)
{
RunningLed.LedState = LedState.on;
//无法运行,量报警灯
if (!canRunning)
{
AlarmLed.LedState = LedState.on;
RunningLed.LedState = LedState.off;
}
if (MoveInfo.MoveStep == MoveStep.Lbl_WaitCheckLabel)
{
AlarmLed.LedState = LedState.blink;
}
else
{
}
}
else if (runStatus == RunStatus.HomeReset)
{
RunningLed.LedState = LedState.blink;
}
if (alarmType != AlarmType.None)
{
AlarmLed.LedState = LedState.on;
}
if (UserPause)
{
AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off;
//StandbyLed.LedState = LedState.blink;
}
Led.LedGroup[DeviceName].ForEach((x) => { x.run(); });
}
}
}
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DeviceLibrary
{
using crc = OnlineStore.CodeResourceControl;
public partial class LabelMachine : MachineBase, IRobot
{
private Config_Label _config;
public new Config_Label Config
{
get => _config; set
{
base.Config = value;
_config = value;
}
}
public override string DeviceName { get; } = "贴标机构";
public bool canRunning { get; set; }
public bool isBusy { get; set; }
public bool isAlarm { get; set; }
public bool DisableLabel { get; set; }
//public RunStatus runStatus { get; set; }
//public bool UserPause { get; set; }
public bool IgnoreSafecheck { get; set; }
public bool IgnoreGratingSignal { get; set; }
AxisBean Label_X_Axis;
AxisBean Label_Y_Axis;
AxisBean Label_Z_Axis;
AxisBean Label_R_Axis;
public MoveInfo SendOutMoveInfo;
public MoveInfo VacuumMoveInfo;
public bool Init(out string msg)
{
msg = "";
try
{
string configFile = "config\\LabelConfig.csv";
Config = new Config_Label(0, "", configFile);
Config = (Config_Label)CSVConfigReader.LoadConfig<IO_Label_Type>(Config);
#region 初始化伺服轴
Label_X_Axis = new AxisBean(Config.Label_X_Axis, DeviceName);
Label_Y_Axis = new AxisBean(Config.Label_Y_Axis, DeviceName);
Label_Z_Axis = new AxisBean(Config.Label_Z_Axis, DeviceName);
Label_R_Axis = new AxisBean(Config.Label_R_Axis, DeviceName);
#endregion
MoveInfo = new MoveInfo(DeviceName);
SendOutMoveInfo = new MoveInfo("贴标送出");
VacuumMoveInfo = new MoveInfo("贴标吸标");
SendOutMoveInfo.Hide = true;
VacuumMoveInfo.Hide = true;
ResetMoveInfo = MoveInfo;
LedProcessInit();
}
catch (Exception e)
{
msg = e.Message;
return false;
}
return true;
}
public override void Run()
{
base.Run();
IOMove(IO_Label_Type.Camera_Led, IO_VALUE.HIGH);
}
public override void Stop()
{
IOMove(IO_Label_Type.Camera_Led, IO_VALUE.LOW);
base.Stop();
}
protected override void LoopProcess()
{
mstart = true;
while (mstart)
{
try
{
canRunning = DeviceCheck();
if (canRunning)
{
//BtnProcess();
canRunning = SafeCheck();
}
Thread.Sleep(stepDelaytime);
if (!canRunning || !mstart)
continue;
if (runStatus == RunStatus.Running)
{
WorkProcess();
SendOutProcess();
VacuumLabelProcess();
}
else if (runStatus == RunStatus.HomeReset)
{
HomeReset();
}
}
catch (Exception ex)
{
Msg.add(ex.Message, MsgLevel.warning);
LogUtil.error(DeviceName + " " + ex.ToString());
Thread.Sleep(stepDelaytime*5);
}
finally
{
ProcessMsgEventFire(Msg);
//ProcessMoveinfoEventFire(MoveInfo.List);
Msg.Clear();
}
}
LogUtil.info($"{DeviceName} 主线程已退出.");
}
public bool DeviceCheck()
{
bool ok = true;
if (IOManager.GetDIValue("", 0, 45).Equals(IO_VALUE.LOW))
{
Alarm(AlarmType.SuddenStop);
Msg.add(crc.GetString("emergency_stop", "急停中"), MsgLevel.warning);
Thread.Sleep(1000);
ok = false;
}
else if (alarmType == AlarmType.SuddenStop)
{
Msg.add(crc.GetString("system_need_reset", "系统需要重置"), MsgLevel.warning);
Thread.Sleep(1000);
ok = false;
}
if (alarmType != AlarmType.SuddenStop)
{
TimeSpan span = DateTime.Now - checkAlarmTime;
//在回原点,复位,出入库时,检测报警间隔减小
if ((!runStatus.Equals(RunStatus.Stop) && span.TotalSeconds > 3) || span.TotalSeconds > 1)
{
if (Config.moveAxisList != null)
{
foreach (ConfigMoveAxis configMoveAxis in Config.moveAxisList)
{
if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1)
{
Msg.add(crc.GetString("axis_run_alert", "{0}:运动报警", configMoveAxis.Explain), MsgLevel.warning);
ok = false;
LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
}
}
}
}
}
return ok;
}
public void BeginHomeReset(bool firstRun = false)
{
if (!firstRun)
{
StopMove();
Thread.Sleep(500);
}
OpenAllServo();
alarmType = AlarmType.None;
runStatus = RunStatus.HomeReset;
ResetMoveInfo.NewMove(MoveStep.H01_HomeReset);
ResetMoveInfo.log("开始回原");
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
private void HomeReset()
{
if (CheckWait(ResetMoveInfo))
return;
switch (ResetMoveInfo.MoveStep)
{
case MoveStep.H01_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset);
ResetMoveInfo.log("正在回原, 皮带线阻挡上升,贴标机构阻挡上升,z轴");
CylinderMove(ResetMoveInfo, IO_Label_Type.TrayStop_Down, IO_Label_Type.TrayStop_Up);
CylinderMove(ResetMoveInfo, IO_Label_Type.Label_Stop_Down, IO_Label_Type.Label_Stop_Up);
Label_Z_Axis.HomeMove(ResetMoveInfo);
break;
case MoveStep.H02_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H03_HomeReset);
ResetMoveInfo.log("正在回原 y轴");
IOMove(IO_Label_Type.Line1_Run, IO_VALUE.HIGH);
IOMove(IO_Label_Type.Line2_Run, IO_VALUE.HIGH);
Label_X_Axis.HomeMove(ResetMoveInfo);
break;
case MoveStep.H03_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H04_HomeReset);
ResetMoveInfo.log("正在回原 xyzr轴");
Label_R_Axis.HomeMove(ResetMoveInfo);
Label_Y_Axis.HomeMove(ResetMoveInfo);
break;
case MoveStep.H04_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H05_HomeReset);
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
break;
case MoveStep.H05_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H06_HomeReset);
ResetMoveInfo.log("正在回原 等待2秒钟");
Label_R_Axis.AbsMove(ResetMoveInfo, Config.Label_R_P2, Config.Label_R_P2_speed);
Label_Z_Axis.AbsMove(ResetMoveInfo, Config.Label_Z_P1, Config.Label_Z_P1_speed);
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
break;
case MoveStep.H06_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H07_HomeReset);
ResetMoveInfo.log("正在回原 xyzr轴到待机点");
Label_Y_Axis.AbsMove(ResetMoveInfo, Config.Label_Y_P2, Config.Label_Y_P2_speed);
break;
case MoveStep.H07_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.HEND_HomeReset);
ResetMoveInfo.log("正在回原 线体停止,阻挡下降");
Label_X_Axis.AbsMove(ResetMoveInfo, Config.Label_X_P2, Config.Label_X_P2_speed);
IOMove(IO_Label_Type.Line1_Run, IO_VALUE.LOW);
IOMove(IO_Label_Type.Line2_Run, IO_VALUE.LOW);
CylinderMove(ResetMoveInfo, IO_Label_Type.TrayStop_Up, IO_Label_Type.TrayStop_Down);
CylinderMove(ResetMoveInfo, IO_Label_Type.Label_Stop_Up, IO_Label_Type.Label_Stop_Down);
break;
case MoveStep.HEND_HomeReset:
ResetMoveInfo.log("回源完成");
ResetMoveInfo.EndMove();
MoveInfo.NewMove(MoveStep.Lbl_01_Wait_ATray);
runStatus = RunStatus.Running;
break;
}
}
public IO_VALUE Label_TaryStop_Check
{
get => IOValue(IO_Label_Type.Label_TaryStop_Check);
}
public void InLineRunControl(IO_VALUE iO_VALUE)
{
IOMove(IO_Label_Type.Line1_Run, iO_VALUE);
}
}
}
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLibrary
{
using crc = OnlineStore.CodeResourceControl;
public partial class LabelMachine
{
public void InitPrint()
{
RobotManage.PrintBean.PrintStatusChanged += Print_PrintStatusChanged;
RobotManage.LoadPrintSetting();
}
public Asa.PrintLabel.PrinterStatus LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
void Print_PrintStatusChanged(Asa.PrintLabel.PrinterStatus sta, string msg)
{
if (sta.Equals(LastPrintStatus).Equals(false))
{
LogUtil.info("PrintLabel 收到打印机新状态:【" + sta + "】【" + msg + "】,替换原来的状态【" + LastPrintStatus + "】 ");
}
else
{
if (sta == Asa.PrintLabel.PrinterStatus.Idle)
{
Task.Run(() => {
while (true)
{
if (MoveInfo.IsStep(MoveStep.Lbl_WaitPrint))
{
MoveInfo.NextMoveStep(MoveStep.Lbl_Printted);
break;
}
Task.Delay(500).Wait();
}
});
}
LogUtil.info(" PrintLabel 收到打印机新状态:【" + sta + "】【" + msg + "】,与之前状态一样 ");
}
LastPrintStatus = sta;
}
public string LastPrintLabel = "";
void StartPrintLabel(string wareCode, string wareCount, bool ReverseLabel=false)
{
try
{
LastPrintStatus = Asa.PrintLabel.PrinterStatus.Unknown;
LogUtil.info("调用 PrintLabel 打印标签 StartPrintLabel ,[" + wareCode + "] [" + wareCount + "] 开始");
Dictionary<string, string> text = new Dictionary<string, string>();
text.Add("Code", wareCode);
text.Add("Count", wareCount);
text.Add("DateTime", System.DateTime.Now.ToString("F"));
text.Add("FactoryCode", "");
LastPrintLabel = wareCode;
RobotManage.PrintBean.Rotate180 = ReverseLabel;
RobotManage.PrintBean.Print(text);
LogUtil.info("PrintLabel 打印标签 StartPrintLabel 结束 ");
}
catch (Exception ex)
{
LogUtil.error("PrintLabel 打印标签 StartPrintLabel 错误:" + ex.ToString());
}
}
public Task DoPrint(ReelParam labelParam, bool ReverseLabel = false)
{
LogUtil.info($"调用 PrintLabel 打印标签 WareCode:{labelParam.WareCode}, QTY:{labelParam.QTY}, ReverseLabel:{ReverseLabel}");
StartPrintLabel(labelParam.WareCode, labelParam.QTY.ToString(), ReverseLabel);
return Task.Run(() =>
{ });
}
/// <summary>
/// 扫码线程
/// </summary>
Task<(List<CodeInfo>,Bitmap)> ScanTask;
Task<(Point, double, bool)> ScanTask2;
Task<(List<CodeInfo>, Bitmap)> ScanCode()
{
MoveInfo.log("开始贴标扫码线程");
return Task.Run(new Func<(List<CodeInfo>, Bitmap)>(() =>
{
try
{
Bitmap bitmap;
//IOMove(IO_Label_Type.Camera_Led, IO_VALUE.HIGH);
//Task.Delay(10).Wait();
List<CodeInfo> LastCodeList = CodeManager.CameraScan(new List<string> { Config.CameraName },out bitmap);
if (LastCodeList.Count <= 0)
{
Task.Delay(500).Wait();
LastCodeList = CodeManager.CameraScan(new List<string> { Config.CameraName });
}
//IOMove(IO_Label_Type.Camera_Led, IO_VALUE.LOW);
return (LastCodeList,bitmap);
}
catch {
return (new List<CodeInfo>(),null);
}
}));
}
Task<(Point, double, bool)> ScanCode2()
{
MoveInfo.log("开始贴标扫码线程");
return Task.Run(new Func<(Point, double, bool)>(() =>
{
try
{
Bitmap bitmap;
Task.Delay(700).Wait();
List<CodeInfo> LastCodeList = CodeManager.CameraScan(new List<string> { Config.CameraName }, out bitmap);
if (LastCodeList.Count <= 0)
{
Task.Delay(1000).Wait();
LastCodeList = CodeManager.CameraScan(new List<string> { Config.CameraName }, out bitmap);
}
if (LastCodeList.Count == 0)
{
MoveInfo.NextMoveStep(MoveStep.Lbl_WaitCheckLabel);
MoveInfo.log($"未识别到有效二维码");
WaitCheckLabeltype = WaitCheckLabeltypeE.Scan_QRCode_Fail;
}
else
{
if (MoveInfo.ReelParam.WareCode != LastCodeList[0].CodeStr)
{
MoveInfo.NextMoveStep(MoveStep.Lbl_WaitCheckLabel);
Msg.add(crc.GetString("label_qrcode_different", "扫描到的Reelid与发出打印的可能不一致"), MsgLevel.warning);
MoveInfo.log($"扫描到的Reelid与发出打印的不一致,系统:{MoveInfo.ReelParam.WareCode},实际:{LastCodeList[0].CodeStr}");
WaitCheckLabeltype = WaitCheckLabeltypeE.Scan_Code_And_Print_are_different;
//MoveInfo.ReelParam.IsNg = true;
//MoveInfo.ReelParam.NgMsg = "扫描到的Reelid与发出打印的不一致";
//MoveInfo.ReelParam.logresult();
}
else
{
//MoveInfo.NextMoveStep(MoveStep.Lbl_Printted);
MoveInfo.ReelParam.codeInfos = LastCodeList;
MoveInfo.log($"已完成扫码, Count={LastCodeList.Count}");
MoveInfo.ReelParam.logresult();
}
MoveInfo.ReelParam.logresult();
//标签坐标
Point Label_Pix_Point = new Point(MoveInfo.ReelParam.codeInfos[0].X, MoveInfo.ReelParam.codeInfos[0].Y);
//照片坐标反转180度
var x = 5472 - Label_Pix_Point.X;
var y = 3648 - Label_Pix_Point.Y;
Label_Pix_Point.X = x;
Label_Pix_Point.Y = y;
//图像也旋转180度
bitmap.RotateFlip(RotateFlipType.Rotate180FlipNone);
(p1, labelRAxisPos, ReverseLabel) = ClacLabel2(Label_Pix_Point, bitmap, MoveInfo.ReelParam);
return (p1, labelRAxisPos, ReverseLabel);
}
return (Point.Empty, 0, false);
}
catch
{
return (Point.Empty, 0, false);
}
}));
}
}
}
...@@ -16,7 +16,7 @@ namespace DeviceLibrary ...@@ -16,7 +16,7 @@ namespace DeviceLibrary
public virtual bool UserPause { get; set; } public virtual bool UserPause { get; set; }
public RunStatus runStatus { get; set; } = RunStatus.Stop; public RunStatus runStatus { get; set; } = RunStatus.Stop;
protected MoveInfo ResetMoveInfo; protected MoveInfo ResetMoveInfo;
public MoveInfo MoveInfo; public MoveInfo MoveInfo;
protected List<Msg> Msg = new List<Msg>(); protected List<Msg> Msg = new List<Msg>();
//public delegate void Event(List<Msg> msg); //public delegate void Event(List<Msg> msg);
public event EventHandler<List<Msg>> ProcessMsgEvent; public event EventHandler<List<Msg>> ProcessMsgEvent;
...@@ -87,8 +87,7 @@ namespace DeviceLibrary ...@@ -87,8 +87,7 @@ namespace DeviceLibrary
//lastSafeCheckStatus = false; //lastSafeCheckStatus = false;
var al = new Dictionary<string, List<AxisBean>>(AxisBean.List); var al = new Dictionary<string, List<AxisBean>>(AxisBean.List);
AxisBean.StopMultiAxis(AxisBean.List[RobotManage.labelMachine.DeviceName]); AxisBean.StopMultiAxis(AxisBean.List[RobotManage.xrayMachine.DeviceName]);
AxisBean.StopMultiAxis(AxisBean.List[RobotManage.t1Machine.DeviceName]);
//AxisBean.StopMultiAxis(); //AxisBean.StopMultiAxis();
MoveInfo.List.ForEach((m) => { m.CanWhileCount = 5; }); MoveInfo.List.ForEach((m) => { m.CanWhileCount = 5; });
...@@ -262,8 +261,6 @@ namespace DeviceLibrary ...@@ -262,8 +261,6 @@ namespace DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W008_BatchAxis)) else if (wait.WaitType.Equals(WaitEnum.W008_BatchAxis))
{ {
AxisBean axisBean=null; AxisBean axisBean=null;
axisBean = RobotManage.t1Machine.T_Batch_Axis;
//if (wait.AxisInfo.ProName == "Right_Batch_Axis") //if (wait.AxisInfo.ProName == "Right_Batch_Axis")
// axisBean = Right_Batch_Axis; // axisBean = Right_Batch_Axis;
//else //else
......
...@@ -28,64 +28,13 @@ namespace DeviceLibrary ...@@ -28,64 +28,13 @@ namespace DeviceLibrary
Feeding_10_Wait_Reset, Feeding_10_Wait_Reset,
Lbl_01_Wait_ATray,
Lbl_02_StopUP,
Lbl_03_LineRun,
Lbl_03_StopDown_and_wait,
Lbl_04_LineStopWait,
Lbl_04_LineStop,
Lbl_05_ScanCode,
Lbl_05_Wait,
Lbl_06_Get_Reelinfo,
//Lbl_01_StartPrint,
Lbl_WaitCheckLabel,
Lbl_WaitPrint,
Lbl_Printted,
Lbl01,
Lbl02,
Lbl03,
Lbl04,
Lbl05,
Lbl06,
Lbl10,
Lbl11_wait,
Lbl11,
Lbl12,
Lbl13,
Lbl_BeginOut,
Lbl15,
Lbl16,
L30_LabelFinish,
Shelf_EmptyIn_WaitWorkLeave,
Shelf_10_EmptyIn_Wait_StopDown,
Shelf_10_EmptyIn_StopDown,
Shelf_11_EmptyIn_WaitTime,
Shelf_11_EmptyIn_LiftUp,
Shelf_13_EmptyIn_SidingRun,
Shelf_14_EmptyIn_LiftDown,
Shelf_15_EmptyIn_LocationUp,
Shelf_16_EmptyIn_ForkFwd,
Shelf_17_EmptyIn_CheckLocation,
Shelf_18_EmptyIn_WaitManCheck,
Shelf_19_EmptyIn_BatchUp,
Shelf_20_EmptyIn_ShelfReady,
Shelf_21_EmptyIn_TrayDown,
Shelf_Work_WaitShelfLeave,
Shelf_Out_Wait,
Shelf_30_Out_BatchDown,
Shelf_31_Out_ForkBck,
Shelf_32_Out_LocationDown,
Shelf_33_Out_OutStopDown,
Shelf_34_Out_OutStopDown,
Shelf_35_Out_OutLineRun,
Shelf_36_Out_OutLineRun,
XRay_01_LocationDown, XRay_01_LocationDown,
XRay_02_RunIn, XRay_02_RunIn,
XRay_03_CloseDoor, XRay_03_CloseDoor,
XRay_04_OpenXray, XRay_04_OpenXray,
XRay_04_CheckXray,
XRay_05_GetImage, XRay_05_GetImage,
XRay_06_WaitMatchPN, XRay_06_WaitMatchPN,
XRay_06_WaitMatchPN2, XRay_06_WaitMatchPN2,
...@@ -100,49 +49,20 @@ namespace DeviceLibrary ...@@ -100,49 +49,20 @@ namespace DeviceLibrary
XRay_Extra_04, XRay_Extra_04,
XRay_End, XRay_End,
Filter_01_WaitReel, SideMove_01,
Filter_02_WaitReel, SideMove_02,
Filter_10_NGReel_PushOut, SideMove_03,
Filter_11_NGReel_End, SideMove_04,
Filter_20_MSDReel_wait, SideMove_05,
Filter_21_MSDReel_wait, SideMove_06,
Filter_22_MSDReel_PushOut, SideMove_07,
Filter_23_MSDReel_End, SideMove_08,
Filter_30_PaperReel_wait, SideMove_09,
Filter_31_PaperReel_PushOut, SideMove_10,
Filter_32_PaperReel_PushOut, SideMove_11,
Filter_33_PaperReel_End, SideMove_12,
Filter_40_Reel_through_wait, SideMove_13,
Filter_41_Reel_through_wait, SideMove_14,
Filter_41_Reel_through,
Filter_42_Reel_through_Wait,
Filter_END,
T1_01_WaitReel,
T1_02_WaitReelInpos,
T1_03_LocationUp,
T1_04_DownToReel,
T1_05_ClampReel,
T1_06_UpToTop,
T1_07_PanToOut,
T1_08_DownToShelf,
T1_09_ReleaseReel,
T1_10_PutReelFinish,
LblSendOut_01,
LblSendOut_02,
LblSendOut_03,
LblVacuum_01,
LblVacuum_02,
LblVacuum_03,
LblVacuum_04,
LblVacuum_end,
LblVacuum_failure,
LblVacuum_printfail,
T1_08_UpReelOk,
T1_08_UpReelFail,
T1_09_ReleaseReel_Fail,
T1_09_ReleaseReel_Test,
Shelf_19_LocationString,
Shelf_19_LocationString_wait,
} }
......
...@@ -18,10 +18,7 @@ namespace DeviceLibrary ...@@ -18,10 +18,7 @@ namespace DeviceLibrary
public static class RobotManage public static class RobotManage
{ {
public static XRayMachine xrayMachine; public static XRayMachine xrayMachine;
public static LabelMachine labelMachine; public static XRay XRay=new XRay("XRay", XRayType.Spellman_RS232);
public static FilterMachine filterMachine;
public static T1Machine t1Machine;
public static XRay XRay=new XRay("XRay");
public static XrayImage xrayImage = new Asa.XrayImage("XrayImage", XrayImage.DeviceType.HAOBO_V2); public static XrayImage xrayImage = new Asa.XrayImage("XrayImage", XrayImage.DeviceType.HAOBO_V2);
public static Config_XRay Config; public static Config_XRay Config;
public static bool IsLoadOk = true; public static bool IsLoadOk = true;
...@@ -34,30 +31,19 @@ namespace DeviceLibrary ...@@ -34,30 +31,19 @@ namespace DeviceLibrary
public delegate void LoadFinish(bool state,string msg); public delegate void LoadFinish(bool state,string msg);
public static event LoadFinish LoadFinishEvent; public static event LoadFinish LoadFinishEvent;
public static bool isRunning = false; public static bool isRunning = false;
public static Asa.PrintLabel PrintBean;
public static ElectricGripper electricGripper;
public static List<IRobot> robots = new List<IRobot>(); public static List<IRobot> robots = new List<IRobot>();
public static WistonAgvClient wistonAgvClient;
public static bool offlinemode = false; public static bool offlinemode = false;
public static ReelLocation offlinereelLocation = new ReelLocation(); public static ReelLocation offlinereelLocation = new ReelLocation();
public static LineRunMonitor Line1;
public static LineRunMonitor Line2;
public static int ProductivityCount = 0; public static int ProductivityCount = 0;
public static int DefectiveCount = 0; public static int DefectiveCount = 0;
//static string baseDir = Application.StartupPath;
public static void Init() { public static void Init() {
try try
{ {
string msgs = ""; string msgs = "";
xrayMachine = new XRayMachine(); xrayMachine = new XRayMachine();
labelMachine = new LabelMachine();
filterMachine = new FilterMachine();
t1Machine = new T1Machine();
wistonAgvClient = new WistonAgvClient(); robots.AddRange(new IRobot[] { xrayMachine });
robots.AddRange(new IRobot[] { xrayMachine, labelMachine, filterMachine, t1Machine });
//robots.AddRange(new IRobot[] { xrayMachine }); //robots.AddRange(new IRobot[] { xrayMachine });
robots.ForEach((device)=> { robots.ForEach((device)=> {
LogUtil.info(device.DeviceName + " init"); LogUtil.info(device.DeviceName + " init");
...@@ -70,9 +56,7 @@ namespace DeviceLibrary ...@@ -70,9 +56,7 @@ namespace DeviceLibrary
}); });
CodeManager.LoadConfig(); CodeManager.LoadConfig();
PrintBean = new Asa.PrintLabel(Application.StartupPath + "\\Label",100); if (!XRay.Open(Setting_Init.XRay_Port, string.Format("{0:yyyy-MM-dd}", DateTime.Now)))
labelMachine.InitPrint();
if (!XRay.Open(ConfigHelper.Config.Get("XRay_Port"), string.Format("{0:yyyy-MM-dd}", DateTime.Now)))
{ {
msgs += crc.GetString("device_xray_open_failed","X光管通讯失败:{0}\n", ConfigHelper.Config.Get("XRay_Port")); msgs += crc.GetString("device_xray_open_failed","X光管通讯失败:{0}\n", ConfigHelper.Config.Get("XRay_Port"));
IsLoadOk = false; IsLoadOk = false;
...@@ -82,35 +66,24 @@ namespace DeviceLibrary ...@@ -82,35 +66,24 @@ namespace DeviceLibrary
Thread.Sleep(500); Thread.Sleep(500);
if (!XRay.SetVC(ConfigHelper.Config.Get("XRay_Voltage"), ConfigHelper.Config.Get("XRay_Current"))) if (!XRay.SetVC(Setting_Init.XRay_Voltage.ToString(), Setting_Init.XRay_Current.ToString()))
{ {
msgs += crc.GetString("device_xray_setvc_failed", "X光电压电流设置失败:{0},{1}\n", ConfigHelper.Config.Get("XRay_Voltage"), ConfigHelper.Config.Get("XRay_Current")); msgs += crc.GetString("device_xray_setvc_failed", "X光电压电流设置失败:{0},{1}\n", Setting_Init.XRay_Voltage.ToString(), Setting_Init.XRay_Current.ToString());
IsLoadOk = false; IsLoadOk = false;
} }
else else
LogUtil.info($"xray V:{ConfigHelper.Config.Get("XRay_Voltage")} ,C:{ConfigHelper.Config.Get("XRay_Current")} set ok"); LogUtil.info($"xray V:{Setting_Init.XRay_Voltage} ,C:{Setting_Init.XRay_Current} set ok");
if (!xrayImage.Open()) { if (!xrayImage.Open()) {
msgs += crc.GetString("device_xrayimage_open_failed", $"图像平板打开失败\n"); msgs += crc.GetString("device_xrayimage_open_failed", $"图像平板打开失败\n");
IsLoadOk = false; IsLoadOk = false;
} }
//xrayImage.Close();
var ElectricGripperPort = ConfigHelper.Config.Get("ElectricGripperPort");
electricGripper = new ElectricGripper(ElectricGripperPort);
if (!electricGripper.OpenPort()) {
msgs += crc.GetString("device_electricGripper_open_failed", "电夹爪通讯失败:{0}\n", ElectricGripperPort);
IsLoadOk = false;
}
electricGripper.HomeReset();
//mainMachine = new MainMachine(RobotManage.Config); //mainMachine = new MainMachine(RobotManage.Config);
if (!IOManager.ConnectionIO()) if (!IOManager.ConnectionIO())
{ {
IsLoadOk = false; IsLoadOk = false;
msgs += crc.GetString("device_io_open_failed", "IO板卡初始化失败\n"); msgs += crc.GetString("device_io_open_failed", "IO板卡初始化失败\n");
} }
Line1 = new LineRunMonitor("line1", labelMachine.Config.DOList[IO_Label_Type.Line1_Run].GetIOAddr());
Line2 = new LineRunMonitor("line2", labelMachine.Config.DOList[IO_Label_Type.Line2_Run].GetIOAddr());
LogUtil.info($"XRay StartDate:{UseData.GetStartDateTime},TotalSecond:{UseData.GetTotalUseSeconds},TotalTimes:{UseData.GetTimes}"); LogUtil.info($"XRay StartDate:{UseData.GetStartDateTime},TotalSecond:{UseData.GetTotalUseSeconds},TotalTimes:{UseData.GetTimes}");
var wiston_spnlist = ConfigHelper.Config.Get<string[]>("wiston_spnlist"); var wiston_spnlist = ConfigHelper.Config.Get<string[]>("wiston_spnlist");
...@@ -167,7 +140,6 @@ namespace DeviceLibrary ...@@ -167,7 +140,6 @@ namespace DeviceLibrary
public static void ShutDown() { public static void ShutDown() {
LogUtil.info("开始关闭系统."); LogUtil.info("开始关闭系统.");
IOManager.CloseAllConnection(); IOManager.CloseAllConnection();
electricGripper.ClosePort();
} }
public static void UserPause(bool userpause) { public static void UserPause(bool userpause) {
//xrayMachine.UserPause = userpause; //xrayMachine.UserPause = userpause;
...@@ -177,14 +149,5 @@ namespace DeviceLibrary ...@@ -177,14 +149,5 @@ namespace DeviceLibrary
else else
LogUtil.info("用户取消暂停"); LogUtil.info("用户取消暂停");
} }
public static void LoadPrintSetting()
{
string PrintName = ConfigHelper.Config.Get(Setting_Init.PrinterName);
string labelName = ConfigHelper.Config.Get(Setting_Init.LabelName);
PrintBean.LoadLabel(labelName);
PrintBean.Printer(PrintName, false);
LogUtil.info("PrintLabel 打印机初始化完成【" + labelName + "】【" + PrintName + "】");
}
} }
} }
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace DeviceLibrary
{
partial class T1Machine
{
Led AlarmLed;
Led RunningLed;
System.Threading.Timer ledtimer;
void LedProcessInit()
{
AlarmLed = new Led(Config.DOList[IO_T1_Type.Alarm_Led].GetIOAddr(), DeviceName);
RunningLed = new Led(Config.DOList[IO_T1_Type.Run_Led].GetIOAddr(), DeviceName);
ledtimer = new System.Threading.Timer(new TimerCallback(LedProcess), null, 0, 1000);
GC.KeepAlive(ledtimer);
}
void LedProcess(object o)
{
AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off;
if (runStatus == RunStatus.Running)
{
RunningLed.LedState = LedState.on;
//无法运行,量报警灯
if (!canRunning)
{
AlarmLed.LedState = LedState.on;
RunningLed.LedState = LedState.off;
}
if (ShelfInMoveInfo.MoveStep == MoveStep.T1_08_UpReelFail
|| ShelfInMoveInfo.MoveStep == MoveStep.T1_09_ReleaseReel_Fail) {
//AlarmLed.LedState = LedState.on;
Alarm(AlarmType.IoSingleTimeOut);
}
}
else if (runStatus == RunStatus.HomeReset)
{
RunningLed.LedState = LedState.blink;
}
if (alarmType != AlarmType.None || RobotManage.filterMachine.alarmType != AlarmType.None)
{
AlarmLed.LedState = LedState.on;
}
if (UserPause)
{
AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off;
//StandbyLed.LedState = LedState.blink;
}
Led.LedGroup[DeviceName].ForEach((x) => { x.run(); });
}
}
}
...@@ -79,10 +79,7 @@ namespace DeviceLibrary ...@@ -79,10 +79,7 @@ namespace DeviceLibrary
AlarmLed.LedState = LedState.on; AlarmLed.LedState = LedState.on;
} }
if (alarmType != AlarmType.None if (alarmType != AlarmType.None)
|| RobotManage.labelMachine.alarmType != AlarmType.None
|| RobotManage.filterMachine.alarmType != AlarmType.None
|| RobotManage.t1Machine.alarmType != AlarmType.None)
{ {
AlarmBuzzer.ON(); AlarmBuzzer.ON();
} }
......
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
namespace DeviceLibrary
{
using crc = OnlineStore.CodeResourceControl;
public partial class XRayMachine
{
int suckReelRetryTimes = 0;
ReelParam ExitLine_Reel_Info
{
get => JsonConvert.DeserializeObject<ReelParam>(ConfigHelper.Config.Get("Runtime_ExitLine_Reel"));
set => ConfigHelper.Config.Set("Runtime_ExitLine_Reel", value == null ? null : JsonConvert.SerializeObject(value));
}
ReelParam SideMove_Reel_Info
{
get => JsonConvert.DeserializeObject<ReelParam>(ConfigHelper.Config.Get("Runtime_SideMove_Reel"));
set => ConfigHelper.Config.Set("Runtime_SideMove_Reel", value == null ? null : JsonConvert.SerializeObject(value));
}
bool ExitLine_Reel_IsSafe {
get => SideMoveInfo.MoveStep == MoveStep.Wait || SideMoveInfo.MoveStep >= MoveStep.SideMove_07;
}
void SideMoveProcess()
{
if (CheckWait(SideMoveInfo))
return;
switch (SideMoveInfo.MoveStep)
{
case MoveStep.Wait:
if (IOValue(IO_XRay_Type.ExitLine_Reel_Check).Equals(IO_VALUE.HIGH) && ExitLine_Reel_Info != null)
{
SideMoveInfo.NextMoveStep(MoveStep.SideMove_01);
SideMoveInfo.ReelParam = ExitLine_Reel_Info.clone();
SideMoveInfo.log("检测到料盘到位");
}
else
{
Msg.add("横移机构等待料盘", MsgLevel.info);
}
break;
case MoveStep.SideMove_01:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_02);
ExitLine_Location_Axis.AbsMove(SideMoveInfo, Config.ExitLine_Location_P1, Config.ExitLine_Location_P1_speed);
SideMove_Z_Axis.AbsMove(SideMoveInfo, Config.SideMove_Z_P1, Config.SideMove_Z_P1_speed);
SideMoveInfo.log("出料档停退到P1");
suckReelRetryTimes = 0;
break;
case MoveStep.SideMove_02:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_03);
SideMove_X_Axis.AbsMove(SideMoveInfo, Config.SideMove_X_P2, Config.SideMove_X_P2_speed);
SideMoveInfo.log("横移到取料点P2");
break;
case MoveStep.SideMove_03:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_04);
var p2 = Config.SideMove_Z_P2 - (SideMoveInfo.ReelParam.PlateH - 8 - suckReelRetryTimes*4) * 1000;
SideMove_Z_Axis.AbsMove(SideMoveInfo, p2, Config.SideMove_Z_P2_speed);
CylinderMove(SideMoveInfo, IO_XRay_Type.SideMove_SuckerReel_Off, IO_XRay_Type.SideMove_SuckerReel_On, IO_VALUE.HIGH);
SideMoveInfo.log("升降轴到取料点P2:"+ p2);
break;
case MoveStep.SideMove_04:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_05);
break;
case MoveStep.SideMove_05:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_06);
SideMove_Z_Axis.AbsMove(SideMoveInfo, Config.SideMove_Z_P1, Config.SideMove_Z_P1_speed);
SideMoveInfo.log("升降轴到P1");
break;
case MoveStep.SideMove_06:
if (IOValue(IO_XRay_Type.SideMove_SuckerReel_Check).Equals(IO_VALUE.HIGH))
{
SideMoveInfo.NextMoveStep(MoveStep.SideMove_07);
SideMove_Reel_Info = ExitLine_Reel_Info.clone();
ExitLine_Reel_Info = null;
SideMoveInfo.log("吸盘成功");
}
else
{
if (suckReelRetryTimes > 3)
{
Msg.add("吸盘失败", MsgLevel.warning);
SideMoveInfo.log("吸盘失败, suckReelRetryTimes:" + suckReelRetryTimes);
}
else
{
SideMoveInfo.NextMoveStep(MoveStep.SideMove_03);
suckReelRetryTimes++;
SideMoveInfo.log("吸盘失败, suckReelRetryTimes:" + suckReelRetryTimes);
}
}
break;
case MoveStep.SideMove_07:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_08);
SideMove_X_Axis.AbsMove(SideMoveInfo, Config.SideMove_X_P3, Config.SideMove_X_P3_speed);
SideMoveInfo.log("横移到放料点P3");
break;
case MoveStep.SideMove_08:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_09);
SideMoveInfo.log("等待可以放料");
break;
case MoveStep.SideMove_09:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_10);
var p3 = Config.SideMove_Z_P3 - (SideMoveInfo.ReelParam.PlateH - 8 - suckReelRetryTimes * 4) * 1000;
SideMove_Z_Axis.AbsMove(SideMoveInfo, p3, Config.SideMove_Z_P3_speed);
SideMoveInfo.log("升降轴到放料点P2:" + p3);
break;
case MoveStep.SideMove_10:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_11);
CylinderMove(SideMoveInfo, IO_XRay_Type.SideMove_SuckerReel_Off, IO_XRay_Type.SideMove_SuckerReel_On, IO_VALUE.LOW);
SideMoveInfo.log("释放料盘");
break;
case MoveStep.SideMove_11:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_12);
SideMove_Reel_Info = null;
break;
case MoveStep.SideMove_12:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_13);
SideMove_Z_Axis.AbsMove(SideMoveInfo, Config.SideMove_Z_P1, Config.SideMove_Z_P1_speed);
SideMoveInfo.log("升降轴到P1");
break;
case MoveStep.SideMove_13:
SideMoveInfo.NextMoveStep(MoveStep.SideMove_14);
SideMove_X_Axis.AbsMove(SideMoveInfo, Config.SideMove_X_P1, Config.SideMove_X_P1_speed);
SideMoveInfo.log("横移到待机点P1");
break;
case MoveStep.SideMove_14:
SideMoveInfo.NextMoveStep(MoveStep.Wait);
break;
default:
break;
}
}
}
}
...@@ -63,7 +63,7 @@ namespace DeviceLibrary ...@@ -63,7 +63,7 @@ namespace DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
break; break;
case MoveStep.XRay_04_OpenXray: case MoveStep.XRay_04_OpenXray:
MoveInfo.NextMoveStep(MoveStep.XRay_05_GetImage); MoveInfo.NextMoveStep(MoveStep.XRay_04_CheckXray);
RobotManage.XRay.Start(); RobotManage.XRay.Start();
MoveInfo.log($"打开X光"); MoveInfo.log($"打开X光");
...@@ -75,7 +75,23 @@ namespace DeviceLibrary ...@@ -75,7 +75,23 @@ namespace DeviceLibrary
MoveInfo.log($"判断为需要多次拍照的料盘,PN:{pn}"); MoveInfo.log($"判断为需要多次拍照的料盘,PN:{pn}");
countlist.Clear(); countlist.Clear();
} }
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(ConfigHelper.Config.Get("xray_light_delay", 1000))); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(Setting_Init.XRay_Light_Delay));
break;
case MoveStep.XRay_04_CheckXray:
var runtimedata = RobotManage.XRay.GetRuntimeData();
if (runtimedata.HighVoltage > Setting_Init.XRay_Voltage * 0.8
&& runtimedata.BeamCurrent > Setting_Init.XRay_Current * 0.7)
{
MoveInfo.NextMoveStep(MoveStep.XRay_05_GetImage);
MoveInfo.log("X光点亮成功:" + runtimedata);
}
else if (MoveInfo.IsTimeOut(15))
{
MoveInfo.NextMoveStep(MoveStep.XRay_04_OpenXray);
RobotManage.XRay.Stop();
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
MoveInfo.log("X光超时未打到电压电流.重新打开:" + runtimedata);
}
break; break;
case MoveStep.XRay_05_GetImage: case MoveStep.XRay_05_GetImage:
if (GrabImage()) if (GrabImage())
...@@ -122,7 +138,7 @@ namespace DeviceLibrary ...@@ -122,7 +138,7 @@ namespace DeviceLibrary
case MoveStep.XRay_06_WaitMatchPN: case MoveStep.XRay_06_WaitMatchPN:
case MoveStep.XRay_06_WaitMatchPN2: case MoveStep.XRay_06_WaitMatchPN2:
Msg.add(crc.GetString("new_reel", "新物料,等待匹配算法!"), MsgLevel.warning); Msg.add(crc.GetString("new_reel", "新物料,等待匹配算法!"), MsgLevel.warning);
if (IOValue(IO_Label_Type.Reset_BTN).Equals(IO_VALUE.HIGH)) if (IOValue(IO_XRay_Type.Reset_BTN).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.log("用户确认继续1"); MoveInfo.log("用户确认继续1");
MoveInfo.NextMoveStep(MoveStep.XRay_07_TryAgain); MoveInfo.NextMoveStep(MoveStep.XRay_07_TryAgain);
...@@ -158,25 +174,25 @@ namespace DeviceLibrary ...@@ -158,25 +174,25 @@ namespace DeviceLibrary
MoveInfo.log($"打开出口门"); MoveInfo.log($"打开出口门");
break; break;
case MoveStep.XRay_09_SentToLabelStop: case MoveStep.XRay_09_SentToLabelStop:
if (RobotManage.labelMachine.TrayCanIN()) if (ExitLine_Reel_IsSafe && ExitLine_Reel_Info==null)
{ {
MoveInfo.NextMoveStep(MoveStep.XRay_10_CloseOutDoor); MoveInfo.NextMoveStep(MoveStep.XRay_10_CloseOutDoor);
MoveInfo.log($"打开出口门,送出到贴标机构"); MoveInfo.log($"打开出口门,送出到贴标机构");
Line_In_Axis.SpeedMove(Config.Line_In_Relative_speed*2); Line_In_Axis.SpeedMove(Config.Line_In_Relative_speed * 2);
RobotManage.Line1.LineRun("xray", 999, "XRay_09_SentToLabelStop"); IOMove(IO_XRay_Type.ExitLine_Reel_Run, IO_VALUE.HIGH);
MoveInfo.StopwatchLog(false, "开始送出"); MoveInfo.StopwatchLog(false, "开始送出");
} }
else if (MoveInfo.IsTimeOut(30)) { else if (MoveInfo.IsTimeOut(30))
Msg.add(crc.GetString("wait_xx_free", "等待{0}空闲", RobotManage.labelMachine.DeviceNameShow), MsgLevel.warning); {
Msg.add(crc.GetString("wait_xx_free", "等待{0}空闲", SideMoveInfo.Name), MsgLevel.warning);
MoveInfo.log("等待贴标机构入口空闲"); MoveInfo.log("等待贴标机构入口空闲");
} }
break; break;
case MoveStep.XRay_10_CloseOutDoor: case MoveStep.XRay_10_CloseOutDoor:
if (RobotManage.labelMachine.Tray_Check.Equals(IO_VALUE.HIGH)) if (IOValue(IO_XRay_Type.ExitLine_Reel_Check).Equals(IO_VALUE.HIGH))
{ {
//RobotManage.labelMachine.InLineRunControl(IO_VALUE.LOW); IOMove(IO_XRay_Type.ExitLine_Reel_Run, IO_VALUE.LOW);
RobotManage.Line1.LineStop("xray", "XRay_10_CloseOutDoor");
MoveInfo.NextMoveStep(MoveStep.XRay_11_GetCoutResult); MoveInfo.NextMoveStep(MoveStep.XRay_11_GetCoutResult);
MoveInfo.log($"关闭出口门,停止X光机内线体"); MoveInfo.log($"关闭出口门,停止X光机内线体");
Line_In_Axis.SuddenStop(); Line_In_Axis.SuddenStop();
...@@ -185,25 +201,26 @@ namespace DeviceLibrary ...@@ -185,25 +201,26 @@ namespace DeviceLibrary
} }
else if (MoveInfo.IsTimeOut(10)) else if (MoveInfo.IsTimeOut(10))
{ {
Msg.add(crc.GetString("wait_goto_xx", "等待料盘到达{0}",RobotManage.labelMachine.DeviceNameShow), MsgLevel.warning); Msg.add(crc.GetString("wait_goto_xx", "等待料盘到达{0}", SideMoveInfo.Name), MsgLevel.warning);
MoveInfo.log("等待料盘到达贴标线入口"); MoveInfo.log("等待料盘到达贴标线入口");
} }
break; break;
case MoveStep.XRay_11_GetCoutResult: case MoveStep.XRay_11_GetCoutResult:
if (GetResultTask == null || GetResultTask.IsCompleted) if (GetResultTask == null || GetResultTask.IsCompleted)
{ {
RobotManage.labelMachine.preReelParam = MoveInfo.ReelParam; ExitLine_Reel_Info = MoveInfo.ReelParam;
MoveInfo.NextMoveStep(MoveStep.XRay_End); MoveInfo.NextMoveStep(MoveStep.XRay_End);
MoveInfo.log($"获得点料结果 QTY:{MoveInfo.ReelParam.QTY}"); MoveInfo.log($"获得点料结果 QTY:{MoveInfo.ReelParam.QTY}");
MoveInfo.StopwatchLog(false, "获得点料结果"); MoveInfo.StopwatchLog(false, "获得点料结果");
} }
else if (MoveInfo.IsTimeOut(30)) { else if (MoveInfo.IsTimeOut(30))
{
MoveInfo.NextMoveStep(MoveStep.XRay_End); MoveInfo.NextMoveStep(MoveStep.XRay_End);
MoveInfo.log("获取点料结果超时"); MoveInfo.log("获取点料结果超时");
MoveInfo.ReelParam.IsNg = true; MoveInfo.ReelParam.IsNg = true;
MoveInfo.ReelParam.NgMsg = "获取点料结果超时"; MoveInfo.ReelParam.NgMsg = "获取点料结果超时";
MoveInfo.ReelParam.logresult(); MoveInfo.ReelParam.logresult();
RobotManage.labelMachine.preReelParam = MoveInfo.ReelParam; ExitLine_Reel_Info = MoveInfo.ReelParam;
} }
break; break;
case MoveStep.XRay_End: case MoveStep.XRay_End:
......
...@@ -23,6 +23,7 @@ namespace DeviceLibrary ...@@ -23,6 +23,7 @@ namespace DeviceLibrary
_config = value; _config = value;
} }
} }
public MoveInfo SideMoveInfo;
public override string DeviceName { get; } = "点料"; public override string DeviceName { get; } = "点料";
public bool canRunning { get; set; } public bool canRunning { get; set; }
public bool isBusy { get; set; } public bool isBusy { get; set; }
...@@ -34,6 +35,9 @@ namespace DeviceLibrary ...@@ -34,6 +35,9 @@ namespace DeviceLibrary
AxisBean Line_Entry_Axis; AxisBean Line_Entry_Axis;
AxisBean Line_In_Axis; AxisBean Line_In_Axis;
AxisBean ExitLine_Location_Axis;
AxisBean SideMove_X_Axis;
AxisBean SideMove_Z_Axis;
public bool Init(out string msg) public bool Init(out string msg)
{ {
...@@ -48,11 +52,15 @@ namespace DeviceLibrary ...@@ -48,11 +52,15 @@ namespace DeviceLibrary
#region 初始化伺服轴 #region 初始化伺服轴
Line_Entry_Axis = new AxisBean(Config.Line_Entry_Axis, DeviceName); Line_Entry_Axis = new AxisBean(Config.Line_Entry_Axis, DeviceName);
Line_In_Axis = new AxisBean(Config.Line_In_Axis, DeviceName); Line_In_Axis = new AxisBean(Config.Line_In_Axis, DeviceName);
ExitLine_Location_Axis = new AxisBean(Config.ExitLine_Location_Axis, DeviceName);
SideMove_X_Axis = new AxisBean(Config.SideMove_X_Axis, DeviceName);
SideMove_Z_Axis = new AxisBean(Config.SideMove_Z_Axis, DeviceName);
#endregion #endregion
MoveInfo = new MoveInfo(DeviceName); MoveInfo = new MoveInfo(DeviceName);
SideMoveInfo = new MoveInfo("移栽机构");
ResetMoveInfo = MoveInfo; ResetMoveInfo = MoveInfo;
LedProcessInit(); LedProcessInit();
Asa.XrayImage.setProcessLevel(4.0); //Asa.XrayImage.setProcessLevel(4.0);
IOMonitor.RegisterIO(IO_XRay_Type.Exit_Open, Config, IO_VALUE.LOW, delegate () { XRayDoorOpen(); }); IOMonitor.RegisterIO(IO_XRay_Type.Exit_Open, Config, IO_VALUE.LOW, delegate () { XRayDoorOpen(); });
IOMonitor.RegisterIO(IO_XRay_Type.Entry_Open, Config, IO_VALUE.LOW, delegate () { XRayDoorOpen(); }); IOMonitor.RegisterIO(IO_XRay_Type.Entry_Open, Config, IO_VALUE.LOW, delegate () { XRayDoorOpen(); });
AlarmBuzzer.SetOnOffAction(() => { IOMove(IO_XRay_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_XRay_Type.Alarm_Buzzer, IO_VALUE.LOW); }); AlarmBuzzer.SetOnOffAction(() => { IOMove(IO_XRay_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_XRay_Type.Alarm_Buzzer, IO_VALUE.LOW); });
...@@ -104,8 +112,8 @@ namespace DeviceLibrary ...@@ -104,8 +112,8 @@ namespace DeviceLibrary
if (runStatus == RunStatus.Running) if (runStatus == RunStatus.Running)
{ {
FeedingProcess(); FeedingProcess();
WorkProcess(); WorkProcess();
SideMoveProcess();
} }
else if (runStatus == RunStatus.HomeReset) else if (runStatus == RunStatus.HomeReset)
{ {
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,30,NG料盒最大容量,NG_BOX_MAXCOUNT,50,,,,,,,,,,,,
PRO,30,MSD料盒最大容量,MSD_BOX_MAXCOUNT,50,,,,,,,,,,,,
PRO,30,Paper料盒最大容量,PAPER_BOX_MAXCOUNT,50,,,,,,,,,,,,
DI,0,NG料阻挡料盘检测,NG_TaryStop_Check,26,HC,X26,,,,,,,,,,
DI,0,NG料阻挡上升端,NG_TaryStop_Up,27,HC,X27,,,,,,,,,,
DI,0,NG料阻挡下降端,NG_TaryStop_Down,28,HC,X28,,,,,,,,,,
DI,0,NG料推送前进端,NG_GetOut_Fwd,29,HC,X29,,,,,,,,,,
DI,0,NG料推送后退端,NG_GetOut_Bck,30,HC,X30,,,,,,,,,,
DI,0,纸质料阻挡料盘检测,Paper_TaryStop_Check,31,HC,X31,,,,,,,,,,
DI,0,纸质料阻挡上升端,Paper_TaryStop_Up,32,HC,X32,,,,,,,,,,
DI,0,纸质料阻挡下降端,Paper_TaryStop_Down,33,HC,X33,,,,,,,,,,
DI,0,纸质料推送前进端,Paper_GetOut_Fwd,34,HC,X34,,,,,,,,,,
DI,0,纸质料推送后退端,Paper_GetOut_Bck,35,HC,X35,,,,,,,,,,
DI,0,MSD料阻挡料盘检测,MSD_TaryStop_Check,36,HC,X36,,,,,,,,,,
DI,0,MSD料阻挡上升端,MSD_TaryStop_Up,37,HC,X37,,,,,,,,,,
DI,0,MSD料阻挡下降端,MSD_TaryStop_Down,38,HC,X38,,,,,,,,,,
DI,0,MSD料推送前进端,MSD_GetOut_Fwd,39,HC,X39,,,,,,,,,,
DI,0,MSD料推送后退端,MSD_GetOut_Bck,40,HC,X40,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,皮带线3启动,Line3_Run,21,HC,Y21,,,,,,,,,,
DO,0,NG料阻挡上升,NG_TaryStop_Up,28,HC,Y28,,,,,,,,,,
DO,0,NG料阻挡下降,NG_TaryStop_Down,29,HC,Y29,,,,,,,,,,
DO,0,NG料推送前进,NG_GetOut_Fwd,30,HC,Y30,,,,,,,,,,
DO,0,NG料推送后退,NG_GetOut_Bck,31,HC,Y31,,,,,,,,,,
DO,0,纸质料阻挡上升,Paper_TaryStop_Up,32,HC,Y32,,,,,,,,,,
DO,0,纸质料阻挡下降,Paper_TaryStop_Down,33,HC,Y33,,,,,,,,,,
DO,0,纸质料推送前进,Paper_GetOut_Fwd,34,HC,Y34,,,,,,,,,,
DO,0,纸质料推送后退,Paper_GetOut_Bck,35,HC,Y35,,,,,,,,,,
DO,0,MSD料阻挡上升,MSD_TaryStop_Up,36,HC,Y36,,,,,,,,,,
DO,0,MSD料阻挡下降,MSD_TaryStop_Down,37,HC,Y37,,,,,,,,,,
DO,0,MSD料推送前进,MSD_GetOut_Fwd,38,HC,Y38,,,,,,,,,,
DO,0,MSD料推送后退,MSD_GetOut_Bck,39,HC,Y39,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
PRO,30,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,
PRO,30,气压检测超时,AirCheckSeconds,5,,,,,,,,,,,,
PRO,20,右侧提升轴每毫米脉冲,Right_Batch_ChangeValue,5555,,,,,,,,,,,,
PRO,20,左侧提升轴每毫米脉冲,Left_Batch_ChangeValue,5555,,,,,,,,,,,,
PRO,30,右侧相机名称,RightCameraName,123123,,,,,,,,,,,,
PRO,30,右侧轴心坐标X,Right_Batch_X,222,,,,,,,,,,,,
PRO,30,右侧轴心坐标Y,Right_Batch_Y,333,,,,,,,,,,,,
PRO,30,贴标R轴0位角度差,Label_R_Angle_Diff,90,,,,,,,,,,,,
PRO,30,贴标R轴360度脉冲,Label_R_360,9,,,,,,,,,,,,
PRO,30,贴标X轴基准点,Label_X_Base,8,,,,,,,,,,,,
PRO,30,贴标Y轴基准点,Label_Y_Base,7,,,,,,,,,,,,
PRO,30,图像/X轴比值,Cam_Pixel_X_Ratio,6,,,,,,,,,,,,
PRO,30,图像/Y轴比值,Cam_Pixel_Y_Ratio,5,,,,,,,,,,,,
PRO,30,像素偏离位置7寸,Label_Offset_Pixel_7,200,,,,,,,,,,,,
PRO,30,像素偏离位置13寸,Label_Offset_Pixel_13,200,,,,,,,,,,,,
PRO,30,像素偏离位置15寸,Label_Offset_Pixel_15,200,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,贴标移栽机构X轴,Label_X_Axis,3,HC,,90000,3000000,3000000,500,17000,50000,10,1000,0,0
AXIS,,贴标移栽机构Y轴,Label_Y_Axis,2,HC,,90000,3000000,3000000,500,17000,50000,10,1000,0,0
AXIS,,贴标移栽机构Z轴,Label_Z_Axis,4,HC,,90000,3000000,3000000,1000,13000,40000,10,1000,0,0
AXIS,,贴标移栽机构R轴,Label_R_Axis,5,HC,,700,8100,8100,20,50,300,500,100,0,0
,,,,,,,,,,,,,,,,
PRO,30,相机名称,CameraName,GigE:MV-CE200-10GC (00E78064892),,,,,,,,,,,,
PRO,30,图像料盘中心坐标X,Right_Batch_X,3205,,,,,,,,,,,,
PRO,30,图像料盘中心坐标Y,Right_Batch_Y,1889,,,,,,,,,,,,
PRO,0,贴标R轴0位角度差,Label_R_Angle_Diff,0,,,,,,,,,,,,
PRO,30,图像/X轴比值,Cam_Pixel_X_Ratio,141,,,,,,,,,,,,
PRO,30,图像/Y轴比值,Cam_Pixel_Y_Ratio,141,,,,,,,,,,,,
PRO,30,像素偏离位置7寸,Label_Offset_Pixel_7,0,,,,,,,,,,,,
PRO,30,像素偏离位置13寸,Label_Offset_Pixel_13,-595,,,,,,,,,,,,
PRO,30,像素偏离位置15寸,Label_Offset_Pixel_15,200,,,,,,,,,,,,
PRO,30,贴标R轴偏移像素,Label_R_Offset_Pixel,70,,,,,,,,,,,,
PRO,0,贴标R轴原点角度,Label_R_Zero_Angle,0,,,,,,,,,,,,
PRO,30,贴标Z轴高度转换系数(1mm对应的脉冲),Label_Z_Axis_ChangeValue,128,,,,,,,,,,,,
PRO,30,贴标标签偏移X像素,Label_Offset_X,250,,,,,,,,,,,,
PRO,30,贴标标签偏移Y像素,Label_Offset_Y,230,,,,,,,,,,,,
PRO,30,贴标R轴最大角度,Label_R_MaxAngle,330,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,贴标X轴待机点P1,Label_X_P1,244500,,,700000,,,,,,,,,
PRO,13,贴标X轴取标点P2,Label_X_P2,244500,,,700000,,,,,,,,,
PRO,13,贴标X轴料盘中心基准点,Label_X_Base,359627,,,700000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,贴标Y轴待机点P1,Label_Y_P1,111830,,,700000,,,,,,,,,
PRO,12,贴标Y轴取标点P2,Label_Y_P2,49563,,,700000,,,,,,,,,
PRO,12,贴标Y轴料盘中心基准点,Label_Y_Base,367433,,,700000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,14,贴标Z轴待机点P1,Label_Z_P1,78338,,,700000,,,,,,,,,
PRO,14,贴标Z轴取标前点P2,Label_Z_P2,41000,,,700000,,,,,,,,,
PRO,14,贴标Z轴取标点P3,Label_Z_P3,99900,,,700000,,,,,,,,,
PRO,14,贴标Z轴贴标前点P4,Label_Z_P4,85226,,,700000,,,,,,,,,
PRO,14,贴标Z轴贴标点P5,Label_Z_P5,132000,,,700000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,15,贴标R轴待机点P1,Label_R_P1,560,,,1200,,,,,,,,,
PRO,15,贴标R轴取标点P2,Label_R_P2,562,,,1200,,,,,,,,,
PRO,15,贴标R轴360度脉冲,Label_R_360,681,,,900,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停(贴标设备),SuddenStop_BTN,16,HC,X16,,,,,,,,,,
DI,0,贴标机构复位,Reset_BTN,17,HC,X17,,,,,,,,,,
DI,0,皮带线阻挡1料盘检测,Tray_Check,18,HC,X18,,,,,,,,,,
DI,0,皮带线阻挡1上升端,TrayStop_Up,19,HC,X19,,,,,,,,,,
DI,0,皮带线阻挡1下降端,TrayStop_Down,20,HC,X20,,,,,,,,,,
DI,0,皮带线料盘检测,Line_HasTray_Check,21,HC,X21,,,,,,,,,,
DI,0,贴标阻挡料盘检测,Label_TaryStop_Check,22,HC,X22,,,,,,,,,,
DI,0,贴标阻挡上升端,Label_Stop_Up,23,HC,X23,,,,,,,,,,
DI,0,贴标阻挡下降端,Label_Stop_Down,24,HC,X24,,,,,,,,,,
DI,0,吸嘴取标检测,Label_Cylinder_Check,25,HC,X25,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,贴标机构运行指示灯,Run_Led,16,HC,Y16,,,,,,,,,,
DO,0,贴标机构故障指示灯,Alarm_Led,17,HC,Y17,,,,,,,,,,
DO,0,贴标机构相机光源打开,Camera_Led,18,HC,Y18,,,,,,,,,,
DO,0,皮带线1启动,Line1_Run,19,HC,Y19,,,,,,,,,,
DO,0,皮带线2启动,Line2_Run,20,HC,Y20,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,皮带线阻挡1上升,TrayStop_Up,23,HC,Y23,,,,,,,,,,
DO,0,皮带线阻挡1下降,TrayStop_Down,24,HC,Y24,,,,,,,,,,
DO,0,贴标阻挡上升,Label_Stop_Up,25,HC,Y25,,,,,,,,,,
DO,0,贴标阻挡下降,Label_Stop_Down,26,HC,Y26,,,,,,,,,,
DO,0,吸嘴取标,LabelCylinder_Work,27,HC,Y27,,,,,,,,,,
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,出料提升轴,T_Batch_Axis,6,HC,,8000,30000,30000,500,4000,15000,10,1000,0,0
AXIS,,出料移栽轴,T_Pan_Axis,7,HC,,20000,200000,200000,500,4000,15000,10,1000,0,0
AXIS,,出料升降轴,T_Updown_Axis,8,HC,,20000,200000,200000,500,4000,15000,10,1000,0,0
AXIS,,皮带线出口定位,T_TrayPos_Axis,9,HC,,35000,100000,100000,1000,5000,20000,500,100,0,0
AXIS,,出料移栽Y轴,T_Y_Axis,10,HC,,20000,30000,30000,500,4000,15000,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,16,提升轴待机点 P1,BatchAxis_P1,500,,,8000,,,,,,,,,
PRO,16,提升轴上升目标点_P2,BatchAxis_P2,78451,,,8000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,17,横移待机取料点P1,Pan_P1,5326,,,100000,,,,,,,,,
PRO,17,横移放料点P2,Pan_P2,75933,,,100000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,20,Y轴待机取料点P1,Y_P1,51136,,,100000,,,,,,,,,
PRO,20,Y轴放料基准点P2,Y_P2,51136,,,100000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,18,升降轴待机点P1,UpdownAxis_P1,7,,,100000,,,,,,,,,
PRO,18,升降轴取料点P2,UpdownAxis_P2,36905,,,100000,,,,,,,,,
PRO,18,升降轴放料点P3,UpdownAxis_P3,6800,,,100000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,19,料盘定位待机点P1,TrayPos_P1,0,,,50000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,30,提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,128,,,,,,,,,,,,
PRO,30,升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,128,,,,,,,,,,,,
PRO,30,入口阻挡定位列表,TrayPos_List,7=18164;13=5400;15=1600;,,,,,,,,,,,,
PRO,30,料串定位相机,String_Camera,GigE:MV-CE200-10GC (00E78064926),,,,,,,,,,,,
PRO,30,料串中心点X坐标,String_Center_X,721,,,,,,,,,,,,
PRO,30,料串中心点Y坐标,String_Center_Y,800,,,,,,,,,,,,
PRO,30,料串允许偏离像素值,String_Offset_Range_Px,60,,,,,,,,,,,,
PRO,30,料串图像/X轴比值,Cam_Pixel_X_Ratio,19,,,,,,,,,,,,
PRO,30,料串图像/Y轴比值,Cam_Pixel_Y_Ratio,143,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,皮带线出口料盘检测,End_Line_Tray_Check,41,HC,X41,,,,,,,,,,
DI,0,皮带线出口顶升料盘检测,End_Lift_Tray_Check,42,HC,X42,,,,,,,,,,
DI,0,出口顶升气缸上升端,End_Lift_Cylinder_Up,43,HC,X43,,,,,,,,,,
DI,0,出口顶升气缸下降端,End_Lift_Cylinder_Down,44,HC,X44,,,,,,,,,,
DI,0,急停(T1机构),SuddenStop_BTN,45,HC,X45,,,,,,,,,,
DI,0,T1机构复位,Reset_BTN,46,HC,X46,,,,,,,,,,
DI,0,空料串线体入口检测,Empty_LineIn_Check,47,HC,X47,,,,,,,,,,
DI,0,空料串线体阻挡料串检测,EmptyString_In_Check,48,HC,X48,,,,,,,,,,
DI,0,空料串线体横移料串检测,EmptyString_End_Check,49,HC,X49,,,,,,,,,,
DI,0,空料串线体顶升上升端,EmptyString_Lift_Up,50,HC,X50,,,,,,,,,,
DI,0,空料串线体顶升下降端,EmptyString_Lift_Down,51,HC,X51,,,,,,,,,,
DI,0,T1定位工位料串检测,T1_Lift_Tray_Check,52,HC,X52,,,,,,,,,,
DI,0,T1定位气缸1上升端,T1_Location1_Cylinder_Up,53,HC,X53,,,,,,,,,,
DI,0,T1定位气缸1下降端,T1_Location1_Cylinder_Down,54,HC,X54,,,,,,,,,,
DI,0,T1定位气缸2上升端,T1_Location2_Cylinder_Up,55,HC,X55,,,,,,,,,,
DI,0,T1定位气缸2下降端,T1_Location2_Cylinder_Down,56,HC,X56,,,,,,,,,,
DI,0,T1定位工位顶升上升端,T1_Lift_Up,57,HC,X57,,,,,,,,,,
DI,0,T1定位工位顶升下降端,T1_Lift_Down,58,HC,X58,,,,,,,,,,
DI,0,T1料叉气缸前进端,Fork_Cylinder_Fwd,59,HC,X59,,,,,,,,,,
DI,0,T1料叉气缸后退端,Fork_Cylinder_Bck,60,HC,X60,,,,,,,,,,
DI,0,T1出口前阻挡料串检测,T1_Wait_Check,61,HC,X61,,,,,,,,,,
DI,0,T1出口料串检测,T1_Out_Check,62,HC,X62,,,,,,,,,,
DI,0,T1伺服定位料盘检测,T1_Tray_Check,63,HC,X63,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,皮带线4启动,Line4_Run,22,HC,Y22,,,,,,,,,,
DO,0,出口顶升气缸上升,End_Lift_Cylinder_Up,40,HC,Y40,,,,,,,,,,
DO,0,出口顶升气缸下降,End_Lift_Cylinder_Down,41,HC,Y41,,,,,,,,,,
DO,0,T1运行指示灯,Run_Led,42,HC,Y42,,,,,,,,,,
DO,0,T1故障指示灯,Alarm_Led,43,HC,Y43,,,,,,,,,,
DO,0,空料串线体运转,Empty_Line_Run,44,HC,Y44,,,,,,,,,,
DO,0,T1出料串线体运转,Line_Out_Run,45,HC,Y45,,,,,,,,,,
DO,0,空料串线体横移电机运转,EmptyString_Sliding_Run,46,HC,Y46,,,,,,,,,,
DO,0,T1定位工位横移电机运转,T1String_Sliding_Run,47,HC,Y47,,,,,,,,,,
DO,0,T1线体过渡滚筒运转,T1_Sliding_Run,48,HC,Y48,,,,,,,,,,
DO,0,空料串线体顶升上升,EmptyString_Lift_Up,49,HC,Y49,,,,,,,,,,
DO,0,空料串线体顶升下降,EmptyString_Lift_Down,50,HC,Y50,,,,,,,,,,
DO,0,T1定位工位顶升上升,T1_Lift_Up,51,HC,Y51,,,,,,,,,,
DO,0,T1定位工位顶升下降,T1_Lift_Down,52,HC,Y52,,,,,,,,,,
DO,0,T1定位气缸上升,T1_Location_Cylinder_Up,53,HC,Y53,,,,,,,,,,
DO,0,T1定位气缸下降,T1_Location_Cylinder_Down,54,HC,Y54,,,,,,,,,,
DO,0,T1料叉气缸前进端,Fork_Cylinder_Fwd,55,HC,Y55,,,,,,,,,,
DO,0,T1料叉气缸后退端,Fork_Cylinder_Bck,56,HC,Y56,,,,,,,,,,
DO,0,空料串线体入口阻挡下降,EmptyString_In_Stop,57,HC,Y57,,,,,,,,,,
DO,0,空料串线体横移阻挡下降,EmptyString_Wait_Stop,58,HC,Y58,,,,,,,,,,
DO,0,T1出口前阻挡下降,T1_Wait_Stop,59,HC,Y59,,,,,,,,,,
DO,0,T1出口阻挡下降,T1_Out_Stop,60,HC,Y60,,,,,,,,,,
...@@ -21,33 +21,42 @@ DI,0,急停(点料设备),SuddenStop_BTN,0,HC,X00,,,,,,,,,, ...@@ -21,33 +21,42 @@ DI,0,急停(点料设备),SuddenStop_BTN,0,HC,X00,,,,,,,,,,
DI,0,复位,Reset_BTN,1,HC,X01,,,,,,,,,, DI,0,复位,Reset_BTN,1,HC,X01,,,,,,,,,,
DI,0,启动,Start_BTN,2,HC,X02,,,,,,,,,, DI,0,启动,Start_BTN,2,HC,X02,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,3,HC,X03,,,,,,,,,, DI,0,气压检测,Airpressure_Check,3,HC,X03,,,,,,,,,,
DI,0,上料人工确认,Manual_Confirm_BTN,4,HC,X04,,,,,,,,,, DI,0,点料机入口门打开端,Entry_Open,4,HC,X04,,,,,,,,,,
DI,0,上料区料盘检测,Tray_Check,5,HC,X05,,,,,,,,,, DI,0,点料机入口门关闭端,Entry_Close,5,HC,X05,,,,,,,,,,
DI,0,上料区7寸料盘检测,Tray7_Check,6,HC,X06,,,,,,,,,, DI,0,点料机出口门打开端,Exit_Open,6,HC,X06,,,,,,,,,,
DI,0,上料区13寸料盘检测,Tray13_Check,7,HC,X07,,,,,,,,,, DI,0,点料机出口门关闭端,Exit_Close,7,HC,X07,,,,,,,,,,
DI,0,上料区15寸料盘检测,Tray15_Check,8,HC,X08,,,,,,,,,, DI,0,点料机内部料盘检测,Tray_Inside_Check,8,HC,X08,,,,,,,,,,
DI,0,上料区定位气缸上升端,Location_Cylinder_Up,9,HC,X09,,,,,,,,,, DI,0,点料机门禁,,9,HC,X09,,,,,,,,,,
DI,0,上料区定位气缸下降端,Location_Cylinder_Down,10,HC,X10,,,,,,,,,, DI,0,出料皮带线料盘检测,,10,HC,X10,,,,,,,,,,
DI,0,点料机入口门打开端,Entry_Open,11,HC,X11,,,,,,,,,, DI,0,过渡横移吸盘压力检测,,11,HC,X11,,,,,,,,,,
DI,0,点料机入口门关闭端,Entry_Close,12,HC,X12,,,,,,,,,, ,,,,,,,,,,,,,,,,
DI,0,点料机出口门打开端,Exit_Open,13,HC,X13,,,,,,,,,, DI,0,上料区光栅检测,,16,HC,X16,,,,,,,,,,
DI,0,点料机出口门关闭端,Exit_Close,14,HC,X14,,,,,,,,,, DI,0,上料人工确认,Manual_Confirm_BTN,17,HC,X17,,,,,,,,,,
DI,0,点料机内部料盘检测,Tray_Inside_Check,15,HC,X15,,,,,,,,,, DI,0,上料区料盘检测,Tray_Check,18,HC,X18,,,,,,,,,,
DI,0,上料区7寸料盘检测,Tray7_Check,19,HC,X19,,,,,,,,,,
DI,0,上料区13寸料盘检测,Tray13_Check,20,HC,X20,,,,,,,,,,
DI,0,上料区15寸料盘检测,Tray15_Check,21,HC,X21,,,,,,,,,,
DI,0,上料区定位气缸上升端,Location_Cylinder_Up,22,HC,X22,,,,,,,,,,
DI,0,上料区定位气缸下降端,Location_Cylinder_Down,23,HC,X23,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
DO,0,待机状态(指示灯),Standby_Led,0,HC,Y00,,,,,,,,,, DO,0,待机状态(指示灯),Standby_Led,0,HC,Y00,,,,,,,,,,
DO,0,运行状态(指示灯),Run_Led,1,HC,Y01,,,,,,,,,, DO,0,运行状态(指示灯),Run_Led,1,HC,Y01,,,,,,,,,,
DO,0,故障状态(指示灯),Alarm_Led,2,HC,Y02,,,,,,,,,, DO,0,故障状态(指示灯),Alarm_Led,2,HC,Y02,,,,,,,,,,
DO,0,故障状态(蜂鸣器),Alarm_Buzzer,3,HC,Y03,,,,,,,,,, DO,0,故障状态(蜂鸣器),Alarm_Buzzer,3,HC,Y03,,,,,,,,,,
DO,0,上料区料盘检测OK,Pass_Led,4,HC,Y04,,,,,,,,,, DO,0,出料皮带线启动,,4,HC,Y04,,,,,,,,,,
DO,0,上料区料盘检测NG,NG_Led,5,HC,Y05,,,,,,,,,, DO,0,X光机互锁信号ON,Xray_Lock,5,HC,Y05,,,,,,,,,,
DO,0,上料区相机光源打开,Camera_Led,6,HC,Y06,,,,,,,,,, DO,0,点料机入口门打开,Entry_Open,6,HC,Y06,,,,,,,,,,
DO,0,X光机互锁信号ON,Xray_Lock,7,HC,Y07,,,,,,,,,, DO,0,点料机入口门关闭,Entry_Close,7,HC,Y07,,,,,,,,,,
DO,0,上料区定位气缸上升,Location_Cylinder_Up,8,HC,Y08,,,,,,,,,, DO,0,点料机出口门打开,Exit_Open,8,HC,Y08,,,,,,,,,,
DO,0,上料区定位气缸下降,Location_Cylinder_Down,9,HC,Y09,,,,,,,,,, DO,0,点料机出口门关闭,Exit_Close,9,HC,Y09,,,,,,,,,,
DO,0,点料机入口门打开,Entry_Open,10,HC,Y10,,,,,,,,,, DO,0,上料区定位气缸上升,Location_Cylinder_Up,10,HC,Y10,,,,,,,,,,
DO,0,点料机入口门关闭,Entry_Close,11,HC,Y11,,,,,,,,,, DO,0,上料区定位气缸下降,Location_Cylinder_Down,11,HC,Y11,,,,,,,,,,
DO,0,点料机出口门打开,Exit_Open,12,HC,Y12,,,,,,,,,, DO,0,过渡横移吸盘吸料,,12,HC,Y12,,,,,,,,,,
DO,0,点料机出口门关闭,Exit_Close,13,HC,Y13,,,,,,,,,, DO,0,过渡横移吸盘放料,,13,HC,Y13,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,上料区料盘检测OK,Pass_Led,16,HC,Y16,,,,,,,,,,
DO,0,上料区料盘检测NG,NG_Led,17,HC,Y17,,,,,,,,,,
DO,0,上料区相机光源打开,Camera_Led,18,HC,Y18,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
ADIO,0,左侧7寸料盘模拟量检测,Tray7_L_ADIO,0,HC,A00,,,,,,,,,, ADIO,0,左侧7寸料盘模拟量检测,Tray7_L_ADIO,0,HC,A00,,,,,,,,,,
ADIO,0,左侧13寸料盘模拟量检测,Tray13_L_ADIO,1,HC,A01,,,,,,,,,, ADIO,0,左侧13寸料盘模拟量检测,Tray13_L_ADIO,1,HC,A01,,,,,,,,,,
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\X-Ray\X-Ray\bin\Debug\X-Ray.dll</HintPath> <HintPath>..\..\..\X-Ray\X-Ray\bin\Debug\X-Ray.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
...@@ -94,20 +94,12 @@ ...@@ -94,20 +94,12 @@
<Compile Include="AutoScan\common\SensorDebounce.cs" /> <Compile Include="AutoScan\common\SensorDebounce.cs" />
<Compile Include="AutoScan\common\ServerConn.cs" /> <Compile Include="AutoScan\common\ServerConn.cs" />
<Compile Include="AutoScan\common\TextBlock.cs" /> <Compile Include="AutoScan\common\TextBlock.cs" />
<Compile Include="AutoScan\FilterMachine.partial.cs" />
<Compile Include="AutoScan\LabelMachine.partial.cs" />
<Compile Include="AutoScan\LabelMachine.Ledprocess.cs" />
<Compile Include="AutoScan\LabelMachine.claclabel.cs" />
<Compile Include="AutoScan\T1Machine.cs" />
<Compile Include="AutoScan\FilterMachine.cs" />
<Compile Include="AutoScan\LabelMachine.cs" />
<Compile Include="AutoScan\common\LabelParam.cs" /> <Compile Include="AutoScan\common\LabelParam.cs" />
<Compile Include="AutoScan\MachineBase.cs" /> <Compile Include="AutoScan\MachineBase.cs" />
<Compile Include="AutoScan\common\MoveInfo.cs" /> <Compile Include="AutoScan\common\MoveInfo.cs" />
<Compile Include="AutoScan\MoveStep.cs" /> <Compile Include="AutoScan\MoveStep.cs" />
<Compile Include="AutoScan\T1Machine.partial.cs" />
<Compile Include="AutoScan\XRayMachine.cs" /> <Compile Include="AutoScan\XRayMachine.cs" />
<Compile Include="AutoScan\T1Machine.Ledprocess.cs" /> <Compile Include="AutoScan\XRayMachine.SideMove.cs" />
<Compile Include="AutoScan\XRayMachine.XRay.cs" /> <Compile Include="AutoScan\XRayMachine.XRay.cs" />
<Compile Include="AutoScan\XRayMachine.Feeding.cs" /> <Compile Include="AutoScan\XRayMachine.Feeding.cs" />
<Compile Include="DeviceLibrary\AlarmBuzzer.cs" /> <Compile Include="DeviceLibrary\AlarmBuzzer.cs" />
...@@ -156,30 +148,8 @@ ...@@ -156,30 +148,8 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Config\I40Config.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="Config\XrayConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\LabelConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Compile Include="AutoScan\LabelMachine.print.cs" />
<Compile Include="AutoScan\XRayMachine.Ledprocess.cs" /> <Compile Include="AutoScan\XRayMachine.Ledprocess.cs" />
<None Include="app.config" /> <None Include="app.config" />
<None Include="Config\general.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Config\T1Config.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Config\FilterConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Config\HBXRAYPLATE.config" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings1.settings"> <None Include="Properties\Settings1.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
......
...@@ -22,6 +22,18 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -22,6 +22,18 @@ namespace OnlineStore.LoadCSVLibrary
set { fieldName = value; } set { fieldName = value; }
} }
}
public class EditableAttribute : Attribute
{
public EditableAttribute(int axisname)
{
Axisname = axisname;
}
public int Axisname
{
get;
set;
}
} }
} }
...@@ -13,7 +13,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -13,7 +13,7 @@ namespace OnlineStore.LoadCSVLibrary
public class CSVReaderBase public class CSVReaderBase
{ {
public static char Spilt_Char = ','; public static char Spilt_Char = ',';
// public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary> /// <summary>
/// 获取一个类所有的《字段,AttributeName列名》集合 /// 获取一个类所有的《字段,AttributeName列名》集合
/// </summary> /// </summary>
......
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,入口皮带线,Line_Entry_Axis,0,HC,,500,2000,2000,50,100,500,10,100,0,0
AXIS,,中间皮带线,Line_In_Axis,1,HC,,500,2000,2000,50,100,500,10,100,0,0
AXIS,,皮带线出口定位,ExitLine_Location_Axis,2,HC,,500,2000,2000,50,100,500,10,100,0,0
AXIS,,横移X轴,SideMove_X_Axis,3,HC,,500,2000,2000,50,100,500,10,100,0,0
AXIS,,横移Z轴,SideMove_Z_Axis,4,HC,,500,2000,2000,50,100,500,10,100,0,0
,,,,,,,,,,,,,,,,
PRO,10,入口伺服相对运动量,Line_Entry_Relative,4000,,,2000,,,,,,,,,
PRO,11,机内伺服相对运动量,Line_In_Relative,6300,,,2000,,,,,,,,,
PRO,12,皮带线出口定位待机点P1,ExitLine_Location_P1,0,,,2000,,,,,,,,,
PRO,12,皮带线出口定位7寸挡停,ExitLine_Location_7,0,,,2000,,,,,,,,,
PRO,12,皮带线出口定位13寸挡停,ExitLine_Location_13,0,,,2000,,,,,,,,,
PRO,12,皮带线出口定位15寸挡停,ExitLine_Location_15,0,,,2000,,,,,,,,,
PRO,13,横移X轴待机点P1,SideMove_X_P1,6300,,,2000,,,,,,,,,
PRO,13,横移X轴取料点P2,SideMove_X_P2,6300,,,2000,,,,,,,,,
PRO,13,横移X轴放料点P3,SideMove_X_P3,6300,,,2000,,,,,,,,,
PRO,14,横移Z轴待机点P1,SideMove_Z_P1,6300,,,2000,,,,,,,,,
PRO,14,横移Z轴取料点P2,SideMove_Z_P2,6300,,,2000,,,,,,,,,
PRO,14,横移Z轴放料点P3,SideMove_Z_P3,6300,,,2000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,
PRO,0,气压检测超时,AirCheckSeconds,5,,,,,,,,,,,,
PRO,30,相机名称,CameraName,GigE:MV-CE200-10GC (00E76280379),,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,31,左侧7寸料盘模拟量基准,Tray7_L_ADIO_base,-750,,,,,,,,,,,,
PRO,31,左侧13寸料盘模拟量基准,Tray13_L_ADIO_base,-750,,,,,,,,,,,,
PRO,31,左侧15寸料盘模拟量基准,Tray15_L_ADIO_base,-750,,,,,,,,,,,,
PRO,31,右侧7寸料盘模拟量基准,Tray7_R_ADIO_base,-750,,,,,,,,,,,,
PRO,31,右侧13寸料盘模拟量基准,Tray13_R_ADIO_base,-750,,,,,,,,,,,,
PRO,31,右侧15寸料盘模拟量基准,Tray15_R_ADIO_base,-750,,,,,,,,,,,,
PRO,32,料盘高度模拟量转换,Tray_ADIO_Value,86,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停(点料设备),SuddenStop_BTN,0,HC,X00,,,,,,,,,,
DI,0,复位,Reset_BTN,1,HC,X01,,,,,,,,,,
DI,0,启动,Start_BTN,2,HC,X02,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,3,HC,X03,,,,,,,,,,
DI,0,点料机入口门打开端,Entry_Open,4,HC,X04,,,,,,,,,,
DI,0,点料机入口门关闭端,Entry_Close,5,HC,X05,,,,,,,,,,
DI,0,点料机出口门打开端,Exit_Open,6,HC,X06,,,,,,,,,,
DI,0,点料机出口门关闭端,Exit_Close,7,HC,X07,,,,,,,,,,
DI,0,点料机内部料盘检测,Tray_Inside_Check,8,HC,X08,,,,,,,,,,
DI,0,点料机门禁,Xray_Door_Check,9,HC,X09,,,,,,,,,,
DI,0,出料皮带线料盘检测,ExitLine_Reel_Check,10,HC,X10,,,,,,,,,,
DI,0,过渡横移吸盘压力检测,SideMove_SuckerReel_Check,11,HC,X11,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,上料区光栅检测,SafetyLightCurtains,16,HC,X16,,,,,,,,,,
DI,0,上料人工确认,Manual_Confirm_BTN,17,HC,X17,,,,,,,,,,
DI,0,上料区料盘检测,Tray_Check,18,HC,X18,,,,,,,,,,
DI,0,上料区7寸料盘检测,Tray7_Check,19,HC,X19,,,,,,,,,,
DI,0,上料区13寸料盘检测,Tray13_Check,20,HC,X20,,,,,,,,,,
DI,0,上料区15寸料盘检测,Tray15_Check,21,HC,X21,,,,,,,,,,
DI,0,上料区定位气缸上升端,Location_Cylinder_Up,22,HC,X22,,,,,,,,,,
DI,0,上料区定位气缸下降端,Location_Cylinder_Down,23,HC,X23,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,待机状态(指示灯),Standby_Led,0,HC,Y00,,,,,,,,,,
DO,0,运行状态(指示灯),Run_Led,1,HC,Y01,,,,,,,,,,
DO,0,故障状态(指示灯),Alarm_Led,2,HC,Y02,,,,,,,,,,
DO,0,故障状态(蜂鸣器),Alarm_Buzzer,3,HC,Y03,,,,,,,,,,
DO,0,出料皮带线启动,ExitLine_Reel_Run,4,HC,Y04,,,,,,,,,,
DO,0,X光机互锁信号ON,Xray_Lock,5,HC,Y05,,,,,,,,,,
DO,0,点料机入口门打开,Entry_Open,6,HC,Y06,,,,,,,,,,
DO,0,点料机入口门关闭,Entry_Close,7,HC,Y07,,,,,,,,,,
DO,0,点料机出口门打开,Exit_Open,8,HC,Y08,,,,,,,,,,
DO,0,点料机出口门关闭,Exit_Close,9,HC,Y09,,,,,,,,,,
DO,0,上料区定位气缸上升,Location_Cylinder_Up,10,HC,Y10,,,,,,,,,,
DO,0,上料区定位气缸下降,Location_Cylinder_Down,11,HC,Y11,,,,,,,,,,
DO,0,过渡横移吸盘吸料,SideMove_SuckerReel_On,12,HC,Y12,,,,,,,,,,
DO,0,过渡横移吸盘放料,SideMove_SuckerReel_Off,13,HC,Y13,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,上料区料盘检测OK,Pass_Led,16,HC,Y16,,,,,,,,,,
DO,0,上料区料盘检测NG,NG_Led,17,HC,Y17,,,,,,,,,,
DO,0,上料区相机光源打开,Camera_Led,18,HC,Y18,,,,,,,,,,
,,,,,,,,,,,,,,,,
ADIO,0,左侧7寸料盘模拟量检测,Tray7_L_ADIO,0,HC,A00,,,,,,,,,,
ADIO,0,左侧13寸料盘模拟量检测,Tray13_L_ADIO,1,HC,A01,,,,,,,,,,
ADIO,0,左侧15寸料盘模拟量检测,Tray15_L_ADIO,2,HC,A02,,,,,,,,,,
ADIO,0,右侧7寸料盘模拟量检测,Tray7_R_ADIO,4,HC,A03,,,,,,,,,,
ADIO,0,右侧13寸料盘模拟量检测,Tray13_R_ADIO,5,HC,A04,,,,,,,,,,
ADIO,0,右侧15寸料盘模拟量检测,Tray15_R_ADIO,6,HC,A05,,,,,,,,,,
...@@ -32,10 +32,15 @@ ...@@ -32,10 +32,15 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<StartupObject>
</StartupObject>
</PropertyGroup>
<PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\SharedDLL\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -48,22 +53,21 @@ ...@@ -48,22 +53,21 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CSVExection.cs" /> <Compile Include="CSVExection.cs" />
<Compile Include="position\ACSAStorePosition.cs" />
<Compile Include="position\CSVPositionReader.cs" />
<Compile Include="position\CarReelPostion.cs" />
<Compile Include="position\StorePostionBase.cs" />
<Compile Include="Program.cs" />
<Compile Include="storeConfig\ConfigItemBase.cs" /> <Compile Include="storeConfig\ConfigItemBase.cs" />
<Compile Include="storeConfig\ConfigProAttribute.cs" /> <Compile Include="storeConfig\ConfigProAttribute.cs" />
<Compile Include="storeConfig\config\Config_T1.cs" />
<Compile Include="storeConfig\config\Config_Filter.cs" />
<Compile Include="storeConfig\config\IO_T1_Type.cs" />
<Compile Include="storeConfig\config\IO_Filter_Type.cs" />
<Compile Include="storeConfig\config\IO_VALUE.cs" />
<Compile Include="storeConfig\config\Label_Config.cs" />
<Compile Include="storeConfig\config\IO_Label_Type.cs" />
<Compile Include="storeConfig\config\Config_XRay.cs" /> <Compile Include="storeConfig\config\Config_XRay.cs" />
<Compile Include="storeConfig\config\IO_XRay_Type.cs" /> <Compile Include="storeConfig\config\IO_XRay_Type.cs" />
<Compile Include="storeConfig\config\Robot_Config.cs" />
<Compile Include="CSVAttribute.cs" /> <Compile Include="CSVAttribute.cs" />
<Compile Include="storeConfig\CSVConfigReader.cs" /> <Compile Include="storeConfig\CSVConfigReader.cs" />
<Compile Include="CSVReaderBase.cs" /> <Compile Include="CSVReaderBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="storeConfig\DeviceConfig.cs" /> <Compile Include="storeConfig\config\DeviceConfig.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Common\Common.csproj"> <ProjectReference Include="..\Common\Common.csproj">
...@@ -71,6 +75,11 @@ ...@@ -71,6 +75,11 @@
<Name>Common</Name> <Name>Common</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Config\XrayConfig.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
class Program
{
static void Main(string[] args)
{
string configFile = "config\\XrayConfig.csv";
var Config = new Config_XRay(0, "", configFile);
Config = (Config_XRay)CSVConfigReader.LoadConfig<IO_XRay_Type>(Config);
Console.Read();
}
}
}
...@@ -20,112 +20,28 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -20,112 +20,28 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// 中轴位置(旋转轴库位点)P2 /// 中轴位置(旋转轴库位点)P2
/// </summary> /// </summary>
[CSVAttribute("中轴位置P2")] [CSVAttribute("旋转轴位置P2"), Editable(0)]
public int MiddleAxis_Position_P2 { get; set; } public int XAxis_Position_P2 { get; set; }
/// <summary>
/// 升降轴(库位出料前点)P5
/// </summary>
[CSVAttribute("升降轴库位出料前点P5")]
public int UpDownAxis_OHPosition_P5 { get; set; }
/// <summary>
/// 升降轴(库位出料缓冲点)P6
/// </summary>
[CSVAttribute("升降轴库位出料缓冲点P6")]
public int UpDownAxis_OLPosition_P6 { get; set; }
/// <summary> /// <summary>
/// 升降轴(库位入料前点)P3 /// 升降轴(库位入料前点)P3
/// </summary> /// </summary>
[CSVAttribute("升降轴库位入料前点P3")] [CSVAttribute("升降轴库位入料高点P3"), Editable(1)]
public int UpDownAxis_IHPosition_P3 { get; set; } public int UpDownAxis_IHPosition_P3 { get; set; }
/// <summary> /// <summary>
/// 升降轴(库位入料缓冲点)P4 /// 升降轴(库位入料缓冲点)P4
/// </summary> /// </summary>
[CSVAttribute("升降轴库位入料缓冲点P4")] [CSVAttribute("升降轴库位入料低点P4"), Editable(1)]
public int UpDownAxis_ILPosition_P4 { get; set; } public int UpDownAxis_ILPosition_P4 { get; set; }
/// <summary> /// <summary>
/// 进出轴(库位点取料点)P3 /// 进出轴(库位点取料点)P3
/// </summary> /// </summary>
[CSVAttribute("进出轴库位点取料点P3")] [CSVAttribute("进出轴库位点取料点P3"), Editable(2)]
public int InOutAxis_Position_P3 { get; set; } public int InOutAxis_Position_P3 { get; set; }
/// <summary> public static bool CheckPosition(ACStorePosition position, Robot_Config Config)
/// 压紧轴(压紧点)P2
/// </summary>
[CSVAttribute("压紧轴压紧点P2")]
public int CompressAxis_Position_P2 { get; set; }
/// <summary>
/// 压紧轴(压紧前点)P3
/// </summary>
[CSVAttribute("压紧轴压紧前点P3")]
public int CompressAxis_CPosition_P3 { get; set; }
/// <summary>
/// 轴3(进出轴) 进料口取料点P2
/// </summary>
[CSVAttribute("进出轴进料口取料点P2")]
public int InOutAxis_DoorPosition_P2 { get; set; }
public static bool CheckPosition(ACStorePosition position, AC_SA_Config Config)
{ {
try
{
if (Config.Middle_Axis.PositionIsHasLimit())
{
int mMin = Config.Middle_Axis.PositionMin;
int mMax = Config.Middle_Axis.PositionMax;
if (mMin > position.MiddleAxis_Position_P2 || mMax < position.MiddleAxis_Position_P2)
{
LogUtil.error(position.PositionNum + " MiddleAxis_Position_P2位置超出" + Config.Middle_Axis.Explain + "上下限(" + mMin + "-" + mMax + ")");
return false;
}
}
if (Config.InOut_Axis.PositionIsHasLimit())
{
int iMin = Config.InOut_Axis.PositionMin;
int iMax = Config.InOut_Axis.PositionMax;
if (iMin > position.InOutAxis_DoorPosition_P2 || iMax < position.InOutAxis_DoorPosition_P2)
{
LogUtil.error(position.PositionNum + " InOutAxis_DoorPosition_P2位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
}
if (iMin > position.InOutAxis_Position_P3 || iMax < position.InOutAxis_Position_P3)
{
LogUtil.error(position.PositionNum + " InOutAxis_Position_P3位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
}
}
if (Config.UpDown_Axis.PositionIsHasLimit())
{
int uMin = Config.UpDown_Axis.PositionMin;
int uMax = Config.UpDown_Axis.PositionMax;
if (uMin > position.UpDownAxis_IHPosition_P3 || uMax < position.UpDownAxis_IHPosition_P3)
{
LogUtil.error(position.PositionNum + " UpDownAxis_IHPosition_P3位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_ILPosition_P4 || uMax < position.UpDownAxis_ILPosition_P4)
{
LogUtil.error(position.PositionNum + " UpDownAxis_ILPosition_P4位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_OHPosition_P5 || uMax < position.UpDownAxis_OHPosition_P5)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OHPosition_P5位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
if (uMin > position.UpDownAxis_OLPosition_P6 || uMax < position.UpDownAxis_OLPosition_P6)
{
LogUtil.error(position.PositionNum + " UpDownAxis_OLPosition_P6位置超出" + Config.UpDown_Axis.Explain + "上下限(" + uMin + "-" + uMax + ")");
return false;
}
}
}
catch (Exception ex)
{
LogUtil.error("验证" + position.PositionNum + "的位置范围出错:" + ex.ToString());
}
return true; return true;
} }
......
 
using log4net; using log4net;
using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
...@@ -11,7 +12,7 @@ using System.Text; ...@@ -11,7 +12,7 @@ using System.Text;
namespace OnlineStore.LoadCSVLibrary namespace OnlineStore.LoadCSVLibrary
{ {
public class CSVPositionReader<T> : CSVReaderBase where T : StorePostionBase public class CSVPositionReader<T> : CSVReaderBase where T: StorePostionBase
{ {
/// <summary> /// <summary>
/// 所有的位置集合,key=位置 /// 所有的位置集合,key=位置
...@@ -128,6 +129,79 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -128,6 +129,79 @@ namespace OnlineStore.LoadCSVLibrary
} }
return result; return result;
} }
public static Dictionary<String, T> LoadCSVFile(string filePath)
{
Type type = typeof(T);
Dictionary<string, string> proTitleMap = getProAttributeMap(typeof(T));
if (proTitleMap.Count <= 4)
{
LOGGER.Error(typeof(T).ToString() + "只读取到" + proTitleMap.Count + "个属性");
}
List<string> cvsTitleList = new List<string>(proTitleMap.Values);
List<string> propertyList = new List<string>(proTitleMap.Keys);
Dictionary<String, T> result = new Dictionary<String, T>();
string[] lines = ReadCSVFile(filePath);
int index = 0;
Dictionary<string, int> titleIndex = new Dictionary<string, int>();
foreach (var line in lines)
{
var array = line.Split(Spilt_Char);
if (index == 0)
{
titleIndex = GetTitleIndex(line, cvsTitleList);
}
else
{
try
{
if (array.Length >= titleIndex.Count)
{
if (array.Length > 0 && array[0].Equals(""))
{
continue;
}
var bllIns = type.Assembly.CreateInstance(type.FullName);
//取得属性集合
PropertyInfo[] props = type.GetProperties();
int listIndex = 0;
string PositionNum = "";
foreach (string key in cvsTitleList)
{
int titIndex = titleIndex[key];
string value = array[titIndex];
string proName = propertyList[listIndex];
PropertyInfo prop = props.First(c => c.Name == proName);//获取同名属性
if (prop != null)
{//如果属性存在
prop.SetValue(bllIns, Convert.ChangeType(value, prop.PropertyType), null);//赋值****在这里需要考虑类型问题
}
if (proName.Equals("PositionNum"))
{
PositionNum = value;
}
listIndex++;
}
result.Add(PositionNum, (T)bllIns);
}
else
{
LOGGER.Error("读取csv,index=" + index + ",数据格式不匹配!,line=" + line);
}
}
catch (Exception ex)
{
LOGGER.Debug("CSV 读取行【" + line + "】行转换失败");
}
}
index++;
}
return result;
}
/// <summary> /// <summary>
/// 根据Key获得一个位置信息 /// 根据Key获得一个位置信息
/// </summary> /// </summary>
...@@ -135,6 +209,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -135,6 +209,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
if (positionNum == null) if (positionNum == null)
{ {
LogUtil.info($"库位名称为空");
return null; return null;
} }
StorePostionBase result = null; StorePostionBase result = null;
...@@ -145,15 +220,14 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -145,15 +220,14 @@ namespace OnlineStore.LoadCSVLibrary
} }
else else
{ {
LogUtil.info($"未找到库位:{positionNum}");
return null; return null;
} }
} }
public static bool SavePostion(string filePath, T position) public static bool SavePostion(string filePath, T position)
{ {
Type type = typeof(T); Dictionary<string, string> proTitleMap = getProAttributeMap(position.GetType());
Dictionary<string, string> proTitleMap = getProAttributeMap(typeof(T));
if (proTitleMap.Count <= 4) if (proTitleMap.Count <= 4)
{ {
LOGGER.Error(typeof(T).ToString() + "只读取到" + proTitleMap.Count + "个属性"); LOGGER.Error(typeof(T).ToString() + "只读取到" + proTitleMap.Count + "个属性");
...@@ -175,7 +249,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -175,7 +249,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
else else
{ {
if (array.Length == titleIndex.Count) if (array.Length >= titleIndex.Count)
{ {
if (csvIndex < 0) if (csvIndex < 0)
{ {
...@@ -184,9 +258,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -184,9 +258,6 @@ namespace OnlineStore.LoadCSVLibrary
string value = array[csvIndex]; string value = array[csvIndex];
if (value.Equals(position.PositionNum)) if (value.Equals(position.PositionNum))
{ {
//更新缓存
allPositionMap.Remove(position.PositionNum);
allPositionMap.Add(position.PositionNum, position);
string newValue = PostionToString(position, titleIndex, proTitleMap); string newValue = PostionToString(position, titleIndex, proTitleMap);
lines[index] = newValue; lines[index] = newValue;
return WriteCSVFile(filePath, lines); return WriteCSVFile(filePath, lines);
...@@ -230,28 +301,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -230,28 +301,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
return newStr; return newStr;
} }
//private void ReadTest( )
//{
// Dictionary<string, string> dic = new Dictionary<string, string>();
// string path = Application.StartupPath + @"\Test.csv";
// dic.Add("AxisPosition", "中轴位置");
// dic.Add("ModbusHighPosition", "电钢高位");
// dic.Add("ModbusLowPosition", "电钢低位");
// Dictionary<string, KTKStorePostion> ddd = LoadCVSLibrary.CSVReaderHelper<KTKStorePostion>.ReadCVS(path, dic, typeof(KTKStorePostion));
// if (ddd != null)
// {
// MessageBox.Show("读取成功!");
// }
// else
// {
// MessageBox.Show("读取失败,请检查数据格式!");
// }
//}
} }
......
...@@ -2,24 +2,27 @@ ...@@ -2,24 +2,27 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary namespace OnlineStore.LoadCSVLibrary
{ {
public enum IO_VALUE public class StringPostion :StorePostionBase
{ {
/// <summary> /// <summary>
/// 未知 /// 上料X轴
/// </summary> /// </summary>
None = -1, [CSVAttribute("上料X轴"),Editable(1)]
public int X_P2 { get; set; }
/// <summary> /// <summary>
/// 低位 /// 上料Y轴
/// </summary> /// </summary>
LOW = 0, [CSVAttribute("上料Y轴"), Editable(2)]
public int Y_P2 { get; set; }
/// <summary> /// <summary>
/// 高位 /// 上料Z轴
/// </summary> /// </summary>
HIGH = 1, [CSVAttribute("上料Z轴"), Editable(3)]
public int Z_P2 { get; set; }
} }
} }
...@@ -13,20 +13,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -13,20 +13,12 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[CSVAttribute("位置")] [CSVAttribute("位置")]
public string PositionNum { get; set; } public string PositionNum { get; set; }
/// <summary> /// <summary>
/// 优先级 /// 备注
/// </summary>
[CSVAttribute("优先级")]
public int Priority { get; set; }
/// <summary>
/// 高
/// </summary>
[CSVAttribute("高度")]
public int BagHigh { get; set; }
/// <summary>
/// 宽
/// </summary> /// </summary>
[CSVAttribute("宽度")] [CSVAttribute("备注")]
public int BagWidth { get; set; } public string memo { get; set; }
} }
} }
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
...@@ -135,16 +136,15 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -135,16 +136,15 @@ namespace OnlineStore.LoadCSVLibrary
} }
return configList; return configList;
} }
public static DeviceConfig LoadConfig<T>(DeviceConfig config) public static DeviceConfig LoadConfig<T>(DeviceConfig config)
{ {
LogUtil.info("开始读取文件:" + config.ConfigFilePath); LogUtil.info("开始读取文件:" + config.ConfigFilePath);
if (config == null || config.ConfigFilePath.Equals("")) if (config == null || !File.Exists(config.ConfigFilePath))
{ {
throw new Exception("没有配置配置文件路径"); throw new Exception("没有找到配置文件:"+ config.ConfigFilePath);
//return null;
} }
List<ConfigBase> configBasesList = ReadConfig(config.ConfigFilePath); List<ConfigBase> configBasesList = ReadConfig(config.ConfigFilePath);
config.LoadConfig<T>(configBasesList); config.LoadConfig<T>(configBasesList);
return config; return config;
......
...@@ -65,6 +65,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -65,6 +65,10 @@ namespace OnlineStore.LoadCSVLibrary
public class ConfigMoveAxis : ConfigBase public class ConfigMoveAxis : ConfigBase
{ {
/// <summary> /// <summary>
/// 屏蔽伺服
/// </summary>
public bool Disable = false;
/// <summary>
/// 伺服ON的Do信号 /// 伺服ON的Do信号
/// </summary> /// </summary>
public string ServerOnDO = ""; public string ServerOnDO = "";
...@@ -113,7 +117,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -113,7 +117,7 @@ namespace OnlineStore.LoadCSVLibrary
} }
public bool IsSameAxis(string portName, int slv) public bool IsSameAxis(string portName, int slv)
{ {
if (DeviceName.Equals(portName) && slv.Equals(GetAxisValue())) if (slv.Equals(GetAxisValue()))
{ {
return true; return true;
} }
...@@ -172,10 +176,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -172,10 +176,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
get get
{ {
return ElectricalDefinition + "-" + Explain + "-" + ProName + ""; return ElectricalDefinition + "-" + Explain;// + "-" + ProName + "";
}
set
{
} }
} }
ushort value = 0; ushort value = 0;
......
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class Config_T1 : DeviceConfig
{
public Config_T1()
: base()
{
}
public Config_T1(int id, string type, string filepath)
: base(id, type, filepath)
{
}
public override List<ConfigMoveAxis> moveAxisList { get; set; }
/// <summary>
/// AXIS,,出料提升轴,T_Batch_Axis,6,HC,,8000,15000,15000,500,4000,15000,10,100,0,0
/// </summary>
[ConfigProAttribute("T_Batch_Axis")]
public ConfigMoveAxis T_Batch_Axis { get; set; }
/// <summary>
/// AXIS,,出料移栽轴,T_Pan_Axis,7,HC,,20000,30000,30000,500,4000,15000,10,100,0,0
/// </summary>
[ConfigProAttribute("T_Pan_Axis")]
public ConfigMoveAxis T_Pan_Axis { get; set; }
/// <summary>
/// AXIS,,出料升降轴,T_Updown_Axis,8,HC,,20000,30000,30000,500,4000,15000,10,100,0,0
/// </summary>
[ConfigProAttribute("T_Updown_Axis")]
public ConfigMoveAxis T_Updown_Axis { get; set; }
/// <summary>
/// AXIS,,皮带线出口定位,T_TrayPos_Axis,9,HC,,35000,60000,60000,1000,5000,20000,500,100,0,0
/// </summary>
[ConfigProAttribute("T_TrayPos_Axis")]
public ConfigMoveAxis T_TrayPos_Axis { get; set; }
/// <summary>
/// AXIS,,出料移栽Y轴,T_Y_Axis,10,HC,,20000,30000,30000,500,4000,15000,10,100,0,0
/// </summary>
[ConfigProAttribute("T_Y_Axis")]
public ConfigMoveAxis T_Y_Axis { get; set; }
/// <summary>
/// PRO,30,TrayPos定位列表,TrayPos_List,8=999;12=99;20=999,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("TrayPos_List")]
public string TrayPos_List { get; set; }
/// <summary>
/// PRO,30,提升轴待机点 P1,BatchAxis_P1,500,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P1")]
public int BatchAxis_P1 { get; set; }
/// <summary>
/// PRO,30,提升轴上升目标点_P2,BatchAxis_P2,562083,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P2")]
public int BatchAxis_P2 { get; set; }
/// <summary>
/// PRO,30,提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,996,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_ChangeValue")]
public int BatchAxis_ChangeValue { get; set; }
/// <summary>
/// PRO,30,升降轴待机点P1,UpdownAxis_P1,7,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P1")]
public int UpdownAxis_P1 { get; set; }
/// <summary>
/// PRO,30,升降轴取料点P2,UpdownAxis_P2,6,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P2")]
public int UpdownAxis_P2 { get; set; }
/// <summary>
/// PRO,30,升降轴高度转换系数(1mm对应的脉冲),UpdownAxis_ChangeValue,5,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_ChangeValue")]
public int UpdownAxis_ChangeValue { get; set; }
/// <summary>
/// PRO,30,升降轴放料点P3,UpdownAxis_P3,200,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P3")]
public int UpdownAxis_P3 { get; set; }
/// <summary>
/// PRO,30,提升轴待机点 P1,BatchAxis_P1,500,,,8000,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P1_speed")]
public int BatchAxis_P1_speed { get; set; }
/// <summary>
/// PRO,30,提升轴上升目标点_P2,BatchAxis_P2,562083,,,8000,,,,,,,,,
/// </summary>
[ConfigProAttribute("BatchAxis_P2_speed")]
public int BatchAxis_P2_speed { get; set; }
/// <summary>
/// PRO,30,横移待机取料点P1,Pan_P1,9,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Pan_P1")]
public int Pan_P1 { get; set; }
/// <summary>
/// PRO,30,横移放料点P2,Pan_P2,9,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Pan_P2")]
public int Pan_P2 { get; set; }
/// <summary>
/// PRO,30,升降轴待机点P1,UpdownAxis_P1,7,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P1_speed")]
public int UpdownAxis_P1_speed { get; set; }
/// <summary>
/// PRO,30,升降轴取料点P2,UpdownAxis_P2,6,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P2_speed")]
public int UpdownAxis_P2_speed { get; set; }
/// <summary>
/// PRO,30,升降轴放料点P3,UpdownAxis_P3,200,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("UpdownAxis_P3_speed")]
public int UpdownAxis_P3_speed { get; set; }
/// <summary>
/// PRO,30,横移待机取料点P1,Pan_P1,9,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Pan_P1_speed")]
public int Pan_P1_speed { get; set; }
/// <summary>
/// PRO,30,横移放料点P2,Pan_P2,9,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Pan_P2_speed")]
public int Pan_P2_speed { get; set; }
/// <summary>
/// PRO,30,料盘定位待机点P1,TrayPos_P1,0,,,35000,,,,,,,,,
/// </summary>
[ConfigProAttribute("TrayPos_P1")]
public int TrayPos_P1 { get; set; }
/// <summary>
/// PRO,30,料盘定位待机点P1,TrayPos_P1,0,,,35000,,,,,,,,,
/// </summary>
[ConfigProAttribute("TrayPos_P1_speed")]
public int TrayPos_P1_speed { get; set; }
/// <summary>
/// PRO,30,料串中心点X坐标,String_Center_X,1000,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("String_Center_X")]
public int String_Center_X { get; set; }
/// <summary>
/// PRO,30,料串中心点Y坐标,String_Center_Y,1000,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("String_Center_Y")]
public int String_Center_Y { get; set; }
/// <summary>
/// PRO,30,料串允许偏离像素值,String_Offset_Range_Px,1000,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("String_Offset_Range_Px")]
public int String_Offset_Range_Px { get; set; }
/// <summary>
/// PRO,30,料串定位相机,String_Camera,GigE:MV-CE200-10GC (00F98806639),,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("String_Camera")]
public string String_Camera { get; set; }
/// <summary>
/// PRO,20,Y轴待机取料点P1,Y_P1,5700,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Y_P1")]
public int Y_P1 { get; set; }
/// <summary>
/// PRO,20,Y轴放料基准点P2,Y_P2,77614,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Y_P2")]
public int Y_P2 { get; set; }
/// <summary>
/// PRO,30,料串图像/X轴比值,Cam_Pixel_X_Ratio,147,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Cam_Pixel_X_Ratio")]
public int Cam_Pixel_X_Ratio { get; set; }
/// <summary>
/// PRO,30,料串图像/Y轴比值,Cam_Pixel_Y_Ratio,147,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("Cam_Pixel_Y_Ratio")]
public int Cam_Pixel_Y_Ratio { get; set; }
/// <summary>
/// PRO,20,Y轴待机取料点P1,Y_P1,5700,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Y_P1_speed")]
public int Y_P1_speed { get; set; }
/// <summary>
/// PRO,20,Y轴放料基准点P2,Y_P2,77614,,,20000,,,,,,,,,
/// </summary>
[ConfigProAttribute("Y_P2_speed")]
public int Y_P2_speed { get; set; }
private Dictionary<int, int> TrayPos_ListMap = null;
public int GetTrayPos(int width = 8)
{
TrayPos_ListMap = LoadPMap(TrayPos_ListMap, TrayPos_List);
if (TrayPos_ListMap.ContainsKey(width))
{
return TrayPos_ListMap[width];
}
else if (TrayPos_ListMap.ContainsKey(0))
{
return TrayPos_ListMap[0];
}
return -1;
}
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class DischargeLine_Config : DeviceConfig
{
public DischargeLine_Config()
: base()
{
}
public DischargeLine_Config(int id, string cid, string type, string filepath)
: base(id, cid, LoadCSVLibrary.DeviceType.DischargeLine, filepath)
{
}
/// <summary>
/// 设备是否处于调试状态(1=调试,0=正常)
/// </summary>
[ConfigProAttribute("IsDebug")]
public int IsDebug { get; set; }
/// <summary>
/// PRO,0,扫码的相机名称(多个用#分隔),CameraNameList,Name1#Name1,,,,,
/// </summary>
[ConfigProAttribute("CameraNameList")]
public string CameraNameList { get; set; }
private List<string> CameraList = null;
public List<string> GetCameraList()
{
if (CameraList == null)
{
CameraList = new List<string>();
string[] arrayList = CameraNameList.Split('#');
foreach (string str in arrayList)
{
string camera = str.Trim();
if (string.IsNullOrEmpty(camera).Equals(false))
{
CameraList.Add(camera);
}
}
}
return CameraList;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class IO_Filter_Type
{
/// <summary>
/// DO,0,皮带线3启动,Line3_Run,21,HC,Y21,,,,,,,,,,
/// </summary>
public static string Line3_Run = "Line3_Run";
/// <summary>
/// DI,0,NG料阻挡料盘检测,NG_TaryStop_Check,26,HC,X26,,,,,,,,,,
/// </summary>
public static string NG_TaryStop_Check = "NG_TaryStop_Check";
/// <summary>
/// DI,0,NG料阻挡上升端,NG_TaryStop_Up,27,HC,X27,,,,,,,,,,
/// </summary>
public static string NG_TaryStop_Up = "NG_TaryStop_Up";
/// <summary>
/// DI,0,NG料阻挡下降端,NG_TaryStop_Down,28,HC,X28,,,,,,,,,,
/// </summary>
public static string NG_TaryStop_Down = "NG_TaryStop_Down";
/// <summary>
/// DI,0,NG料推送前进端,NG_GetOut_Fwd,29,HC,X29,,,,,,,,,,
/// </summary>
public static string NG_GetOut_Fwd = "NG_GetOut_Fwd";
/// <summary>
/// DI,0,NG料推送后退端,NG_GetOut_Bck,30,HC,X30,,,,,,,,,,
/// </summary>
public static string NG_GetOut_Bck = "NG_GetOut_Bck";
/// <summary>
/// DI,0,纸质料阻挡料盘检测,Paper_TaryStop_Check,31,HC,X31,,,,,,,,,,
/// </summary>
public static string Paper_TaryStop_Check = "Paper_TaryStop_Check";
/// <summary>
/// DI,0,纸质料阻挡上升端,Paper_TaryStop_Up,16,HC,X32,,,,,,,,,,
/// </summary>
public static string Paper_TaryStop_Up = "Paper_TaryStop_Up";
/// <summary>
/// DI,0,纸质料阻挡下降端,Paper_TaryStop_Down,17,HC,X33,,,,,,,,,,
/// </summary>
public static string Paper_TaryStop_Down = "Paper_TaryStop_Down";
/// <summary>
/// DI,0,纸质料推送前进端,Paper_GetOut_Fwd,18,HC,X34,,,,,,,,,,
/// </summary>
public static string Paper_GetOut_Fwd = "Paper_GetOut_Fwd";
/// <summary>
/// DI,0,纸质料推送后退端,Paper_GetOut_Bck,19,HC,X35,,,,,,,,,,
/// </summary>
public static string Paper_GetOut_Bck = "Paper_GetOut_Bck";
/// <summary>
/// DI,0,MSD料阻挡料盘检测,MSD_TaryStop_Check,20,HC,X36,,,,,,,,,,
/// </summary>
public static string MSD_TaryStop_Check = "MSD_TaryStop_Check";
/// <summary>
/// DI,0,MSD料阻挡上升端,MSD_TaryStop_Up,21,HC,X37,,,,,,,,,,
/// </summary>
public static string MSD_TaryStop_Up = "MSD_TaryStop_Up";
/// <summary>
/// DI,0,MSD料阻挡下降端,MSD_TaryStop_Down,22,HC,X38,,,,,,,,,,
/// </summary>
public static string MSD_TaryStop_Down = "MSD_TaryStop_Down";
/// <summary>
/// DI,0,MSD料推送前进端,MSD_GetOut_Fwd,23,HC,X39,,,,,,,,,,
/// </summary>
public static string MSD_GetOut_Fwd = "MSD_GetOut_Fwd";
/// <summary>
/// DI,0,MSD料推送后退端,MSD_GetOut_Bck,24,HC,X40,,,,,,,,,,
/// </summary>
public static string MSD_GetOut_Bck = "MSD_GetOut_Bck";
/// <summary>
/// DO,0,NG料阻挡上升,NG_TaryStop_Up,28,HC,Y28,,,,,,,,,,
/// </summary>
//public static string NG_TaryStop_Up = "NG_TaryStop_Up";
/// <summary>
/// DO,0,NG料阻挡下降,NG_TaryStop_Down,29,HC,Y29,,,,,,,,,,
/// </summary>
//public static string NG_TaryStop_Down = "NG_TaryStop_Down";
/// <summary>
/// DO,0,NG料推送前进,NG_GetOut_Fwd,30,HC,Y30,,,,,,,,,,
/// </summary>
//public static string NG_GetOut_Fwd = "NG_GetOut_Fwd";
/// <summary>
/// DO,0,NG料推送后退,NG_GetOut_Bck,31,HC,Y31,,,,,,,,,,
/// </summary>
//public static string NG_GetOut_Bck = "NG_GetOut_Bck";
/// <summary>
/// DO,0,纸质料阻挡上升,Paper_TaryStop_Up,32,HC,Y32,,,,,,,,,,
/// </summary>
//public static string Paper_TaryStop_Up = "Paper_TaryStop_Up";
/// <summary>
/// DO,0,纸质料阻挡下降,Paper_TaryStop_Down,33,HC,Y33,,,,,,,,,,
/// </summary>
//public static string Paper_TaryStop_Down = "Paper_TaryStop_Down";
/// <summary>
/// DO,0,纸质料推送前进,Paper_GetOut_Fwd,34,HC,Y34,,,,,,,,,,
/// </summary>
//public static string Paper_GetOut_Fwd = "Paper_GetOut_Fwd";
/// <summary>
/// DO,0,纸质料推送后退,Paper_GetOut_Bck,35,HC,Y35,,,,,,,,,,
/// </summary>
//public static string Paper_GetOut_Bck = "Paper_GetOut_Bck";
/// <summary>
/// DO,0,MSD料阻挡上升,MSD_TaryStop_Up,36,HC,Y36,,,,,,,,,,
/// </summary>
//public static string MSD_TaryStop_Up = "MSD_TaryStop_Up";
/// <summary>
/// DO,0,MSD料阻挡下降,MSD_TaryStop_Down,37,HC,Y37,,,,,,,,,,
/// </summary>
//public static string MSD_TaryStop_Down = "MSD_TaryStop_Down";
/// <summary>
/// DO,0,MSD料推送前进,MSD_GetOut_Fwd,38,HC,Y38,,,,,,,,,,
/// </summary>
//public static string MSD_GetOut_Fwd = "MSD_GetOut_Fwd";
/// <summary>
/// DO,0,MSD料推送后退,MSD_GetOut_Bck,39,HC,Y39,,,,,,,,,,
/// </summary>
//public static string MSD_GetOut_Bck = "MSD_GetOut_Bck";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class IO_Label_Type
{
/// <summary>
/// DI,0,急停(贴标设备),SuddenStop_BTN,16,HC,X16,,,,,,,,,,
/// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <summary>
/// DI,0,贴标机构复位,Reset_BTN,17,HC,X17,,,,,,,,,,
/// </summary>
public static string Reset_BTN = "Reset_BTN";
/// <summary>
/// DI,0,皮带线阻挡1料盘检测,Tray_Check,18,HC,X18,,,,,,,,,,
/// </summary>
public static string Tray_Check = "Tray_Check";
/// <summary>
/// DI,0,皮带线阻挡1上升端,TrayStop_Up,19,HC,X19,,,,,,,,,,
/// </summary>
public static string TrayStop_Up = "TrayStop_Up";
/// <summary>
/// DI,0,皮带线阻挡1下降端,TrayStop_Down,20,HC,X20,,,,,,,,,,
/// </summary>
public static string TrayStop_Down = "TrayStop_Down";
/// <summary>
/// DI,0,皮带线料盘检测,Line_HasTray_Check,21,HC,X21,,,,,,,,,,
/// </summary>
public static string Line_HasTray_Check = "Line_HasTray_Check";
/// <summary>
/// DI,0,贴标阻挡料盘检测,Label_TaryStop_Check,22,HC,X22,,,,,,,,,,
/// </summary>
public static string Label_TaryStop_Check = "Label_TaryStop_Check";
/// <summary>
/// DI,0,贴标阻挡上升端,Label_Stop_Up,23,HC,X23,,,,,,,,,,
/// </summary>
public static string Label_Stop_Up = "Label_Stop_Up";
/// <summary>
/// DI,0,贴标阻挡下降端,Label_Stop_Down,24,HC,X24,,,,,,,,,,
/// </summary>
public static string Label_Stop_Down = "Label_Stop_Down";
/// <summary>
/// DI,0,吸嘴取标检测,Label_Cylinder_Check,25,HC,X25,,,,,,,,,,
/// </summary>
public static string Label_Cylinder_Check = "Label_Cylinder_Check";
/// <summary>
/// DO,0,贴标机构运行指示灯,Run_Led,16,HC,Y16,,,,,,,,,,
/// </summary>
public static string Run_Led = "Run_Led";
/// <summary>
/// DO,0,贴标机构故障指示灯,Alarm_Led,17,HC,Y17,,,,,,,,,,
/// </summary>
public static string Alarm_Led = "Alarm_Led";
/// <summary>
/// DO,0,贴标机构相机光源打开,Camera_Led,18,HC,Y18,,,,,,,,,,
/// </summary>
public static string Camera_Led = "Camera_Led";
/// <summary>
/// DO,0,皮带线1启动,Line1_Run,19,HC,Y19,,,,,,,,,,
/// </summary>
public static string Line1_Run = "Line1_Run";
/// <summary>
/// DO,0,皮带线2启动,Line2_Run,20,HC,Y20,,,,,,,,,,
/// </summary>
public static string Line2_Run = "Line2_Run";
/// <summary>
/// DO,0,皮带线阻挡1上升,TrayStop_Up,23,HC,Y23,,,,,,,,,,
/// </summary>
//public static string TrayStop_Up = "TrayStop_Up";
/// <summary>
/// DO,0,皮带线阻挡1下降,TrayStop_Down,24,HC,Y24,,,,,,,,,,
/// </summary>
// public static string TrayStop_Down = "TrayStop_Down";
/// <summary>
/// DO,0,贴标阻挡上升,LabelStop_Up,25,HC,Y25,,,,,,,,,,
/// </summary>
//public static string Label_Stop_Up = "Label_Stop_Up";
/// <summary>
/// DO,0,贴标阻挡下降,LabelStop_Down,26,HC,Y26,,,,,,,,,,
/// </summary>
//public static string Label_Stop_Down = "Label_Stop_Down";
/// <summary>
/// DO,0,吸嘴取标,LabelCylinder_Work,27,HC,Y27,,,,,,,,,,
/// </summary>
public static string LabelCylinder_Work = "LabelCylinder_Work";
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary
{
public class IO_T1_Type
{
/// <summary>
/// DO,0,皮带线4启动,Line4_Run,22,HC,Y22,,,,,,,,,,
/// </summary>
public static string Line4_Run = "Line4_Run";
/// <summary>
/// DI,0,皮带线出口料盘检测,End_Line_Tray_Check,41,HC,X41,,,,,,,,,,
/// </summary>
public static string End_Line_Tray_Check = "End_Line_Tray_Check";
/// <summary>
/// DI,0,皮带线出口顶升料盘检测,End_Lift_Tray_Check,42,HC,X42,,,,,,,,,,
/// </summary>
public static string End_Lift_Tray_Check = "End_Lift_Tray_Check";
/// <summary>
/// DI,0,出口顶升气缸上升端,End_Lift_Cylinder_Up,43,HC,X43,,,,,,,,,,
/// </summary>
public static string End_Lift_Cylinder_Up = "End_Lift_Cylinder_Up";
/// <summary>
/// DI,0,出口顶升气缸下降端,End_Lift_Cylinder_Down,44,HC,X44,,,,,,,,,,
/// </summary>
public static string End_Lift_Cylinder_Down = "End_Lift_Cylinder_Down";
/// <summary>
/// DI,0,急停(T1机构),SuddenStop_BTN,45,HC,X45,,,,,,,,,,
/// </summary>
public static string SuddenStop_BTN = "SuddenStop_BTN";
/// <summary>
/// DI,0,T1机构复位,Reset_BTN,46,HC,X46,,,,,,,,,,
/// </summary>
public static string Reset_BTN = "Reset_BTN";
/// <summary>
/// DI,0,空料串线体入口检测,Empty_LineIn_Check,47,HC,X47,,,,,,,,,,
/// </summary>
public static string Empty_LineIn_Check = "Empty_LineIn_Check";
/// <summary>
/// DI,0,空料串线体阻挡料串检测,EmptyString_In_Check,48,HC,X48,,,,,,,,,,
/// </summary>
public static string EmptyString_In_Check = "EmptyString_In_Check";
/// <summary>
/// DI,0,空料串线体横移料串检测,EmptyString_End_Check,49,HC,X49,,,,,,,,,,
/// </summary>
public static string EmptyString_End_Check = "EmptyString_End_Check";
/// <summary>
/// DI,0,空料串线体顶升上升端,EmptyString_Lift_Up,50,HC,X50,,,,,,,,,,
/// </summary>
public static string EmptyString_Lift_Up = "EmptyString_Lift_Up";
/// <summary>
/// DI,0,空料串线体顶升下降端,EmptyString_Lift_Down,51,HC,X51,,,,,,,,,,
/// </summary>
public static string EmptyString_Lift_Down = "EmptyString_Lift_Down";
/// <summary>
/// DI,0,T1定位工位料串检测,T1_Lift_Tray_Check,52,HC,X52,,,,,,,,,,
/// </summary>
public static string T1_Lift_Tray_Check = "T1_Lift_Tray_Check";
/// <summary>
/// DI,0,T1定位气缸1上升端,T1_Location1_Cylinder_Up,53,HC,X53,,,,,,,,,,
/// </summary>
public static string T1_Location1_Cylinder_Up = "T1_Location1_Cylinder_Up";
/// <summary>
/// DI,0,T1定位气缸1下降端,T1_Location1_Cylinder_Down,54,HC,X54,,,,,,,,,,
/// </summary>
public static string T1_Location1_Cylinder_Down = "T1_Location1_Cylinder_Down";
/// <summary>
/// DI,0,T1定位气缸2上升端,T1_Location2_Cylinder_Up,55,HC,X55,,,,,,,,,,
/// </summary>
public static string T1_Location2_Cylinder_Up = "T1_Location2_Cylinder_Up";
/// <summary>
/// DI,0,T1定位气缸2下降端,T1_Location2_Cylinder_Down,56,HC,X56,,,,,,,,,,
/// </summary>
public static string T1_Location2_Cylinder_Down = "T1_Location2_Cylinder_Down";
/// <summary>
/// DI,0,T1定位工位顶升上升端,T1_Lift_Up,57,HC,X57,,,,,,,,,,
/// </summary>
public static string T1_Lift_Up = "T1_Lift_Up";
/// <summary>
/// DI,0,T1定位工位顶升下降端,T1_Lift_Down,58,HC,X58,,,,,,,,,,
/// </summary>
public static string T1_Lift_Down = "T1_Lift_Down";
/// <summary>
/// DI,0,T1料叉气缸前进端,Fork_Cylinder_Fwd,59,HC,X59,,,,,,,,,,
/// </summary>
public static string Fork_Cylinder_Fwd = "Fork_Cylinder_Fwd";
/// <summary>
/// DI,0,T1料叉气缸后退端,Fork_Cylinder_Bck,60,HC,X60,,,,,,,,,,
/// </summary>
public static string Fork_Cylinder_Bck = "Fork_Cylinder_Bck";
/// <summary>
/// DI,0,T1出口前阻挡料串检测,T1_Wait_Check,61,HC,X61,,,,,,,,,,
/// </summary>
public static string T1_Wait_Check = "T1_Wait_Check";
/// <summary>
/// DI,0,T1出口料串检测,T1_Out_Check,62,HC,X62,,,,,,,,,,
/// </summary>
public static string T1_Out_Check = "T1_Out_Check";
/// <summary>
/// DI,0,T1伺服定位料盘检测,T1_Tray_Check,63,HC,X63,,,,,,,,,,
/// </summary>
public static string T1_Tray_Check = "T1_Tray_Check";
/// <summary>
/// DO,0,出口顶升气缸上升,End_Lift_Cylinder_Up,40,HC,Y40,,,,,,,,,,
/// </summary>
//public static string End_Lift_Cylinder_Up = "End_Lift_Cylinder_Up";
/// <summary>
/// DO,0,出口顶升气缸下降,End_Lift_Cylinder_Down,41,HC,Y41,,,,,,,,,,
/// </summary>
//public static string End_Lift_Cylinder_Down = "End_Lift_Cylinder_Down";
/// <summary>
/// DO,0,T1运行指示灯,Run_Led,42,HC,Y42,,,,,,,,,,
/// </summary>
public static string Run_Led = "Run_Led";
/// <summary>
/// DO,0,T1故障指示灯,Alarm_Led,43,HC,Y43,,,,,,,,,,
/// </summary>
public static string Alarm_Led = "Alarm_Led";
/// <summary>
/// DO,0,空料串线体运转,End_Line_Run,44,HC,Y44,,,,,,,,,,
/// </summary>
public static string Empty_Line_Run = "Empty_Line_Run";
/// <summary>
/// DO,0,T1出料串线体运转,Line_Out_Run,45,HC,Y45,,,,,,,,,,
/// </summary>
public static string Line_Out_Run = "Line_Out_Run";
/// <summary>
/// DO,0,空料串线体横移电机运转,EmptyString_Sliding_Run,46,HC,Y46,,,,,,,,,,
/// </summary>
public static string EmptyString_Sliding_Run = "EmptyString_Sliding_Run";
/// <summary>
/// DO,0,T1定位工位横移电机运转,T1String_Sliding_Run,47,HC,Y47,,,,,,,,,,
/// </summary>
public static string T1String_Sliding_Run = "T1String_Sliding_Run";
/// <summary>
/// DO,0,T1线体过渡滚筒运转,T1_Sliding_Run,48,HC,Y48,,,,,,,,,,
/// </summary>
public static string T1_Sliding_Run = "T1_Sliding_Run";
/// <summary>
/// DO,0,空料串线体顶升上升,EmptyString_Lift_Up,49,HC,Y49,,,,,,,,,,
/// </summary>
//public static string EmptyString_Lift_Up = "EmptyString_Lift_Up";
/// <summary>
/// DO,0,空料串线体顶升下降,EmptyString_Lift_Down,50,HC,Y50,,,,,,,,,,
/// </summary>
//public static string EmptyString_Lift_Down = "EmptyString_Lift_Down";
/// <summary>
/// DO,0,T1定位工位顶升上升,T1_Lift_Up,51,HC,Y51,,,,,,,,,,
/// </summary>
//public static string T1_Lift_Up = "T1_Lift_Up";
/// <summary>
/// DO,0,T1定位工位顶升下降,T1_Lift_Down,52,HC,Y52,,,,,,,,,,
/// </summary>
//public static string T1_Lift_Down = "T1_Lift_Down";
/// <summary>
/// DO,0,T1定位气缸上升,T1_Location_Cylinder_Up,53,HC,Y53,,,,,,,,,,
/// </summary>
public static string T1_Location_Cylinder_Up = "T1_Location_Cylinder_Up";
/// <summary>
/// DO,0,T1定位气缸下降,T1_Location_Cylinder_Down,54,HC,Y54,,,,,,,,,,
/// </summary>
public static string T1_Location_Cylinder_Down = "T1_Location_Cylinder_Down";
/// <summary>
/// DO,0,T1料叉气缸前进端,Fork_Cylinder_Fwd,55,HC,Y55,,,,,,,,,,
/// </summary>
//public static string Fork_Cylinder_Fwd = "Fork_Cylinder_Fwd";
/// <summary>
/// DO,0,T1料叉气缸后退端,Fork_Cylinder_Bck,56,HC,Y56,,,,,,,,,,
/// </summary>
//public static string Fork_Cylinder_Bck = "Fork_Cylinder_Bck";
/// <summary>
/// DO,0,空料串线体入口阻挡下降,EmptyString_In_Stop,57,HC,Y57,,,,,,,,,,
/// </summary>
public static string EmptyString_In_Stop = "EmptyString_In_Stop";
/// <summary>
/// DO,0,空料串线体横移阻挡下降,EmptyString_Wait_Stop,58,HC,Y58,,,,,,,,,,
/// </summary>
public static string EmptyString_Wait_Stop = "EmptyString_Wait_Stop";
/// <summary>
/// DO,0,T1出口前阻挡下降,T1_Wait_Stop,59,HC,Y59,,,,,,,,,,
/// </summary>
public static string T1_Wait_Stop = "T1_Wait_Stop";
/// <summary>
/// DO,0,T1出口阻挡下降,T1_Out_Stop,60,HC,Y60,,,,,,,,,,
/// </summary>
public static string T1_Out_Stop = "T1_Out_Stop";
}
}
...@@ -10,6 +10,8 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -10,6 +10,8 @@ namespace OnlineStore.LoadCSVLibrary
public class IO_XRay_Type public class IO_XRay_Type
{ {
/// <summary> /// <summary>
/// DI,0,急停(点料设备),SuddenStop_BTN,0,HC,X00,,,,,,,,,, /// DI,0,急停(点料设备),SuddenStop_BTN,0,HC,X00,,,,,,,,,,
/// </summary> /// </summary>
...@@ -27,53 +29,69 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -27,53 +29,69 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string Airpressure_Check = "Airpressure_Check"; public static string Airpressure_Check = "Airpressure_Check";
/// <summary> /// <summary>
/// DI,0,上料人工确认,Manual_Confirm_BTN,4,HC,X04,,,,,,,,,, /// DI,0,点料机入口门打开端,Entry_Open,4,HC,X04,,,,,,,,,,
/// </summary> /// </summary>
public static string Manual_Confirm_BTN = "Manual_Confirm_BTN"; public static string Entry_Open = "Entry_Open";
/// <summary> /// <summary>
/// DI,0,上料区料盘检测,Tray_Check,5,HC,X05,,,,,,,,,, /// DI,0,点料机入口门关闭端,Entry_Close,5,HC,X05,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray_Check = "Tray_Check"; public static string Entry_Close = "Entry_Close";
/// <summary> /// <summary>
/// DI,0,上料区7寸料盘检测,Tray7_Check,6,HC,X06,,,,,,,,,, /// DI,0,点料机出口门打开端,Exit_Open,6,HC,X06,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray7_Check = "Tray7_Check"; public static string Exit_Open = "Exit_Open";
/// <summary> /// <summary>
/// DI,0,上料区13寸料盘检测,Tray13_Check,7,HC,X07,,,,,,,,,, /// DI,0,点料机出口门关闭端,Exit_Close,7,HC,X07,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray13_Check = "Tray13_Check"; public static string Exit_Close = "Exit_Close";
/// <summary> /// <summary>
/// DI,0,上料区15寸料盘检测,Tray15_Check,8,HC,X08,,,,,,,,,, /// DI,0,点料机内部料盘检测,Tray_Inside_Check,8,HC,X08,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray15_Check = "Tray15_Check"; public static string Tray_Inside_Check = "Tray_Inside_Check";
/// <summary> /// <summary>
/// DI,0,上料区定位气缸上升端,Location_Cylinder_Up,9,HC,X09,,,,,,,,,, /// DI,0,点料机门禁,Xray_Door_Check,9,HC,X09,,,,,,,,,,
/// </summary> /// </summary>
public static string Location_Cylinder_Up = "Location_Cylinder_Up"; public static string Xray_Door_Check = "Xray_Door_Check";
/// <summary> /// <summary>
/// DI,0,上料区定位气缸下降端,Location_Cylinder_Down,10,HC,X10,,,,,,,,,, /// DI,0,出料皮带线料盘检测,ExitLine_Reel_Check,10,HC,X10,,,,,,,,,,
/// </summary> /// </summary>
public static string Location_Cylinder_Down = "Location_Cylinder_Down"; public static string ExitLine_Reel_Check = "ExitLine_Reel_Check";
/// <summary> /// <summary>
/// DI,0,点料机入口门打开端,Entry_Open,11,HC,X11,,,,,,,,,, /// DI,0,过渡横移吸盘压力检测,SideMove_SuckerReel_Check,11,HC,X11,,,,,,,,,,
/// </summary> /// </summary>
public static string Entry_Open = "Entry_Open"; public static string SideMove_SuckerReel_Check = "SideMove_SuckerReel_Check";
/// <summary> /// <summary>
/// DI,0,点料机入口门关闭端,Entry_Close,12,HC,X12,,,,,,,,,, /// DI,0,上料区光栅检测,SafetyLightCurtains,16,HC,X16,,,,,,,,,,
/// </summary> /// </summary>
public static string Entry_Close = "Entry_Close"; public static string SafetyLightCurtains = "SafetyLightCurtains";
/// <summary> /// <summary>
/// DI,0,点料机出口门打开端,Exit_Open,13,HC,X13,,,,,,,,,, /// DI,0,上料人工确认,Manual_Confirm_BTN,17,HC,X17,,,,,,,,,,
/// </summary> /// </summary>
public static string Exit_Open = "Exit_Open"; public static string Manual_Confirm_BTN = "Manual_Confirm_BTN";
/// <summary> /// <summary>
/// DI,0,点料机出口门关闭端,Exit_Close,14,HC,X14,,,,,,,,,, /// DI,0,上料区料盘检测,Tray_Check,18,HC,X18,,,,,,,,,,
/// </summary> /// </summary>
public static string Exit_Close = "Exit_Close"; public static string Tray_Check = "Tray_Check";
/// <summary> /// <summary>
/// DI,0,点料机内部料盘检测,Tray_Inside_Check,15,HC,X15,,,,,,,,,, /// DI,0,上料区7寸料盘检测,Tray7_Check,19,HC,X19,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray_Inside_Check = "Tray_Inside_Check"; public static string Tray7_Check = "Tray7_Check";
/// <summary>
/// DI,0,上料区13寸料盘检测,Tray13_Check,20,HC,X20,,,,,,,,,,
/// </summary>
public static string Tray13_Check = "Tray13_Check";
/// <summary>
/// DI,0,上料区15寸料盘检测,Tray15_Check,21,HC,X21,,,,,,,,,,
/// </summary>
public static string Tray15_Check = "Tray15_Check";
/// <summary>
/// DI,0,上料区定位气缸上升端,Location_Cylinder_Up,22,HC,X22,,,,,,,,,,
/// </summary>
public static string Location_Cylinder_Up = "Location_Cylinder_Up";
/// <summary>
/// DI,0,上料区定位气缸下降端,Location_Cylinder_Down,23,HC,X23,,,,,,,,,,
/// </summary>
public static string Location_Cylinder_Down = "Location_Cylinder_Down";
/// <summary> /// <summary>
/// DO,0,待机状态(指示灯),Standby_Led,0,HC,Y00,,,,,,,,,, /// DO,0,待机状态(指示灯),Standby_Led,0,HC,Y00,,,,,,,,,,
/// </summary> /// </summary>
...@@ -91,47 +109,34 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -91,47 +109,34 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string Alarm_Buzzer = "Alarm_Buzzer"; public static string Alarm_Buzzer = "Alarm_Buzzer";
/// <summary> /// <summary>
/// DO,0,上料区料盘检测OK,Pass_Led,4,HC,Y04,,,,,,,,,, /// DO,0,出料皮带线启动,ExitLine_Reel_Run,4,HC,Y04,,,,,,,,,,
/// </summary>
public static string Pass_Led = "Pass_Led";
/// <summary>
/// DO,0,上料区料盘检测NG,NG_Led,5,HC,Y05,,,,,,,,,,
/// </summary>
public static string NG_Led = "NG_Led";
/// <summary>
/// DO,0,上料区相机光源打开,Camera_Led,6,HC,Y06,,,,,,,,,,
/// </summary> /// </summary>
public static string Camera_Led = "Camera_Led"; public static string ExitLine_Reel_Run = "ExitLine_Reel_Run";
/// <summary> /// <summary>
/// DO,0,X光机互锁信号ON,Xray_Lock,7,HC,Y07,,,,,,,,,, /// DO,0,X光机互锁信号ON,Xray_Lock,5,HC,Y05,,,,,,,,,,
/// </summary> /// </summary>
public static string Xray_Lock = "Xray_Lock"; public static string Xray_Lock = "Xray_Lock";
/*
/// <summary>
/// DO,0,上料区定位气缸上升,Location_Cylinder_Up,8,HC,Y08,,,,,,,,,,
/// </summary>
public static string Location_Cylinder_Up = "Location_Cylinder_Up";
/// <summary> /// <summary>
/// DO,0,上料区定位气缸下降,Location_Cylinder_Down,9,HC,Y09,,,,,,,,,, /// DO,0,过渡横移吸盘吸料,SideMove_SuckerReel_On,12,HC,Y12,,,,,,,,,,
/// </summary> /// </summary>
public static string Location_Cylinder_Down = "Location_Cylinder_Down"; public static string SideMove_SuckerReel_On = "SideMove_SuckerReel_On";
/// <summary> /// <summary>
/// DO,0,点料机入口门打开,Entry_Open,10,HC,Y10,,,,,,,,,, /// DO,0,过渡横移吸盘放料,SideMove_SuckerReel_Off,13,HC,Y13,,,,,,,,,,
/// </summary> /// </summary>
public static string Entry_Open = "Entry_Open"; public static string SideMove_SuckerReel_Off = "SideMove_SuckerReel_Off";
/// <summary> /// <summary>
/// DO,0,点料机入口门关闭,Entry_Close,11,HC,Y11,,,,,,,,,, /// DO,0,上料区料盘检测OK,Pass_Led,16,HC,Y16,,,,,,,,,,
/// </summary> /// </summary>
public static string Entry_Close = "Entry_Close"; public static string Pass_Led = "Pass_Led";
/// <summary> /// <summary>
/// DO,0,点料机出口门打开,Exit_Open,12,HC,Y12,,,,,,,,,, /// DO,0,上料区料盘检测NG,NG_Led,17,HC,Y17,,,,,,,,,,
/// </summary> /// </summary>
public static string Exit_Open = "Exit_Open"; public static string NG_Led = "NG_Led";
/// <summary> /// <summary>
/// DO,0,点料机出口门关闭,Exit_Close,13,HC,Y13,,,,,,,,,, /// DO,0,上料区相机光源打开,Camera_Led,18,HC,Y18,,,,,,,,,,
/// </summary> /// </summary>
public static string Exit_Close = "Exit_Close"; public static string Camera_Led = "Camera_Led";
*/
/// <summary> /// <summary>
/// ADIO,0,左侧7寸料盘模拟量检测,Tray7_L_ADIO,0,HC,A00,,,,,,,,,, /// ADIO,0,左侧7寸料盘模拟量检测,Tray7_L_ADIO,0,HC,A00,,,,,,,,,,
...@@ -146,17 +151,32 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -146,17 +151,32 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string Tray15_L_ADIO = "Tray15_L_ADIO"; public static string Tray15_L_ADIO = "Tray15_L_ADIO";
/// <summary> /// <summary>
/// ADIO,0,右侧7寸料盘模拟量检测,Tray7_R_ADIO,3,HC,A03,,,,,,,,,, /// ADIO,0,右侧7寸料盘模拟量检测,Tray7_R_ADIO,4,HC,A03,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray7_R_ADIO = "Tray7_R_ADIO"; public static string Tray7_R_ADIO = "Tray7_R_ADIO";
/// <summary> /// <summary>
/// ADIO,0,右侧13寸料盘模拟量检测,Tray13_R_ADIO,4,HC,A04,,,,,,,,,, /// ADIO,0,右侧13寸料盘模拟量检测,Tray13_R_ADIO,5,HC,A04,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray13_R_ADIO = "Tray13_R_ADIO"; public static string Tray13_R_ADIO = "Tray13_R_ADIO";
/// <summary> /// <summary>
/// ADIO,0,右侧15寸料盘模拟量检测,Tray15_R_ADIO,5,HC,A05,,,,,,,,,, /// ADIO,0,右侧15寸料盘模拟量检测,Tray15_R_ADIO,6,HC,A05,,,,,,,,,,
/// </summary> /// </summary>
public static string Tray15_R_ADIO = "Tray15_R_ADIO"; public static string Tray15_R_ADIO = "Tray15_R_ADIO";
}
}
public enum IO_VALUE
{
/// <summary>
/// 未知
/// </summary>
None = -1,
/// <summary>
/// 低位
/// </summary>
LOW = 0,
/// <summary>
/// 高位
/// </summary>
HIGH = 1,
}
} }
...@@ -8,31 +8,19 @@ using System.Threading.Tasks; ...@@ -8,31 +8,19 @@ using System.Threading.Tasks;
namespace OnlineStore.LoadCSVLibrary namespace OnlineStore.LoadCSVLibrary
{ {
public class Config_Filter : DeviceConfig public class Robot_Config : DeviceConfig
{ {
public Config_Filter() public Robot_Config()
: base() : base()
{ {
} }
public Config_Filter(int id, string type, string filepath) public Robot_Config(int id, string type, string filepath)
: base(id, type, filepath) : base(id, type, filepath)
{ {
} }
/// <summary>
/// PRO,30,NG料盒最大容量,NG_BOX_MAXCOUNT,50,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("NG_BOX_MAXCOUNT")]
public int NG_BOX_MAXCOUNT { get; set; }
/// <summary>
/// PRO,30,MSD料盒最大容量,MSD_BOX_MAXCOUNT,50,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("MSD_BOX_MAXCOUNT")]
public int MSD_BOX_MAXCOUNT { get; set; }
/// <summary>
/// PRO,30,Paper料盒最大容量,PAPER_BOX_MAXCOUNT,50,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("PAPER_BOX_MAXCOUNT")]
public int PAPER_BOX_MAXCOUNT { get; set; }
} }
} }
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.31112.23 VisualStudioVersion = 17.9.34902.65
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SO853-AutoCountMachine", "SO853-AutoCountMachine\SO853-AutoCountMachine.csproj", "{9B1ED5AF-2A34-43FD-AA2B-5BFB529B848D}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SO1451-AutoCountMachine", "SO853-AutoCountMachine\SO1451-AutoCountMachine.csproj", "{9B1ED5AF-2A34-43FD-AA2B-5BFB529B848D}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "LoadCVSLibrary\LoadCSVLibrary.csproj", "{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadCSVLibrary", "LoadCVSLibrary\LoadCSVLibrary.csproj", "{064BEBF5-8FAA-4EA2-A5F3-A06E6E7D9251}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{43CDD09E-FCF3-4960-A01D-3BBFE9933122}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Common", "Common\Common.csproj", "{43CDD09E-FCF3-4960-A01D-3BBFE9933122}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "DeviceLibrary\DeviceLibrary.csproj", "{E6879E1B-9F25-427C-8E3B-A6E977036313}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeviceLibrary", "DeviceLibrary\DeviceLibrary.csproj", "{BB23296C-AA1D-45C6-9FA6-5A37B2ABFE9B}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
...@@ -29,10 +29,10 @@ Global ...@@ -29,10 +29,10 @@ Global
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.Build.0 = Debug|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.ActiveCfg = Release|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.Build.0 = Release|Any CPU {43CDD09E-FCF3-4960-A01D-3BBFE9933122}.Release|Any CPU.Build.0 = Release|Any CPU
{E6879E1B-9F25-427C-8E3B-A6E977036313}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BB23296C-AA1D-45C6-9FA6-5A37B2ABFE9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6879E1B-9F25-427C-8E3B-A6E977036313}.Debug|Any CPU.Build.0 = Debug|Any CPU {BB23296C-AA1D-45C6-9FA6-5A37B2ABFE9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6879E1B-9F25-427C-8E3B-A6E977036313}.Release|Any CPU.ActiveCfg = Release|Any CPU {BB23296C-AA1D-45C6-9FA6-5A37B2ABFE9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6879E1B-9F25-427C-8E3B-A6E977036313}.Release|Any CPU.Build.0 = Release|Any CPU {BB23296C-AA1D-45C6-9FA6-5A37B2ABFE9B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
using DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AutoCountMachine
{
public partial class FilterControl : UserControl
{
DeviceConfig _Config;
public DeviceConfig Config
{
get { return _Config; }
set
{
_Config = value;
ioControl1.Config = value;
configControl1.Config = value;
}
}
public FilterControl()
{
InitializeComponent();
RoleManger.RoleChange += RoleManger_RoleChange;
}
private void RoleManger_RoleChange(object sender, Role e)
{
tabPage2.Controls[0].Enabled = false;
if (e != Role.Admin)
return;
tabPage2.Controls[0].Enabled = true;
}
private void XrayControl_Load(object sender, EventArgs e)
{
}
private void btn_Reset_Click(object sender, EventArgs e)
{
if (RobotManage.filterMachine.runStatus != RunStatus.HomeReset)
{
RobotManage.filterMachine.BeginHomeReset();
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -40,6 +40,13 @@ namespace AutoCountMachine ...@@ -40,6 +40,13 @@ namespace AutoCountMachine
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.算法匹配最后物料toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.算法匹配最后物料toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.操作权限ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.操作权限ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.操作员ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.操作员ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
...@@ -53,9 +60,7 @@ namespace AutoCountMachine ...@@ -53,9 +60,7 @@ namespace AutoCountMachine
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.label_Productivity = new System.Windows.Forms.Label(); this.label_Productivity = new System.Windows.Forms.Label();
this.btn_PauseBuzzer = new System.Windows.Forms.Button(); this.btn_PauseBuzzer = new System.Windows.Forms.Button();
this.boxResetControl1 = new AutoCountMachine.BoxResetControl();
this.cmb_runmode = new System.Windows.Forms.ComboBox(); this.cmb_runmode = new System.Windows.Forms.ComboBox();
this.btn_releaseshelf = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.listView_reelnfo = new System.Windows.Forms.ListView(); this.listView_reelnfo = new System.Windows.Forms.ListView();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
...@@ -65,13 +70,6 @@ namespace AutoCountMachine ...@@ -65,13 +70,6 @@ namespace AutoCountMachine
this.btn_stop = new System.Windows.Forms.Button(); this.btn_stop = new System.Windows.Forms.Button();
this.btn_run = new System.Windows.Forms.Button(); this.btn_run = new System.Windows.Forms.Button();
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
...@@ -166,6 +164,41 @@ namespace AutoCountMachine ...@@ -166,6 +164,41 @@ namespace AutoCountMachine
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(205, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(205, 6);
// //
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(205, 6);
//
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
...@@ -255,9 +288,7 @@ namespace AutoCountMachine ...@@ -255,9 +288,7 @@ namespace AutoCountMachine
// //
this.tabPage1.Controls.Add(this.label_Productivity); this.tabPage1.Controls.Add(this.label_Productivity);
this.tabPage1.Controls.Add(this.btn_PauseBuzzer); this.tabPage1.Controls.Add(this.btn_PauseBuzzer);
this.tabPage1.Controls.Add(this.boxResetControl1);
this.tabPage1.Controls.Add(this.cmb_runmode); this.tabPage1.Controls.Add(this.cmb_runmode);
this.tabPage1.Controls.Add(this.btn_releaseshelf);
this.tabPage1.Controls.Add(this.groupBox2); this.tabPage1.Controls.Add(this.groupBox2);
this.tabPage1.Controls.Add(this.groupBox1); this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Location = new System.Drawing.Point(4, 30); this.tabPage1.Location = new System.Drawing.Point(4, 30);
...@@ -290,16 +321,6 @@ namespace AutoCountMachine ...@@ -290,16 +321,6 @@ namespace AutoCountMachine
this.btn_PauseBuzzer.Visible = false; this.btn_PauseBuzzer.Visible = false;
this.btn_PauseBuzzer.Click += new System.EventHandler(this.btn_PauseBuzzer_Click); this.btn_PauseBuzzer.Click += new System.EventHandler(this.btn_PauseBuzzer_Click);
// //
// boxResetControl1
//
this.boxResetControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.boxResetControl1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.boxResetControl1.Location = new System.Drawing.Point(790, 249);
this.boxResetControl1.Margin = new System.Windows.Forms.Padding(5);
this.boxResetControl1.Name = "boxResetControl1";
this.boxResetControl1.Size = new System.Drawing.Size(207, 279);
this.boxResetControl1.TabIndex = 5;
//
// cmb_runmode // cmb_runmode
// //
this.cmb_runmode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.cmb_runmode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
...@@ -317,17 +338,6 @@ namespace AutoCountMachine ...@@ -317,17 +338,6 @@ namespace AutoCountMachine
this.cmb_runmode.TabIndex = 4; this.cmb_runmode.TabIndex = 4;
this.cmb_runmode.SelectedIndexChanged += new System.EventHandler(this.cmb_runmode_SelectedIndexChanged); this.cmb_runmode.SelectedIndexChanged += new System.EventHandler(this.cmb_runmode_SelectedIndexChanged);
// //
// btn_releaseshelf
//
this.btn_releaseshelf.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_releaseshelf.Location = new System.Drawing.Point(817, 23);
this.btn_releaseshelf.Name = "btn_releaseshelf";
this.btn_releaseshelf.Size = new System.Drawing.Size(152, 37);
this.btn_releaseshelf.TabIndex = 3;
this.btn_releaseshelf.Text = "强制释放料架";
this.btn_releaseshelf.UseVisualStyleBackColor = true;
this.btn_releaseshelf.Click += new System.EventHandler(this.btn_releaseshelf_Click);
//
// groupBox2 // groupBox2
// //
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
...@@ -435,41 +445,6 @@ namespace AutoCountMachine ...@@ -435,41 +445,6 @@ namespace AutoCountMachine
this.listView1.TabIndex = 7; this.listView1.TabIndex = 7;
this.listView1.UseCompatibleStateImageBehavior = false; this.listView1.UseCompatibleStateImageBehavior = false;
// //
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator11
//
this.toolStripSeparator11.Name = "toolStripSeparator11";
this.toolStripSeparator11.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator12
//
this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(205, 6);
//
// toolStripSeparator13
//
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(205, 6);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
...@@ -519,9 +494,7 @@ namespace AutoCountMachine ...@@ -519,9 +494,7 @@ namespace AutoCountMachine
private System.Windows.Forms.ToolStripMenuItem 点料算法匹配toolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 点料算法匹配toolStripMenuItem;
private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.ListView listView_reelnfo; private System.Windows.Forms.ListView listView_reelnfo;
private System.Windows.Forms.Button btn_releaseshelf;
private System.Windows.Forms.ComboBox cmb_runmode; private System.Windows.Forms.ComboBox cmb_runmode;
private BoxResetControl boxResetControl1;
private System.Windows.Forms.Button btn_PauseBuzzer; private System.Windows.Forms.Button btn_PauseBuzzer;
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.ToolStripMenuItem 操作权限ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 操作权限ToolStripMenuItem;
......
...@@ -17,12 +17,8 @@ namespace AutoCountMachine ...@@ -17,12 +17,8 @@ namespace AutoCountMachine
public partial class Form1 : Form public partial class Form1 : Form
{ {
XrayControl xrayControl = new XrayControl(); XrayControl xrayControl = new XrayControl();
LabelControl labelControl = new LabelControl();
FilterControl filterControl = new FilterControl();
T1Control t1Control = new T1Control();
Dictionary<string, List<Msg>> MsgPool = new Dictionary<string, List<Msg>>(); Dictionary<string, List<Msg>> MsgPool = new Dictionary<string, List<Msg>>();
readonly System.Windows.Forms.Timer t1 = new System.Windows.Forms.Timer(); readonly System.Windows.Forms.Timer t1 = new System.Windows.Forms.Timer();
//EventHandler<List<Msg>> MsgEventHandler; //EventHandler<List<Msg>> MsgEventHandler;
public Form1() public Form1()
...@@ -314,12 +310,6 @@ namespace AutoCountMachine ...@@ -314,12 +310,6 @@ namespace AutoCountMachine
{ {
xrayControl.Config = RobotManage.xrayMachine.Config; xrayControl.Config = RobotManage.xrayMachine.Config;
AddForm("device_xray_name",crc.GetString("device_xray_name", "点料机"), xrayControl); AddForm("device_xray_name",crc.GetString("device_xray_name", "点料机"), xrayControl);
labelControl.Config = RobotManage.labelMachine.Config;
AddForm("device_label_name", crc.GetString("device_label_name", "贴标机"), labelControl);
filterControl.Config = RobotManage.filterMachine.Config;
AddForm("device_filter_name", crc.GetString("device_filter_name", "分料线"), filterControl);
t1Control.Config = RobotManage.t1Machine.Config;
AddForm("device_t1_name", crc.GetString("device_t1_name", "出料线"), t1Control);
RoleManger.SetRole(Role.User); RoleManger.SetRole(Role.User);
LanguageProcess(); LanguageProcess();
} }
...@@ -429,25 +419,6 @@ namespace AutoCountMachine ...@@ -429,25 +419,6 @@ namespace AutoCountMachine
Pn_Algo_Match.LoadFile(); Pn_Algo_Match.LoadFile();
}); });
} }
private void btn_releaseshelf_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning)
{
MessageBox.Show(crc.GetString("device_shelf_cantrelease", "系统未启动,不能释放"));
return;
}
if (RobotManage.t1Machine.ReleaseShelf())
{
MessageBox.Show(crc.GetString("device_shelf_release_success", "料架开始释放"));
}
else
{
MessageBox.Show(crc.GetString("device_shelf_release_failed", "料架释放失败"));
}
}
private void cmb_runmode_SelectedIndexChanged(object sender, EventArgs e) private void cmb_runmode_SelectedIndexChanged(object sender, EventArgs e)
{ {
RobotManage.offlinereelLocation = new ReelLocation(); RobotManage.offlinereelLocation = new ReelLocation();
......
using CodeLibrary;
using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AutoCountMachine
{
public partial class LabelControl : UserControl
{
readonly Timer t1 = new Timer();
DeviceConfig _Config;
public DeviceConfig Config
{
get { return _Config; }
set
{
_Config = value;
ioControl1.Config = value;
configControl1.Config = value;
axisMoveControl1.LoadData(value);
}
}
public LabelControl()
{
InitializeComponent();
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
RoleManger.RoleChange += RoleManger_RoleChange;
}
private void RoleManger_RoleChange(object sender, Role e)
{
tabPage2.Controls[0].Enabled = false;
tabPage3.Controls[0].Enabled = false;
if (e != Role.Admin)
return;
tabPage2.Controls[0].Enabled = true;
tabPage3.Controls[0].Enabled = true;
}
private void XrayControl_Load(object sender, EventArgs e)
{
}
private void RobotManage_LoadFinishEvent(bool state, string msg)
{
if (!state)
return;
if (this.InvokeRequired)
{
this.Invoke((EventHandler)delegate
{
RobotManage_LoadFinishEvent(state, msg);
});
return;
}
cb_printerselect.Items.Clear();
cb_labelselect.Items.Clear();
foreach (string sPrint in System.Drawing.Printing.PrinterSettings.InstalledPrinters)//获取所有打印机名称
{
cb_printerselect.Items.Add(sPrint);
}
if (RobotManage.PrintBean != null)
{
foreach (string labelname in RobotManage.PrintBean.GetLabelName())
{
cb_labelselect.Items.Add(labelname);
}
}
string PrintName = ConfigHelper.Config.Get(Setting_Init.PrinterName);
string labelName = ConfigHelper.Config.Get(Setting_Init.LabelName);
cb_printerselect.Text = PrintName;
cb_labelselect.Text = labelName;
}
private void cb_printerselect_SelectedIndexChanged(object sender, EventArgs e)
{
ConfigHelper.Config.Set(Setting_Init.PrinterName, (sender as ComboBox).Text);
RobotManage.LoadPrintSetting();
}
private void cb_labelselect_SelectedIndexChanged(object sender, EventArgs e)
{
ConfigHelper.Config.Set(Setting_Init.LabelName, (sender as ComboBox).Text);
RobotManage.LoadPrintSetting();
}
private void btn_labeledit_Click(object sender, EventArgs e)
{
RobotManage.PrintBean.EditLabel();
RobotManage_LoadFinishEvent(true, "");
RobotManage.LoadPrintSetting();
}
private void btn_LabelTest_Click(object sender, EventArgs e)
{
if (RobotManage.labelMachine.runStatus != RunStatus.Running)
{
MessageBox.Show("需要设备启动后才可使用");
return;
}
RobotManage.labelMachine.LabelTest();
}
private void btn_Reset_Click(object sender, EventArgs e)
{
if (RobotManage.labelMachine.runStatus != RunStatus.HomeReset) {
RobotManage.labelMachine.BeginHomeReset();
}
}
private void button1_Click(object sender, EventArgs e)
{
RobotManage.labelMachine.saveLabelDebugBmp = true;
var xxx = new Point(2471, 2181);
xxx.X = 5472 - xxx.X;
xxx.Y = 3648 - xxx.Y;
RobotManage.labelMachine.ClacLabel(xxx);
}
private void checkBox_saveLabelDebugBmp_CheckedChanged(object sender, EventArgs e)
{
RobotManage.labelMachine.saveLabelDebugBmp = checkBox_saveLabelDebugBmp.Checked;
}
private void button2_Click(object sender, EventArgs e)
{
Bitmap bmap = new Bitmap("D:\\853string\\Image_20210604173703078.bmp");
EyemDecode.codeType = "QR_CODE|DATA_MATRIX|CODE_39|CODE_128";
for (int i = 5; i < 14; i = i + 2)
{
var result = EyemDecode.Decoder(ref bmap, null,i);
Console.WriteLine($"{i}:{result.Count}");
foreach (var x in result) {
Console.WriteLine(x.CodeStr);
}
}
}
private void btn_line1_run_Click(object sender, EventArgs e)
{
RobotManage.Line1.LineRun("n", 999);
}
private void btn_line1_stop_Click(object sender, EventArgs e)
{
RobotManage.Line1.LineStop ("n");
}
private void btn_line2_run_Click(object sender, EventArgs e)
{
RobotManage.Line2.LineRun("n", 999);
}
private void btn_line2_stop_Click(object sender, EventArgs e)
{
RobotManage.Line2.LineStop("n");
}
private void chb_disablelabel_CheckedChanged(object sender, EventArgs e)
{
RobotManage.labelMachine.DisableLabel = chb_disablelabel.Checked;
LogUtil.info($"手动屏蔽贴标:{chb_disablelabel.Checked}");
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -52,6 +52,7 @@ namespace AutoCountMachine ...@@ -52,6 +52,7 @@ namespace AutoCountMachine
return; return;
} }
Environment.CurrentDirectory = Application.StartupPath; Environment.CurrentDirectory = Application.StartupPath;
Config.LoadMyConfig(new Setting_Init().GetType());
CheckConfigFile(); CheckConfigFile();
XmlConfigurator.Configure(); XmlConfigurator.Configure();
......
...@@ -102,12 +102,6 @@ ...@@ -102,12 +102,6 @@
<Compile Include="NGALGOControl.designer.cs"> <Compile Include="NGALGOControl.designer.cs">
<DependentUpon>NGALGOControl.cs</DependentUpon> <DependentUpon>NGALGOControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UCCOMMON\BoxResetControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UCCOMMON\BoxResetControl.Designer.cs">
<DependentUpon>BoxResetControl.cs</DependentUpon>
</Compile>
<Compile Include="UCCOMMON\FrmPassword.cs"> <Compile Include="UCCOMMON\FrmPassword.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -151,26 +145,8 @@ ...@@ -151,26 +145,8 @@
<Compile Include="UCCOMMON\IOControl.Designer.cs"> <Compile Include="UCCOMMON\IOControl.Designer.cs">
<DependentUpon>IOControl.cs</DependentUpon> <DependentUpon>IOControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FilterControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="FilterControl.Designer.cs">
<DependentUpon>FilterControl.cs</DependentUpon>
</Compile>
<Compile Include="T1Control.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="T1Control.Designer.cs">
<DependentUpon>T1Control.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="LabelControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="LabelControl.Designer.cs">
<DependentUpon>LabelControl.cs</DependentUpon>
</Compile>
<Compile Include="XrayControl.cs"> <Compile Include="XrayControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -183,9 +159,6 @@ ...@@ -183,9 +159,6 @@
<EmbeddedResource Include="NGALGOControl.resx"> <EmbeddedResource Include="NGALGOControl.resx">
<DependentUpon>NGALGOControl.cs</DependentUpon> <DependentUpon>NGALGOControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UCCOMMON\BoxResetControl.resx">
<DependentUpon>BoxResetControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UCCOMMON\ConfigControl.resx"> <EmbeddedResource Include="UCCOMMON\ConfigControl.resx">
<DependentUpon>ConfigControl.cs</DependentUpon> <DependentUpon>ConfigControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -198,12 +171,6 @@ ...@@ -198,12 +171,6 @@
<EmbeddedResource Include="UCCOMMON\IOControl.resx"> <EmbeddedResource Include="UCCOMMON\IOControl.resx">
<DependentUpon>IOControl.cs</DependentUpon> <DependentUpon>IOControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FilterControl.resx">
<DependentUpon>FilterControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="T1Control.resx">
<DependentUpon>T1Control.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
...@@ -214,9 +181,6 @@ ...@@ -214,9 +181,6 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<EmbeddedResource Include="LabelControl.resx">
<DependentUpon>LabelControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SettingControl.resx"> <EmbeddedResource Include="SettingControl.resx">
<DependentUpon>SettingControl.cs</DependentUpon> <DependentUpon>SettingControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
using Asa;
using CodeLibrary;
using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static Asa.eyemLib;
using static AutoCountMachine.eyemlib;
namespace AutoCountMachine
{
public partial class T1Control : UserControl
{
readonly Timer t1 = new Timer();
DeviceConfig _Config;
public DeviceConfig Config
{
get { return _Config; }
set
{
_Config = value;
ioControl1.Config = value;
configControl1.Config = value;
axisMoveControl1.LoadData(value);
}
}
public T1Control()
{
InitializeComponent();
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
RoleManger.RoleChange += RoleManger_RoleChange;
}
private void RoleManger_RoleChange(object sender, Role e)
{
tabPage2.Controls[0].Enabled = false;
if (e != Role.Admin)
return;
tabPage2.Controls[0].Enabled = true;
}
private void RobotManage_LoadFinishEvent(bool state, string msg)
{
if (state)
RobotManage.t1Machine.TrayStringLocation += T1Machine_TrayStringLocation;
}
private void T1Machine_TrayStringLocation(object sender, Bitmap e)
{
Invoke((EventHandler<Bitmap>)delegate{
pictureBox1.Image = e;
}, sender, e);
}
private void XrayControl_Load(object sender, EventArgs e)
{
}
private void btn_clamp_Click(object sender, EventArgs e)
{
RobotManage.electricGripper.Clamp();
}
private void btn_release_Click(object sender, EventArgs e)
{
RobotManage.electricGripper.Release();
}
private void btn_Reset_Click(object sender, EventArgs e)
{
if (RobotManage.t1Machine.runStatus != RunStatus.HomeReset)
{
RobotManage.t1Machine.BeginHomeReset();
}
}
private void button1_Click(object sender, EventArgs e)
{
var (bitmap, currpos, debugtxt) = RobotManage.t1Machine.GetStringCenterC();
var offset_x = currpos.X - RobotManage.t1Machine.CenterPos.X;
var offset_y = currpos.Y - RobotManage.t1Machine.CenterPos.Y;
offset_x = offset_x * -1;
offset_y = offset_y * -1;
var Y = RobotManage.t1Machine.Config.Y_P2 + offset_y * RobotManage.t1Machine.Config.Cam_Pixel_Y_Ratio;
var Pan_X = RobotManage.t1Machine.Config.Pan_P2 + offset_x * RobotManage.t1Machine.Config.Cam_Pixel_X_Ratio;
RobotManage.t1Machine.T_Pan_Axis.AbsMove(null, Pan_X, RobotManage.t1Machine.Config.Pan_P2_speed);
RobotManage.t1Machine.T_Y_Axis.AbsMove(null, Y, RobotManage.t1Machine.Config.Y_P2_speed);
RobotManage.t1Machine.MoveInfo.log($"下降到料串 CenterPos:{RobotManage.t1Machine.CenterPos}, StringCenter:{currpos}, Offset:{new Point(offset_x, offset_y)}, AXIS:{new Point(Pan_X, Y)}");
}
private void btn_Empty_Linerun_Click(object sender, EventArgs e)
{
RobotManage.t1Machine.ShelfInLine.LineRun("n",999);
}
private void btn_Empty_Linestop_Click(object sender, EventArgs e)
{
RobotManage.t1Machine.ShelfInLine.LineStop("n");
}
private void btn_Full_Linerun_Click(object sender, EventArgs e)
{
RobotManage.t1Machine.ShelfOutLine.LineRun("n",999);
}
private void btn_Full_Linestop_Click(object sender, EventArgs e)
{
RobotManage.t1Machine.ShelfOutLine.LineStop("n");
}
private void button1_Click_1(object sender, EventArgs e)
{
var (bitmap, currpos, debugtxt) = RobotManage.t1Machine.GetStringCenterC();
var distance = (int)Common.distance(RobotManage.t1Machine.CenterPos, currpos);
label_eyemMulFuncTool.Text = debugtxt + $"\ndistance:{distance}\nLocation:{(distance < RobotManage.t1Machine.Config.String_Offset_Range_Px ? "OK" : "NG")}";
pictureBox1.Image = bitmap;
}
private void btn_closeclamp_Click(object sender, EventArgs e)
{
RobotManage.electricGripper.ClosePort();
}
private void tabPage4_Click(object sender, EventArgs e)
{
}
private void btn_agvin_Click(object sender, EventArgs e)
{
RobotManage.wistonAgvClient.NeedEnter();
}
private void btn_agvout_Click(object sender, EventArgs e)
{
RobotManage.wistonAgvClient.NeedLeave();
}
private void tabPage3_Click(object sender, EventArgs e)
{
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -37,18 +37,7 @@ namespace AutoCountMachine ...@@ -37,18 +37,7 @@ namespace AutoCountMachine
private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
this.Invoke((EventHandler)delegate { this.Invoke((EventHandler)delegate {
NgCountBar.ForeColor = Color.MediumSeaGreen;
MsdCountBar.ForeColor = Color.MediumSeaGreen;
PaperCountBar.ForeColor = Color.MediumSeaGreen;
if (RobotManage.filterMachine.NGBox_Count > RobotManage.filterMachine.Config.NG_BOX_MAXCOUNT * 0.8)
NgCountBar.ForeColor = Color.Red;
if (RobotManage.filterMachine.MSDBox_Count > RobotManage.filterMachine.Config.MSD_BOX_MAXCOUNT * 0.8)
MsdCountBar.ForeColor = Color.Red;
if (RobotManage.filterMachine.PaperBox_Count > RobotManage.filterMachine.Config.PAPER_BOX_MAXCOUNT * 0.8)
PaperCountBar.ForeColor = Color.Red;
NgCountBar.Value = RobotManage.filterMachine.NGBox_Count;
MsdCountBar.Value = RobotManage.filterMachine.MSDBox_Count;
PaperCountBar.Value = RobotManage.filterMachine.PaperBox_Count;
}); });
} }
...@@ -58,12 +47,6 @@ namespace AutoCountMachine ...@@ -58,12 +47,6 @@ namespace AutoCountMachine
{ {
this.Invoke((EventHandler)delegate this.Invoke((EventHandler)delegate
{ {
NgCountBar.Maximum = RobotManage.filterMachine.Config.NG_BOX_MAXCOUNT;
MsdCountBar.Maximum = RobotManage.filterMachine.Config.MSD_BOX_MAXCOUNT;
PaperCountBar.Maximum = RobotManage.filterMachine.Config.PAPER_BOX_MAXCOUNT;
MsdCountBar.ForeColor = Color.MediumSeaGreen;
PaperCountBar.ForeColor = Color.MediumSeaGreen;
timer.Enabled = true; timer.Enabled = true;
timer.Start(); timer.Start();
}); });
......
...@@ -44,6 +44,7 @@ namespace AutoCountMachine ...@@ -44,6 +44,7 @@ namespace AutoCountMachine
this.tabPage4 = new System.Windows.Forms.TabPage(); this.tabPage4 = new System.Windows.Forms.TabPage();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.btn_Calibration = new System.Windows.Forms.Button();
this.btn_getXrayimage = new System.Windows.Forms.Button(); this.btn_getXrayimage = new System.Windows.Forms.Button();
this.btn_openXray = new System.Windows.Forms.Button(); this.btn_openXray = new System.Windows.Forms.Button();
this.btn_closeXray = new System.Windows.Forms.Button(); this.btn_closeXray = new System.Windows.Forms.Button();
...@@ -54,7 +55,6 @@ namespace AutoCountMachine ...@@ -54,7 +55,6 @@ namespace AutoCountMachine
this.btn_ManualCount = new System.Windows.Forms.Button(); this.btn_ManualCount = new System.Windows.Forms.Button();
this.cylinderButton4 = new AutoCountMachine.CylinderButton(); this.cylinderButton4 = new AutoCountMachine.CylinderButton();
this.cylinderButton5 = new AutoCountMachine.CylinderButton(); this.cylinderButton5 = new AutoCountMachine.CylinderButton();
this.btn_Calibration = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout(); this.tabPage2.SuspendLayout();
...@@ -162,6 +162,7 @@ namespace AutoCountMachine ...@@ -162,6 +162,7 @@ namespace AutoCountMachine
// //
// panel1 // panel1
// //
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.axisMoveControl1); this.panel1.Controls.Add(this.axisMoveControl1);
this.panel1.Controls.Add(this.configControl1); this.panel1.Controls.Add(this.configControl1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
...@@ -180,6 +181,8 @@ namespace AutoCountMachine ...@@ -180,6 +181,8 @@ namespace AutoCountMachine
// //
// configControl1 // configControl1
// //
this.configControl1.Config = null;
this.configControl1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.configControl1.Location = new System.Drawing.Point(559, 3); this.configControl1.Location = new System.Drawing.Point(559, 3);
this.configControl1.Name = "configControl1"; this.configControl1.Name = "configControl1";
this.configControl1.Size = new System.Drawing.Size(653, 504); this.configControl1.Size = new System.Drawing.Size(653, 504);
...@@ -238,6 +241,16 @@ namespace AutoCountMachine ...@@ -238,6 +241,16 @@ namespace AutoCountMachine
this.pictureBox1.TabIndex = 0; this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false; this.pictureBox1.TabStop = false;
// //
// btn_Calibration
//
this.btn_Calibration.Location = new System.Drawing.Point(510, 424);
this.btn_Calibration.Name = "btn_Calibration";
this.btn_Calibration.Size = new System.Drawing.Size(129, 33);
this.btn_Calibration.TabIndex = 1;
this.btn_Calibration.Text = "Calibration";
this.btn_Calibration.UseVisualStyleBackColor = true;
this.btn_Calibration.Click += new System.EventHandler(this.btn_Calibration_Click);
//
// btn_getXrayimage // btn_getXrayimage
// //
this.btn_getXrayimage.Location = new System.Drawing.Point(510, 133); this.btn_getXrayimage.Location = new System.Drawing.Point(510, 133);
...@@ -289,7 +302,7 @@ namespace AutoCountMachine ...@@ -289,7 +302,7 @@ namespace AutoCountMachine
this.label_tips_scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label_tips_scancode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_tips_scancode.Location = new System.Drawing.Point(63, 47); this.label_tips_scancode.Location = new System.Drawing.Point(63, 47);
this.label_tips_scancode.Name = "label_tips_scancode"; this.label_tips_scancode.Name = "label_tips_scancode";
this.label_tips_scancode.Size = new System.Drawing.Size(104, 16); this.label_tips_scancode.Size = new System.Drawing.Size(103, 16);
this.label_tips_scancode.TabIndex = 294; this.label_tips_scancode.TabIndex = 294;
this.label_tips_scancode.Text = "请扫描二维码"; this.label_tips_scancode.Text = "请扫描二维码";
// //
...@@ -299,7 +312,7 @@ namespace AutoCountMachine ...@@ -299,7 +312,7 @@ namespace AutoCountMachine
this.label_countstate.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label_countstate.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label_countstate.Location = new System.Drawing.Point(63, 131); this.label_countstate.Location = new System.Drawing.Point(63, 131);
this.label_countstate.Name = "label_countstate"; this.label_countstate.Name = "label_countstate";
this.label_countstate.Size = new System.Drawing.Size(88, 16); this.label_countstate.Size = new System.Drawing.Size(87, 16);
this.label_countstate.TabIndex = 293; this.label_countstate.TabIndex = 293;
this.label_countstate.Text = "当前: 待机"; this.label_countstate.Text = "当前: 待机";
// //
...@@ -350,16 +363,6 @@ namespace AutoCountMachine ...@@ -350,16 +363,6 @@ namespace AutoCountMachine
this.cylinderButton5.Text = "Entry_Open"; this.cylinderButton5.Text = "Entry_Open";
this.cylinderButton5.UseVisualStyleBackColor = false; this.cylinderButton5.UseVisualStyleBackColor = false;
// //
// btn_Calibration
//
this.btn_Calibration.Location = new System.Drawing.Point(510, 424);
this.btn_Calibration.Name = "btn_Calibration";
this.btn_Calibration.Size = new System.Drawing.Size(129, 33);
this.btn_Calibration.TabIndex = 1;
this.btn_Calibration.Text = "Calibration";
this.btn_Calibration.UseVisualStyleBackColor = true;
this.btn_Calibration.Click += new System.EventHandler(this.btn_Calibration_Click);
//
// XrayControl // XrayControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!