Commit 82303d25 刘韬

1

1 个父辈 1fb8f362
...@@ -83,6 +83,8 @@ namespace OnlineStore.Common ...@@ -83,6 +83,8 @@ namespace OnlineStore.Common
public static MyConfig<Runtime_StepE> Runtime_Step = Runtime_StepE.None; public static MyConfig<Runtime_StepE> Runtime_Step = Runtime_StepE.None;
public static MyConfig<string> Runtime_Posid = ""; public static MyConfig<string> Runtime_Posid = "";
public static MyConfig<string> Runtime_RFID = "";
public static MyConfig<string> Runtime_PN = "";
......
...@@ -401,7 +401,7 @@ namespace DeviceLibrary ...@@ -401,7 +401,7 @@ namespace DeviceLibrary
return map; return map;
if (IOManager.IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.LOW)) { if (IOManager.IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.LOW)) {
map.Add(ParamDefine.inDoorStatus, ParamDefine.disable); map[ParamDefine.inDoorStatus]=ParamDefine.disable;
} }
else if (IOManager.IOValue(IO_Type.Entry_Drawer_Lock).Equals(IO_VALUE.HIGH) else if (IOManager.IOValue(IO_Type.Entry_Drawer_Lock).Equals(IO_VALUE.HIGH)
&& RobotManage.mainMachine.StoreMoveInfo.MoveStep == MoveStep.Wait) && RobotManage.mainMachine.StoreMoveInfo.MoveStep == MoveStep.Wait)
...@@ -414,7 +414,7 @@ namespace DeviceLibrary ...@@ -414,7 +414,7 @@ namespace DeviceLibrary
} }
if (IOManager.IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW))
{ {
map.Add(ParamDefine.outDoorStatus, ParamDefine.disable); map[ParamDefine.outDoorStatus]= ParamDefine.disable;
} }
else if (IOManager.IOValue(IO_Type.Out_Drawer_Lock).Equals(IO_VALUE.HIGH) else if (IOManager.IOValue(IO_Type.Out_Drawer_Lock).Equals(IO_VALUE.HIGH)
&& RobotManage.mainMachine.StoreMoveInfo.MoveStep == MoveStep.Wait) && RobotManage.mainMachine.StoreMoveInfo.MoveStep == MoveStep.Wait)
...@@ -443,7 +443,7 @@ namespace DeviceLibrary ...@@ -443,7 +443,7 @@ namespace DeviceLibrary
//服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度, //服务器返回时有:posId库位编号,plateW:料盘宽度,plateH:料盘高度,
//postId格式BoxId#位置 //postId格式BoxId#位置
string posId = data[ParamDefine.posId].ToString(); string posId = data[ParamDefine.posId].ToString();
string usedCountstr= data["usedCount"].ToString();
//int storeId = int.Parse(posArray[0]); //int storeId = int.Parse(posArray[0]);
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(posId); ACStorePosition position = CSVPositionReader<ACStorePosition>.GetPositon(posId);
...@@ -455,12 +455,14 @@ namespace DeviceLibrary ...@@ -455,12 +455,14 @@ namespace DeviceLibrary
LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】"); LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return; return;
} }
int usedCount = 0;
int.TryParse(usedCountstr, out usedCount);
WarnMsg = ""; WarnMsg = "";
JobInfo inStoreJob = new JobInfo(message, posId); JobInfo inStoreJob = new JobInfo(message, posId);
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.PosID = inStoreJob.PosId; RobotManage.mainMachine.LabelingMoveInfo.MoveParam.PosID = inStoreJob.PosId;
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.usedCount = usedCount;
//如果当前正在出入库中,需要记录下来,等待空闲时执行 //如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + "】二维码【" + message + "】 开始入库!"); LogUtil.info(StoreName + " 收到服务器入库命令:库位号【" + posId + ",usedCount" + usedCount + "】二维码【" + message + "】 开始入库!");
} }
else else
......
...@@ -20,7 +20,7 @@ namespace DeviceLibrary ...@@ -20,7 +20,7 @@ namespace DeviceLibrary
[Serializable] [Serializable]
public class tstoredata { public class tstoredata {
public string name=""; public string name="";
public List<int> Value = new List<int>(); public List<int> value = new List<int>();
} }
public class CameraPointTest public class CameraPointTest
{ {
...@@ -36,14 +36,14 @@ namespace DeviceLibrary ...@@ -36,14 +36,14 @@ namespace DeviceLibrary
inArea[i].name = "L" + ((char)(0x41 + i)).ToString(); inArea[i].name = "L" + ((char)(0x41 + i)).ToString();
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
{ {
inArea[i].Value.Add(-1); inArea[i].value.Add(-1);
} }
} }
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
outArea.Add(new tstoredata()); outArea.Add(new tstoredata());
outArea[i].name = "U" + ((char)(0x41 + i)).ToString(); outArea[i].name = "U" + ((char)(0x41 + i)).ToString();
outArea[i].Value.Add(-1); outArea[i].value.Add(-1);
} }
} }
public static event EventHandler<Bitmap> TestStorePointEvent; public static event EventHandler<Bitmap> TestStorePointEvent;
...@@ -66,7 +66,7 @@ namespace DeviceLibrary ...@@ -66,7 +66,7 @@ namespace DeviceLibrary
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
{ {
inArea[i].Value[j]=haslistindex[index]; inArea[i].value[j]=haslistindex[index];
index++; index++;
} }
} }
...@@ -77,7 +77,7 @@ namespace DeviceLibrary ...@@ -77,7 +77,7 @@ namespace DeviceLibrary
index = 0; index = 0;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
outArea[i].Value[0]=haslistindex[index]; outArea[i].value[0]=haslistindex[index];
index++; index++;
} }
break; break;
......
...@@ -46,8 +46,7 @@ namespace DeviceLibrary ...@@ -46,8 +46,7 @@ namespace DeviceLibrary
public int Count { public int Count {
get => jobInfos.Count; get => jobInfos.Count;
} }
public void ClearLastPosid(string posid) { public void ClearLastPosid() {
if (lastoutpos == posid)
lastoutpos = ""; lastoutpos = "";
} }
} }
......
...@@ -30,6 +30,7 @@ namespace DeviceLibrary ...@@ -30,6 +30,7 @@ namespace DeviceLibrary
/// 库位号 /// 库位号
/// </summary> /// </summary>
public string PosID { get; set; } public string PosID { get; set; }
public string RFID { get; set; }
public string bitmapfilename = ""; public string bitmapfilename = "";
public List<CodeInfo> codeInfos { get; set; } public List<CodeInfo> codeInfos { get; set; }
/// <summary> /// <summary>
...@@ -40,6 +41,7 @@ namespace DeviceLibrary ...@@ -40,6 +41,7 @@ namespace DeviceLibrary
/// 料盘宽度 /// 料盘宽度
/// </summary> /// </summary>
public int PlateW { get; set; } public int PlateW { get; set; }
public int usedCount { get; set; }
/// <summary> /// <summary>
/// 是否是入料NG料 /// 是否是入料NG料
/// </summary> /// </summary>
...@@ -72,6 +74,7 @@ namespace DeviceLibrary ...@@ -72,6 +74,7 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public string Batch { get; set; } public string Batch { get; set; }
public bool ReelOnFixture { get; internal set; } = false; public bool ReelOnFixture { get; internal set; } = false;
public string OutPosID { get; internal set; }
public int HeightPos = 0; public int HeightPos = 0;
public ReelParam clone() public ReelParam clone()
......
...@@ -13,7 +13,7 @@ namespace DeviceLibrary ...@@ -13,7 +13,7 @@ namespace DeviceLibrary
{ {
public partial class MainMachine : IRobot public partial class MainMachine : IRobot
{ {
public string Name { get; set; } = "MIMO_PLUS"; public string Name { get; set; } = "TinStore";
private bool _canRunning = true; private bool _canRunning = true;
public bool canRunning public bool canRunning
{ {
...@@ -118,9 +118,15 @@ namespace DeviceLibrary ...@@ -118,9 +118,15 @@ namespace DeviceLibrary
AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); }); AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); });
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500,100); IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500,100);
IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100); IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100);
IOMonitor.RegisterIO(IO_Type.Entry_Drawer, Config, IO_VALUE.LOW, Entry_Drawer_Open, 2500,100);
LedProcessInit(); LedProcessInit();
} }
private void Entry_Drawer_Open()
{
nglist = new List<string>();
}
private (bool, string) Y_Axis_interference(int from, int to) private (bool, string) Y_Axis_interference(int from, int to)
{ {
if (Z_Axis.IsInPosition(Config.Z_Axis_P1)) { if (Z_Axis.IsInPosition(Config.Z_Axis_P1)) {
...@@ -468,7 +474,6 @@ namespace DeviceLibrary ...@@ -468,7 +474,6 @@ namespace DeviceLibrary
+ crc.GetString("Res0104","运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop); + crc.GetString("Res0104","运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ButtenEvent?.Invoke(null, ErrInfo.SuddenStop); ButtenEvent?.Invoke(null, ErrInfo.SuddenStop);
} }
LogUtil.error(configMoveAxis.GetAxisValue()+","+configMoveAxis.Explain + " errcode " + HuichuanLibrary.HCBoardManager.GetAxErrCode(configMoveAxis.GetAxisValue()));
LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue()))); LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
ok = false; ok = false;
} }
......
...@@ -42,7 +42,7 @@ namespace DeviceLibrary ...@@ -42,7 +42,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.Labeling03: case MoveStep.Labeling03:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling04); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling04);
RotateEquip.TurnDegree(36); RotateEquip.TurnDegree(30);
//LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); //LabelingMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
LabelingMoveInfo.log("滚动锡膏"); LabelingMoveInfo.log("滚动锡膏");
break; break;
...@@ -63,9 +63,17 @@ namespace DeviceLibrary ...@@ -63,9 +63,17 @@ namespace DeviceLibrary
if (HasRightCode(xx.ToArray(), LabelingMoveInfo.MoveParam)) if (HasRightCode(xx.ToArray(), LabelingMoveInfo.MoveParam))
{ {
Setting_Init.Runtime_RFID = LabelingMoveInfo.MoveParam.RFID;
LabelingMoveInfo.MoveParam.IsNg = false; LabelingMoveInfo.MoveParam.IsNg = false;
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
//ServerCM.SendInStoreRequest(new string[] { LabelingMoveInfo.MoveParam.SN }, LabelingMoveInfo.MoveParam, true); LabelingMoveInfo.MoveParam.PlateH = 50;
LabelingMoveInfo.MoveParam.PlateW = 7;
ServerCM.SendInStoreRequest(new string[] { LabelingMoveInfo.MoveParam.WareCode }, LabelingMoveInfo.MoveParam, true);
Setting_Init.Runtime_Posid = LabelingMoveInfo.MoveParam.PosID;
if (false && LabelingMoveInfo.MoveParam.usedCount > 0) {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling55);
}
return; return;
} }
} }
...@@ -74,10 +82,11 @@ namespace DeviceLibrary ...@@ -74,10 +82,11 @@ namespace DeviceLibrary
LabelingMoveInfo.MoveParam.IsNg = false; LabelingMoveInfo.MoveParam.IsNg = false;
LabelingMoveInfo.MoveParam.WareCode = "Demo"; LabelingMoveInfo.MoveParam.WareCode = "Demo";
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
ScanTimes = 0;
return; return;
} }
ScanTimes++; ScanTimes++;
if (ScanTimes >= 10) if (ScanTimes >= 12)
{ {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
LabelingMoveInfo.log($"未识别到有效二维码,送到NG口"); LabelingMoveInfo.log($"未识别到有效二维码,送到NG口");
...@@ -101,6 +110,7 @@ namespace DeviceLibrary ...@@ -101,6 +110,7 @@ namespace DeviceLibrary
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling06);
var hc = CameraPointTest.ScanRectangle(); var hc = CameraPointTest.ScanRectangle();
LabelingMoveInfo.log("检测到绿色宽度:"+hc); LabelingMoveInfo.log("检测到绿色宽度:"+hc);
ScanTimes++;
if (demomode && false) if (demomode && false)
{ {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
...@@ -110,6 +120,11 @@ namespace DeviceLibrary ...@@ -110,6 +120,11 @@ namespace DeviceLibrary
{ {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
} }
else if (ScanTimes > 10) {
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling08);
LabelingMoveInfo.MoveParam.IsNg = true;
LabelingMoveInfo.MoveParam.NgMsg = "未找到绿色区域";
}
} }
break; break;
case MoveStep.Labeling08: case MoveStep.Labeling08:
...@@ -157,13 +172,13 @@ namespace DeviceLibrary ...@@ -157,13 +172,13 @@ namespace DeviceLibrary
break; break;
case MoveStep.Labeling12: case MoveStep.Labeling12:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling13); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling13);
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Down, IO_Type.Label_Dock_Up, IO_VALUE.HIGH); CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW);
LabelingMoveInfo.log("接标台上升"); LabelingMoveInfo.log("接标台左移动");
break; break;
case MoveStep.Labeling13: case MoveStep.Labeling13:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling14); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling14);
CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Back, IO_Type.Label_Dock_Front, IO_VALUE.LOW); CylinderMove(LabelingMoveInfo, IO_Type.Label_Dock_Down, IO_Type.Label_Dock_Up, IO_VALUE.HIGH);
LabelingMoveInfo.log("接标台左移动"); LabelingMoveInfo.log("接标台上升");
break; break;
case MoveStep.Labeling14: case MoveStep.Labeling14:
LabelingMoveInfo.NextMoveStep(MoveStep.Labeling15); LabelingMoveInfo.NextMoveStep(MoveStep.Labeling15);
...@@ -292,7 +307,10 @@ namespace DeviceLibrary ...@@ -292,7 +307,10 @@ namespace DeviceLibrary
reelParam.LOT = cs[3].Substring(1); reelParam.LOT = cs[3].Substring(1);
reelParam.EXP = cs[4].Substring(1); reelParam.EXP = cs[4].Substring(1);
reelParam.SN = cs[5].Substring(1); reelParam.SN = cs[5].Substring(1);
reelParam.WareCode = reelParam.SN; reelParam.WareCode = c.CodeStr;
reelParam.ReeID = reelParam.SN;
reelParam.RFID = reelParam.SN;
return true; return true;
} }
} }
......
...@@ -78,7 +78,7 @@ namespace DeviceLibrary ...@@ -78,7 +78,7 @@ namespace DeviceLibrary
///// </summary> ///// </summary>
//public static HIKCamera CameraD=new HIKCamera(); //public static HIKCamera CameraD=new HIKCamera();
public static DauxiKS107Controller dauxiKS107 = new DauxiKS107Controller(); public static DauxiKS107Controller dauxiKS107 = new DauxiKS107Controller();
public static PuYue_FR540SP RFID = new Asa.RFID.PuYue_FR540SP(); public static PuYueRFID_FR540SP_C2S RFID = new PuYueRFID_FR540SP_C2S();
public static PrinterHelper printerHelper = new PrinterHelper(); public static PrinterHelper printerHelper = new PrinterHelper();
public static void Init() { public static void Init() {
string msg = ""; string msg = "";
...@@ -164,7 +164,7 @@ namespace DeviceLibrary ...@@ -164,7 +164,7 @@ namespace DeviceLibrary
LogUtil.info("标签打印机打开成功"); LogUtil.info("标签打印机打开成功");
RFID.IP = Setting_Init.Device_RFID_IP; RFID.IP = Setting_Init.Device_RFID_IP;
RFID.Open(); RFID.Open(Setting_Init.Device_RFID_IP);
if (!RFID.IsConn) if (!RFID.IsConn)
{ {
IsLoadOk = false; IsLoadOk = false;
......
...@@ -169,6 +169,7 @@ ...@@ -169,6 +169,7 @@
this.lblAlarmcode.Tag = "not"; this.lblAlarmcode.Tag = "not";
this.lblAlarmcode.Text = "ErrCode:160"; this.lblAlarmcode.Text = "ErrCode:160";
this.lblAlarmcode.Visible = false; this.lblAlarmcode.Visible = false;
this.lblAlarmcode.Click += new System.EventHandler(this.lblAlarmcode_Click);
// //
// label4 // label4
// //
......
...@@ -449,5 +449,12 @@ namespace DeviceLibrary ...@@ -449,5 +449,12 @@ namespace DeviceLibrary
private void AxisMoveControl_Load(object sender, EventArgs e) private void AxisMoveControl_Load(object sender, EventArgs e)
{ {
} }
private void lblAlarmcode_Click(object sender, EventArgs e)
{
var s = string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(SlvAddr));
MessageBox.Show(s);
LogUtil.error(s);
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -47,7 +47,7 @@ namespace TheMachine ...@@ -47,7 +47,7 @@ namespace TheMachine
this.button3 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button(); this.btn_entrylock = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.stateView = new System.Windows.Forms.ListView(); this.stateView = new System.Windows.Forms.ListView();
this.cb_IgnoreSafecheck = new System.Windows.Forms.CheckBox(); this.cb_IgnoreSafecheck = new System.Windows.Forms.CheckBox();
...@@ -200,7 +200,7 @@ namespace TheMachine ...@@ -200,7 +200,7 @@ namespace TheMachine
this.pnl.Controls.Add(this.button3); this.pnl.Controls.Add(this.button3);
this.pnl.Controls.Add(this.button4); this.pnl.Controls.Add(this.button4);
this.pnl.Controls.Add(this.button1); this.pnl.Controls.Add(this.button1);
this.pnl.Controls.Add(this.button2); this.pnl.Controls.Add(this.btn_entrylock);
this.pnl.Controls.Add(this.groupBox1); this.pnl.Controls.Add(this.groupBox1);
this.pnl.Controls.Add(this.cb_IgnoreSafecheck); this.pnl.Controls.Add(this.cb_IgnoreSafecheck);
this.pnl.Controls.Add(this.pictureBox2); this.pnl.Controls.Add(this.pictureBox2);
...@@ -249,19 +249,20 @@ namespace TheMachine ...@@ -249,19 +249,20 @@ namespace TheMachine
this.button1.TabIndex = 272; this.button1.TabIndex = 272;
this.button1.Text = "出库"; this.button1.Text = "出库";
this.button1.UseVisualStyleBackColor = false; this.button1.UseVisualStyleBackColor = false;
this.button1.Visible = false;
this.button1.Click += new System.EventHandler(this.button1_Click); this.button1.Click += new System.EventHandler(this.button1_Click);
// //
// button2 // btn_entrylock
// //
this.button2.BackColor = System.Drawing.Color.White; this.btn_entrylock.BackColor = System.Drawing.Color.White;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_entrylock.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button2.Location = new System.Drawing.Point(38, 271); this.btn_entrylock.Location = new System.Drawing.Point(38, 271);
this.button2.Name = "button2"; this.btn_entrylock.Name = "btn_entrylock";
this.button2.Size = new System.Drawing.Size(139, 55); this.btn_entrylock.Size = new System.Drawing.Size(139, 55);
this.button2.TabIndex = 272; this.btn_entrylock.TabIndex = 272;
this.button2.Text = "入库"; this.btn_entrylock.Text = "入库门上锁";
this.button2.UseVisualStyleBackColor = false; this.btn_entrylock.UseVisualStyleBackColor = false;
this.button2.Click += new System.EventHandler(this.button2_Click); this.btn_entrylock.Click += new System.EventHandler(this.button2_Click);
// //
// groupBox1 // groupBox1
// //
...@@ -471,7 +472,7 @@ namespace TheMachine ...@@ -471,7 +472,7 @@ namespace TheMachine
private System.Windows.Forms.ToolStripMenuItem 日本语ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 日本语ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem englishToolStripMenuItem;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2; private System.Windows.Forms.Button btn_entrylock;
private System.Windows.Forms.Button button3; private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4; private System.Windows.Forms.Button button4;
} }
......
...@@ -667,7 +667,8 @@ namespace TheMachine ...@@ -667,7 +667,8 @@ namespace TheMachine
MessageBox.Show(crc.GetString("Res0019","入料抽屉未关闭")); MessageBox.Show(crc.GetString("Res0019","入料抽屉未关闭"));
return; return;
} }
RobotManage.mainMachine.DemoIn(); IOManager.IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.HIGH);
//RobotManage.mainMachine.DemoIn();
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
...@@ -675,6 +676,7 @@ namespace TheMachine ...@@ -675,6 +676,7 @@ namespace TheMachine
if (IOManager.IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.LOW))
{ {
MessageBox.Show(crc.GetString("Res0020","出料抽屉未关闭")); MessageBox.Show(crc.GetString("Res0020","出料抽屉未关闭"));
return; return;
} }
RobotManage.mainMachine.DemoOut(); RobotManage.mainMachine.DemoOut();
......
...@@ -88,15 +88,31 @@ namespace TheMachine ...@@ -88,15 +88,31 @@ namespace TheMachine
private void button9_Click(object sender, EventArgs e) private void button9_Click(object sender, EventArgs e)
{ {
for (int i = 1; i < 10;i++) { for (int i = 0; i < 6;i++) {
Thread.Sleep(300); Thread.Sleep(200);
RobotManage.RFID.ReadEPC(out byte[] data); if (RobotManage.RFID.ReadEPC(12,out byte[] data)) {
if (data!=null) { if (data[0] != 0xFF)
MessageBox.Show(RobotManage.RFID.HexBuff(data)); {
return; MessageBox.Show(RobotManage.RFID.HexBuff(data) + "\r\n" + Encoding.ASCII.GetString(data).Trim());
return;
}
} }
} }
MessageBox.Show("no data"); MessageBox.Show("no data");
} }
private void button10_Click(object sender, EventArgs e)
{
Thread.Sleep(300);
var epc = "20418002Z-203";
epc = "20418002Z-20";
epc = epc.PadRight(12);
var result = RobotManage.RFID.WriteEPC(Encoding.ASCII.GetBytes(epc));
if (result)
{
MessageBox.Show("写入成功");
return;
}
}
} }
} }
...@@ -175,7 +175,7 @@ namespace TheMachine ...@@ -175,7 +175,7 @@ namespace TheMachine
this.groupBox1.Controls.Add(this.btn_printertest); this.groupBox1.Controls.Add(this.btn_printertest);
this.groupBox1.Controls.Add(this.btn_labeledit); this.groupBox1.Controls.Add(this.btn_labeledit);
this.groupBox1.Controls.Add(this.cb_labelselect); this.groupBox1.Controls.Add(this.cb_labelselect);
this.groupBox1.Location = new System.Drawing.Point(18, 244); this.groupBox1.Location = new System.Drawing.Point(18, 153);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(340, 126); this.groupBox1.Size = new System.Drawing.Size(340, 126);
this.groupBox1.TabIndex = 12; this.groupBox1.TabIndex = 12;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!