Commit d28fa105 刘韬

修正出库时急停复位变入库的问题

1 个父辈 043fa856
......@@ -444,7 +444,7 @@ namespace DeviceLibrary
if (dataMap.ContainsKey(ParamDefine.closeD01) && dataMap[ParamDefine.closeD01].Equals(ParamDefine.doit))
{
LogUtil.info(StoreName + "收到服务器命令:closeD01=doit");
if (IOManager.IOValue(IO_Type.LeftDoor_Check).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.LeftDoor_Check).Equals(IO_VALUE.LOW))
{
result = "D01" + crc.GetString("Res0188.d613f80c", "已上锁");
IOManager.IOMove(IO_Type.LeftDoor_Lock, IO_VALUE.HIGH);
......@@ -459,7 +459,7 @@ namespace DeviceLibrary
if (dataMap.ContainsKey(ParamDefine.closeD02) && dataMap[ParamDefine.closeD02].Equals(ParamDefine.doit))
{
LogUtil.info(StoreName + "收到服务器命令:closeD02=doit");
if (IOManager.IOValue(IO_Type.RightDoor_Check).Equals(IO_VALUE.HIGH))
if (IOManager.IOValue(IO_Type.RightDoor_Check).Equals(IO_VALUE.LOW))
{
result = "D02" + crc.GetString("Res0188.d613f80c", "已上锁");
IOManager.IOMove(IO_Type.RightDoor_Lock, IO_VALUE.HIGH);
......@@ -477,6 +477,7 @@ namespace DeviceLibrary
{
result = "D03" + crc.GetString("Res0188.d613f80c", "已上锁");
IOManager.IOMove(IO_Type.PrinterDoor_Lock, IO_VALUE.HIGH);
}
else
{
......@@ -490,6 +491,7 @@ namespace DeviceLibrary
LogUtil.info(StoreName + "收到服务器命令:openD01=doit");
IOManager.IOMove(IO_Type.LeftDoor_Lock, IO_VALUE.LOW);
result = "D01" + crc.GetString("Res0190.9377bdb2", "已解锁");
//RobotManage.UserPause();
}
if (dataMap.ContainsKey(ParamDefine.openD02) && dataMap[ParamDefine.openD02].Equals(ParamDefine.doit))
......@@ -497,6 +499,7 @@ namespace DeviceLibrary
LogUtil.info(StoreName + "收到服务器命令:openD02=doit");
IOManager.IOMove(IO_Type.RightDoor_Lock, IO_VALUE.LOW);
result = "D02" + crc.GetString("Res0190.9377bdb2", "已解锁");
//RobotManage.UserPause();
}
if (dataMap.ContainsKey(ParamDefine.openD03) && dataMap[ParamDefine.openD03].Equals(ParamDefine.doit))
......@@ -504,6 +507,7 @@ namespace DeviceLibrary
LogUtil.info(StoreName + "收到服务器命令:openD03=doit");
IOManager.IOMove(IO_Type.PrinterDoor_Lock, IO_VALUE.LOW);
result = "D03" + crc.GetString("Res0190.9377bdb2", "已解锁");
//RobotManage.UserPause();
}
if (!result.Equals(""))
......
......@@ -15,6 +15,7 @@ using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml.Linq;
using static System.Windows.Forms.MonthCalendar;
namespace DeviceLibrary
{
......@@ -34,6 +35,8 @@ namespace DeviceLibrary
public static Dictionary<TestStorePointPort, List<string>> StoreState = new Dictionary<TestStorePointPort, List<string>>();
public static void Init()
{
inArea.Clear();
outArea.Clear();
var fd = File.ReadAllText("Config\\CameraPointTest.json");
CameraData = JsonConvert.DeserializeObject<CameraData>(fd);
for (int i = 0; i < 5; i++)
......
......@@ -345,7 +345,7 @@ namespace DeviceLibrary
if (!UserPause)
Msg.clear();
else
currnetstoreStatus = StoreStatus.Debugging;
currnetstoreStatus = StoreStatus.Warning;
if (currnetstoreStatus!=StoreStatus.None)
ServerCM.storeStatus = currnetstoreStatus;
......@@ -504,6 +504,19 @@ namespace DeviceLibrary
bool SafeCheck() {
bool ok = true;
var ignorestring = "[" + crc.GetString("Res0096","已忽略") + "]";
//if (IOManager.IOValue(IO_Type.LeftDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.LeftDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.RightDoor_Check).Equals(IO_VALUE.LOW))
//{
// IOManager.IOMove(IO_Type.RightDoor_Lock, IO_VALUE.HIGH);
//}
//if (IOManager.IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.HIGH))
//{
// IOManager.IOMove(IO_Type.PrinterDoor_Lock, IO_VALUE.HIGH);
//}
if (IOValue(IO_Type.PrinterDoor_Check).Equals(IO_VALUE.LOW))
{
if (!IgnoreSafecheck)
......
using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
......@@ -22,7 +19,7 @@ namespace DeviceLibrary
StoreJobList OutStoreJobList = new StoreJobList(crc.GetString("Res0108", "批量"));
public bool HasJob { get => OutStoreJobList.Count > 0; }
public void AddOutStoreTask(string warecode, string posId,bool ngReel, string ngMsg)
public void AddOutStoreTask(string warecode, string posId, bool ngReel, string ngMsg)
{
JobInfo jobInfo = new JobInfo(warecode, posId);
jobInfo.isNG = ngReel;
......@@ -36,7 +33,7 @@ namespace DeviceLibrary
/// <summary>
/// 是否新入抽屉
/// </summary>
public bool newDrawer=true;
public bool newDrawer = true;
void StoreDemoProcess()
{
......@@ -47,7 +44,15 @@ namespace DeviceLibrary
{
case MoveStep.Wait:
StoreMoveInfo.MoveParam.ReelOnFixture = false;
if (IOValue(IO_Type.Taking_Clamp).Equals(IO_VALUE.LOW)) {
if (Setting_Init.Device_step_by_step_mode)
{
StoreMoveInfo.log("当前单步模式");
return;
}
if (IOValue(IO_Type.Taking_Clamp).Equals(IO_VALUE.LOW))
{
if (Setting_Init.Runtime_Step >= Runtime_StepE.LabelProcess && Setting_Init.Runtime_Step <= Runtime_StepE.LabelPasteFinish)
{
StoreMoveInfo.log("检测到上次正在贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid + "," + Setting_Init.Runtime_FromPosid);
......@@ -60,7 +65,7 @@ namespace DeviceLibrary
// return;
//}
LabelingMoveInfo.MoveParam.IsNg = true;
LabelingMoveInfo.MoveParam.NgMsg = crc.GetString("Res0182.e64e34d1","重置前物料正在贴标,NG处理");
LabelingMoveInfo.MoveParam.NgMsg = crc.GetString("Res0182.e64e34d1", "重置前物料正在贴标,NG处理");
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
//if (!string.IsNullOrEmpty(Setting_Init.Runtime_FromPosid))
//{
......@@ -75,7 +80,7 @@ namespace DeviceLibrary
return;
}
else if (Setting_Init.Runtime_Step >= Runtime_StepE.LabelPasteFinish)
else if (Setting_Init.Runtime_Step == Runtime_StepE.LabelPasteFinish)
{
StoreMoveInfo.log("检测到上次已完成贴标:" + Setting_Init.Runtime_Step + "," + Setting_Init.Runtime_Posid + "," + Setting_Init.Runtime_RFID);
StoreMoveInfo.NewMove(MoveStep.StoreIn03);
......@@ -107,22 +112,25 @@ namespace DeviceLibrary
}
Setting_Init.Runtime_Step = Runtime_StepE.None;
if (ServerCM.selfAudit) {
if (ServerCM.selfAudit)
{
selfAuditMode = true;
}
return;
}
if (Setting_Init.Runtime_Step!= Runtime_StepE.None)
StoreMoveInfo.log("Runtime_Step:"+ Setting_Init.Runtime_Step);
if (Setting_Init.Runtime_Step == Runtime_StepE.InToLabel) {
StoreMoveInfo.log("检测到上次正在准备去贴标:"+ Setting_Init.Runtime_Posid);
if (Setting_Init.Runtime_Step != Runtime_StepE.None)
StoreMoveInfo.log("Runtime_Step:" + Setting_Init.Runtime_Step);
if (Setting_Init.Runtime_Step == Runtime_StepE.InToLabel)
{
StoreMoveInfo.log("检测到上次正在准备去贴标:" + Setting_Init.Runtime_Posid);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
var acto = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
StoreMoveInfo.MoveParam.PosID = Setting_Init.Runtime_Posid;
StoreMoveInfo.MoveParam.ReelOnFixture = true;
boxTransport.Start(new BoxStorePosition(Config, acto, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, acto, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运入贴标机构");
}else if (Setting_Init.Runtime_Step == Runtime_StepE.InToStore)
}
else if (Setting_Init.Runtime_Step == Runtime_StepE.InToStore)
{
StoreMoveInfo.log("检测到上次正在准备去库位:" + Setting_Init.Runtime_Posid);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn04);
......@@ -132,11 +140,11 @@ namespace DeviceLibrary
}
else if (Setting_Init.Runtime_Step == Runtime_StepE.Out)
{
StoreMoveInfo.log("检测到上次正在出库:" + Setting_Init.Runtime_Posid+","+ Setting_Init.Runtime_WareCode);
StoreMoveInfo.log("检测到上次正在出库:" + Setting_Init.Runtime_Posid + "," + Setting_Init.Runtime_WareCode);
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut10_1);
StoreMoveInfo.MoveParam.ReelOnFixture = true;
StoreMoveInfo.MoveParam.PosID = Setting_Init.Runtime_Posid;
StoreMoveInfo.MoveParam.WareCode= Setting_Init.Runtime_WareCode;
StoreMoveInfo.MoveParam.WareCode = Setting_Init.Runtime_WareCode;
}
break;
case MoveStep.StoreIn01:
......@@ -174,9 +182,9 @@ namespace DeviceLibrary
{
if (LabelingMoveInfo.MoveStep == MoveStep.Wait)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
LabelingMoveInfo.NewMove(MoveStep.Labeling01);
StoreMoveInfo.log($"等待贴标完成");
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
LabelingMoveInfo.NewMove(MoveStep.Labeling01);
StoreMoveInfo.log($"等待贴标完成");
if (Setting_Init.Device_step_by_step_mode)
RobotManage.UserPause();
}
......@@ -192,7 +200,7 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam = LabelingMoveInfo.MoveParam.clone();
if (StoreMoveInfo.MoveParam.IsNg)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn08);
......@@ -209,7 +217,7 @@ namespace DeviceLibrary
{
if (string.IsNullOrEmpty(LabelingMoveInfo.MoveParam.PosID))
{
Msg.add(crc.GetString("Res0138","等待服务器返回库位"), MsgLevel.info);
Msg.add(crc.GetString("Res0138", "等待服务器返回库位"), MsgLevel.info);
StoreMoveInfo.log($"等待服务器返回库位");
return;
}
......@@ -233,7 +241,7 @@ namespace DeviceLibrary
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn05);
from = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
to = CSVPositionReader<ACStorePosition>.GetPositon(RFIDP);
//StoreMoveInfo.MoveParam.PosID = outposid;
//StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
......@@ -251,12 +259,12 @@ namespace DeviceLibrary
if (StoreMoveInfo.MoveParam.RFID.Length > 16)
StoreMoveInfo.MoveParam.RFID = StoreMoveInfo.MoveParam.RFID.Substring(0, 16);
StoreMoveInfo.Msg(crc.GetString("Res0185.7b3d057f","正在写入RFID"), MsgLevel.info);
StoreMoveInfo.Msg(crc.GetString("Res0185.7b3d057f", "正在写入RFID"), MsgLevel.info);
ServerCM.RfidMsg = crc.GetString("Res0185.7b3d057f", "正在写入RFID");
bool writeok = false;
var r=RobotManage.RFID.ReOpen();
var r1=RobotManage.RFID2?.ReOpen();
StoreMoveInfo.log("连接rfid:" + r+ "rfid2:" + r1);
var r = RobotManage.RFID.ReOpen();
var r1 = RobotManage.RFID2?.ReOpen();
StoreMoveInfo.log("连接rfid:" + r + "rfid2:" + r1);
for (int i = 0; i < 15; i++)
{
if (string.IsNullOrEmpty(StoreMoveInfo.MoveParam.RFID))
......@@ -283,7 +291,8 @@ namespace DeviceLibrary
}
}
}
if (!writeok && RobotManage.RFID2!=null) {
if (!writeok && RobotManage.RFID2 != null)
{
RobotManage.RFID2.WriteByte(550, new byte[] { 0x40, 0x00 });
Thread.Sleep(300);
RobotManage.RFID2.WriteEPC(Encoding.ASCII.GetBytes(epc));
......@@ -327,7 +336,7 @@ namespace DeviceLibrary
StoreMoveInfo.log($"RFID 写入失败 NG");
ServerCM.cancelPutInTask("", StoreMoveInfo.MoveParam.WareCode);
Z_Axis.AbsMove(StoreMoveInfo, Config.Z_Axis_P1, Config.Z_Axis_P1_speed);
StoreMoveInfo.Msg(crc.GetString("Res0186.7faa6f6b","RFID 写入失败"), MsgLevel.info, 5);
StoreMoveInfo.Msg(crc.GetString("Res0186.7faa6f6b", "RFID 写入失败"), MsgLevel.info, 5);
ServerCM.RfidMsg = crc.GetString("Res0186.7faa6f6b", "RFID 写入失败");
if (Setting_Init.Device_step_by_step_mode)
......@@ -336,7 +345,7 @@ namespace DeviceLibrary
}
else
{
StoreMoveInfo.Msg(crc.GetString("Res0187.6b2d7028","RFID 写入成功"), MsgLevel.info, 5);
StoreMoveInfo.Msg(crc.GetString("Res0187.6b2d7028", "RFID 写入成功"), MsgLevel.info, 5);
ServerCM.RfidMsg = crc.GetString("Res0187.6b2d7028", "RFID 写入成功");
}
}
......@@ -406,7 +415,7 @@ namespace DeviceLibrary
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn10);
StoreMoveInfo.log($"入库完成,开始检查库位");
CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
}
break;
......@@ -416,7 +425,7 @@ namespace DeviceLibrary
TestStorePointPort tspp = CameraPointTest.GetTestStorePointPort(posid);
ol = CameraPointTest.GetThingStoreName(tspp);
StoreMoveInfo.log($"检测到有料库位,{tspp}: {string.Join(",", ol)}");
if (ol.Contains(posid))
......@@ -425,8 +434,11 @@ namespace DeviceLibrary
}
else
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn10);
Msg.add(string.Format("No material detected at storage location {0} – please check.", posid), MsgLevel.alarm);
StoreMoveInfo.log("入库失败,请检查库位:" + posid);
RobotManage.UserPause();
return;
}
if (OutStoreJobList.Count == 0)
StoreMoveInfo.NewMove(MoveStep.StoreIn01);
......@@ -446,9 +458,10 @@ namespace DeviceLibrary
}
else if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW))
{
Msg.add(crc.GetString("Res0137","出库任务正在执行,请关好抽屉"), MsgLevel.alarm);
Msg.add(crc.GetString("Res0137", "出库任务正在执行,请关好抽屉"), MsgLevel.alarm);
}
else {
else
{
IOMove(IO_Type.Out_Drawer_Lock, IO_VALUE.HIGH);
}
break;
......@@ -458,7 +471,7 @@ namespace DeviceLibrary
Setting_Init.Runtime_Posid = inposid;
Setting_Init.Runtime_WareCode = StoreMoveInfo.MoveParam.WareCode;
{
var outposid="";
var outposid = "";
if (!ServerCM.selfAuditException)
{
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.出口);
......@@ -477,9 +490,10 @@ namespace DeviceLibrary
outposid = olist[0];
StoreMoveInfo.log($"检测到出库位有料:{outposid}, 其他有料出库位:{string.Join(",", olist)}");
}
StoreMoveInfo.MoveParam.IsNg = false;
StoreMoveInfo.MoveParam.IsNg = false;
}
else {
else
{
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
StoreMoveInfo.log($"检测到入库口有料库位:{string.Join(",", olist)}");
olist = RobotManage.AllPositionMapNumList.ToList().Where(p => { return p.StartsWith("L") && !p.StartsWith("La") && !olist.Contains(p); }).ToList();
......@@ -548,7 +562,7 @@ namespace DeviceLibrary
}
}
}
if (!issame && RobotManage.RFID2!=null)
if (!issame && RobotManage.RFID2 != null)
{
if (RobotManage.RFID2.ReadEPC(16, out data))
{
......@@ -605,9 +619,10 @@ namespace DeviceLibrary
ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreEnd);
StoreMoveInfo.log("出库完成");
}
else {
else
{
ServerCM.cancelAndDisable(StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.log("出库NG,自动禁用库位:"+ StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.log("出库NG,自动禁用库位:" + StoreMoveInfo.MoveParam.PosID);
}
StoreMoveInfo.NextMoveStep(MoveStep.Wait);
OutStoreJobList.ClearLastPosid();
......@@ -622,7 +637,8 @@ namespace DeviceLibrary
StoreMoveInfo.log($"出库库位已用完");
}
}
else {
else
{
var olist = CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
StoreMoveInfo.log($"检测到NG出库口有料库位:{string.Join(",", olist)}");
olist = RobotManage.AllPositionMapNumList.ToList().Where(p => { return p.StartsWith("L") && !p.StartsWith("Lab") && !olist.Contains(p); }).ToList();
......@@ -632,7 +648,7 @@ namespace DeviceLibrary
{
StoreMoveInfo.NextMoveStep(MoveStep.Wait);
StoreMoveInfo.log($"NG出库库位已完成");
return;
}
}
......@@ -641,7 +657,7 @@ namespace DeviceLibrary
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut13);
StoreMoveInfo.log($"没有出库任务了");
}
}
break;
case MoveStep.StoreOut13:
......@@ -678,14 +694,14 @@ namespace DeviceLibrary
case MoveStep.StoreOut17:
if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.HIGH))
{
StoreMoveInfo.log("抽屉已经上锁 newDrawer:"+ newDrawer);
StoreMoveInfo.log("抽屉已经上锁 newDrawer:" + newDrawer);
if (!newDrawer)
StoreMoveInfo.NewMove(MoveStep.StoreIn01);
else
StoreMoveInfo.NewMove(MoveStep.Wait);
}
else
{
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut15);
IOMove(IO_Type.Out_Drawer_Lock, IO_VALUE.LOW);
}
......
......@@ -48,6 +48,9 @@ namespace TheMachine
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tabPage_ledtower = new System.Windows.Forms.TabPage();
this.uC_LedConfig1 = new TheMachine.UC.UC_LedConfig();
this.panel2 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage_set.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
......@@ -55,6 +58,7 @@ namespace TheMachine
this.tp.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabPage_ledtower.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// timer1
......@@ -88,6 +92,7 @@ namespace TheMachine
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.panel1);
this.flowLayoutPanel1.Controls.Add(this.panel2);
this.flowLayoutPanel1.Controls.Add(this.uC_SetUserPassword1);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
......@@ -103,7 +108,7 @@ namespace TheMachine
this.panel1.Controls.Add(this.btn_testlabeling);
this.panel1.Location = new System.Drawing.Point(3, 3);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(473, 460);
this.panel1.Size = new System.Drawing.Size(473, 247);
this.panel1.TabIndex = 15;
//
// tp
......@@ -157,7 +162,7 @@ namespace TheMachine
// cb_labelingtestmoce
//
this.cb_labelingtestmoce.AutoSize = true;
this.cb_labelingtestmoce.Location = new System.Drawing.Point(6, 331);
this.cb_labelingtestmoce.Location = new System.Drawing.Point(6, 253);
this.cb_labelingtestmoce.Name = "cb_labelingtestmoce";
this.cb_labelingtestmoce.Size = new System.Drawing.Size(138, 16);
this.cb_labelingtestmoce.TabIndex = 14;
......@@ -171,7 +176,7 @@ namespace TheMachine
this.groupBox1.Controls.Add(this.btn_printertest);
this.groupBox1.Controls.Add(this.btn_labeledit);
this.groupBox1.Controls.Add(this.cb_labelselect);
this.groupBox1.Location = new System.Drawing.Point(6, 186);
this.groupBox1.Location = new System.Drawing.Point(6, 112);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(340, 126);
this.groupBox1.TabIndex = 12;
......@@ -218,7 +223,7 @@ namespace TheMachine
// btn_testlabeling
//
this.btn_testlabeling.Enabled = false;
this.btn_testlabeling.Location = new System.Drawing.Point(6, 362);
this.btn_testlabeling.Location = new System.Drawing.Point(6, 275);
this.btn_testlabeling.Name = "btn_testlabeling";
this.btn_testlabeling.Size = new System.Drawing.Size(201, 38);
this.btn_testlabeling.TabIndex = 13;
......@@ -229,7 +234,7 @@ namespace TheMachine
// uC_SetUserPassword1
//
this.uC_SetUserPassword1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.uC_SetUserPassword1.Location = new System.Drawing.Point(484, 5);
this.uC_SetUserPassword1.Location = new System.Drawing.Point(5, 258);
this.uC_SetUserPassword1.Margin = new System.Windows.Forms.Padding(5);
this.uC_SetUserPassword1.Name = "uC_SetUserPassword1";
this.uC_SetUserPassword1.Size = new System.Drawing.Size(482, 309);
......@@ -256,6 +261,35 @@ namespace TheMachine
this.uC_LedConfig1.TabIndex = 7;
this.uC_LedConfig1.Tag = "not";
//
// panel2
//
this.panel2.Controls.Add(this.button2);
this.panel2.Controls.Add(this.button1);
this.panel2.Location = new System.Drawing.Point(482, 3);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(322, 81);
this.panel2.TabIndex = 16;
//
// button1
//
this.button1.Location = new System.Drawing.Point(13, 34);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "入库取料";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(95, 34);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 1;
this.button2.Text = "扫码贴标";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// SettingControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -272,6 +306,7 @@ namespace TheMachine
this.tp.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.tabPage_ledtower.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
......@@ -295,5 +330,8 @@ namespace TheMachine
private System.Windows.Forms.CheckBox cb_labelingtestmoce;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}
using CodeLibrary;
using ConfigHelper;
using DeviceLibrary;
using Newtonsoft.Json;
using OnlineStore;
using OnlineStore.ACSingleStore;
using OnlineStore.Common;
......@@ -12,6 +13,7 @@ using System.Data;
using System.Drawing;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
......@@ -187,5 +189,33 @@ namespace TheMachine
RobotManage.mainMachine.LabelingTestMode=cb_labelingtestmoce.Checked;
btn_testlabeling.Enabled = cb_labelingtestmoce.Checked;
}
private void button1_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning || RobotManage.mainMachine.runStatus != RunStatus.Running)
{
MessageBox.Show("请先启动设备并完成回原");
}
//Setting_Init.Device_step_by_step_mode = true;
RobotManage.mainMachine.newDrawer = false;
RobotManage.mainMachine.NGInfoList = new List<ReelParam>();
Setting_Init.Runtime_NGINFOLIST = JsonConvert.SerializeObject(RobotManage.mainMachine.NGInfoList);
RobotManage.mainMachine.StoreMoveInfo.NewMove(MoveStep.StoreIn01);
RobotManage.mainMachine.StoreMoveInfo.log("手动开始取料");
}
private void button2_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning || RobotManage.mainMachine.runStatus != RunStatus.Running)
{
MessageBox.Show("请先启动设备并完成回原");
}
Setting_Init.Runtime_NGINFOLIST = JsonConvert.SerializeObject(RobotManage.mainMachine.NGInfoList);
RobotManage.mainMachine.LabelingMoveInfo.NewMove(MoveStep.Labeling01); ;
RobotManage.mainMachine.LabelingMoveInfo.log("手动扫码");
}
}
}
\ No newline at end of file
......@@ -63,6 +63,9 @@
<Reference Include="Neotel.Rmaxis">
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
......@@ -241,6 +244,7 @@
<DependentUpon>VisionStoreDetect.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
......@@ -116,6 +116,7 @@ namespace TheMachine
{
// LogUtil.info("1");
//Common.DeepClone((Bitmap)pictureBox1.Image).Save("test.bmp");
CameraPointTest.Init();
var haslistStoreName = CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
LogUtil.info("入口:" + string.Join(",", haslistStoreName));
haslistStoreName = CameraPointTest.GetThingStoreName(TestStorePointPort.出口);
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
</packages>
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!