Commit 8ea5ab94 刘韬

1

1 个父辈 76aa78aa
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
<Compile Include="DeviceLibrary\IOManager.cs" /> <Compile Include="DeviceLibrary\IOManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="theMachine\sub\IDevice.cs" /> <Compile Include="theMachine\sub\IDevice.cs" />
<Compile Include="theMachine\sub\CI.cs" />
<Compile Include="theMachine\sub\MI.cs" /> <Compile Include="theMachine\sub\MI.cs" />
<Compile Include="theMachine\sub\TrayStop.cs" /> <Compile Include="theMachine\sub\TrayStop.cs" />
<Compile Include="theMachine\sub\TransplantMove.cs" /> <Compile Include="theMachine\sub\TransplantMove.cs" />
......
...@@ -26,6 +26,7 @@ namespace DeviceLibrary ...@@ -26,6 +26,7 @@ namespace DeviceLibrary
public string AxisName; public string AxisName;
public bool ForceSafeCheck = false; public bool ForceSafeCheck = false;
public string DeviceGroupName; public string DeviceGroupName;
public bool Disable=false;
public AxisBean(ConfigMoveAxis axisConfig, string deviceGroupName) public AxisBean(ConfigMoveAxis axisConfig, string deviceGroupName)
{ {
DeviceGroupName = deviceGroupName; DeviceGroupName = deviceGroupName;
......
...@@ -26,7 +26,7 @@ namespace DeviceLibrary ...@@ -26,7 +26,7 @@ namespace DeviceLibrary
//_serialPort.RtsEnable = true; //自动请求 //_serialPort.RtsEnable = true; //自动请求
//_serialPort.ReadTimeout = 100;//超时 //_serialPort.ReadTimeout = 100;//超时
_serialPort.Open(); _serialPort.Open();
LogUtil.error("VJCounter: 串口连接成功"); LogUtil.info("VJCounter: 串口连接成功");
return true; return true;
}catch (Exception ex) }catch (Exception ex)
{ {
...@@ -53,6 +53,7 @@ namespace DeviceLibrary ...@@ -53,6 +53,7 @@ namespace DeviceLibrary
public static void SendBarcode(string barcode) { public static void SendBarcode(string barcode) {
var b = Encoding.ASCII.GetBytes(barcode + "\n"); var b = Encoding.ASCII.GetBytes(barcode + "\n");
_serialPort.Write(b, 0, b.Length); _serialPort.Write(b, 0, b.Length);
LogUtil.info("VJCounter: 串口发送:"+ barcode);
} }
} }
} }
...@@ -157,13 +157,13 @@ namespace DeviceLibrary ...@@ -157,13 +157,13 @@ namespace DeviceLibrary
else if (RTStoreStatus == RTStoreStatus.LockToOutStore) else if (RTStoreStatus == RTStoreStatus.LockToOutStore)
{ {
VLog.Error($"出库超时出错,没有检测到出库信息,RTStoreStatus={RTStoreStatus}:" + CurrentTerminalReelID); VLog.Error($"出库超时出错,没有检测到出库信息,RTStoreStatus={RTStoreStatus}:" + CurrentTerminalReelID);
CurrentTowerStatusText = "出库错误,没有执行出库过程"; CurrentTowerStatusText = crc.GetString("Res0112.e6c4624b","出库错误,没有执行出库过程");
Msg.add($"TerminalError:" + "出库超时", MsgLevel.alarm); Msg.add($"TerminalError:" + crc.GetString("Res0113.71e5a53a","出库超时"), MsgLevel.alarm);
} }
else else
{ {
VLog.Error($"未知状态超时,RTStoreStatus={RTStoreStatus}:" + InStoreJobInfo?.ToStr()); VLog.Error($"未知状态超时,RTStoreStatus={RTStoreStatus}:" + InStoreJobInfo?.ToStr());
Msg.add($"TerminalError:" + "料仓状态异常", MsgLevel.warning); Msg.add($"TerminalError:" + crc.GetString("Res0114.d3023f35","料仓状态异常"), MsgLevel.warning);
} }
} }
...@@ -245,18 +245,17 @@ namespace DeviceLibrary ...@@ -245,18 +245,17 @@ namespace DeviceLibrary
} }
else if (ti.StatusCode >= 310000) else if (ti.StatusCode >= 310000)
{ {
if (RTStoreStatus != RTStoreStatus.InStoreError) //if (RTStoreStatus != RTStoreStatus.InStoreError)
{ //{
LastProcessErrorTime = DateTime.Now.AddSeconds(10); // LastProcessErrorTime = DateTime.Now.AddSeconds(10);
LastProcessErrorTimes = 0; // LastProcessErrorTimes = 0;
} //}
LastProcessErrorTimes++; //LastProcessErrorTimes++;
Msg.add($"StatusCode:{ti.StatusCode},StatusText:{ti.StatusText},OnlineStatus:{ti.OnlineStatus}", MsgLevel.warning); Msg.add($"StatusCode:{ti.StatusCode},StatusText:{ti.StatusText},OnlineStatus:{ti.OnlineStatus}", MsgLevel.warning);
RTStoreStatus = RTStoreStatus.InStoreError; //RTStoreStatus = RTStoreStatus.InStoreError;
ServerCM.storeStatus = StoreStatus.InStoreFaild; //ServerCM.storeStatus = StoreStatus.InStoreFaild;
//CurrentTowerStatusText = $"{ti.StatusText}-{ti.OnlineStatus}";
//InStoreJobInfo = null;
} }
else if (ti.StatusCode < 10000) else if (ti.StatusCode < 10000)
{ {
...@@ -287,7 +286,7 @@ namespace DeviceLibrary ...@@ -287,7 +286,7 @@ namespace DeviceLibrary
1031 loading material 1031 loading material
1032 material put into Terminal from outside 1032 material put into Terminal from outside
1040 出库执行中 1040 出库执行中
1041 unloading material 物料已到舱门口 1041 unloading material 物料已到舱门口 Remove Component Reel
1042 material unloaded to Terminal from Tower 物料已取走 1042 material unloaded to Terminal from Tower 物料已取走
6015 Reel already loaded. 6015 Reel already loaded.
3068 初始化中 3068 初始化中
...@@ -350,7 +349,7 @@ namespace DeviceLibrary ...@@ -350,7 +349,7 @@ namespace DeviceLibrary
return crc.GetString("Res0067", "等待入库信息"); return crc.GetString("Res0067", "等待入库信息");
if (RTStoreStatus == RTStoreStatus.LockToOutStore) if (RTStoreStatus == RTStoreStatus.LockToOutStore)
return "等待出库"; return crc.GetString("Res0115.44b81dd3","等待出库");
if (RTStoreStatus == RTStoreStatus.InStoreExecute || RTStoreStatus == RTStoreStatus.InStoreReady) if (RTStoreStatus == RTStoreStatus.InStoreExecute || RTStoreStatus == RTStoreStatus.InStoreReady)
return crc.GetString("Res0068", "入库中") + " Barcode:" + InStoreJobInfo?.WareNum; return crc.GetString("Res0068", "入库中") + " Barcode:" + InStoreJobInfo?.WareNum;
......
...@@ -19,6 +19,16 @@ namespace DeviceLibrary ...@@ -19,6 +19,16 @@ namespace DeviceLibrary
if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW) && !G.simulate) { if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW) && !G.simulate) {
Msg.add(crc.GetString("Res0166","未检测到气压信号."), MsgLevel.warning); Msg.add(crc.GetString("Res0166","未检测到气压信号."), MsgLevel.warning);
} }
var errorTray = TrayManager.Traylist.ToList().Where(x => x.Value.IsLoadError).ToList();
if (errorTray.Count > 0) {
foreach (var error in errorTray)
{
if (error.Value.HasLoad)
Msg.add(crc.GetString("Form1_tabc_tab_tmc_Text","托盘") + ":" + error.Key + " " + crc.GetString("Res0109.28f408e5","有物料托盘, 但未检测到物料"), MsgLevel.alarm);
else
Msg.add(crc.GetString("Form1_tabc_tab_tmc_Text","托盘") + ":" + error.Key + " " + crc.GetString("Res0110.ca6543cd","空托盘, 但检测到物料"), MsgLevel.alarm);
}
}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -287,7 +287,10 @@ namespace DeviceLibrary ...@@ -287,7 +287,10 @@ namespace DeviceLibrary
if (span.TotalSeconds > 2) if (span.TotalSeconds > 2)
{ {
checkAlarmTime = DateTime.Now; checkAlarmTime = DateTime.Now;
AxisBean.List.ToList().ForEach((x) => { x.Value.ForEach(y => { AxisBean.List.ToList().ForEach((x) => { x.Value.ForEach(y => {
if (y.Disable)
return;
AxisManager.AlarmClear(y.Config.DeviceName, y.Config.GetAxisValue()); AxisManager.AlarmClear(y.Config.DeviceName, y.Config.GetAxisValue());
if (AxisManager.GetAlarmStatus(y.Config.DeviceName, y.Config.GetAxisValue()) == 1) if (AxisManager.GetAlarmStatus(y.Config.DeviceName, y.Config.GetAxisValue()) == 1)
{ {
......
...@@ -170,7 +170,7 @@ namespace DeviceLibrary ...@@ -170,7 +170,7 @@ namespace DeviceLibrary
catch(Exception ex) { catch(Exception ex) {
LogUtil.error($"等待{GroupName}反馈超时 seq:" + seq +" 出错:"+ex); LogUtil.error($"等待{GroupName}反馈超时 seq:" + seq +" 出错:"+ex);
return RemoteResult.Timeout; return RemoteResult.Timeout;
} }
} }
static void SendResult(string deviceGroupName, bool result,long Seq) static void SendResult(string deviceGroupName, bool result,long Seq)
{ {
......
...@@ -95,7 +95,7 @@ namespace DeviceLibrary ...@@ -95,7 +95,7 @@ namespace DeviceLibrary
if (!VJCounter.Connect(Setting_Init.VJCounter_COMPORT, out string msgs)) { if (!VJCounter.Connect(Setting_Init.VJCounter_COMPORT, out string msgs)) {
IsLoadOk = false; IsLoadOk = false;
msg += "VJ点料机连接失败" + "\n"; msg += crc.GetString("Res0111.43f91cee","VJ点料机连接失败") + "\n";
LogUtil.error(msg + "," + msgs); LogUtil.error(msg + "," + msgs);
} }
......
...@@ -160,7 +160,8 @@ namespace DeviceLibrary ...@@ -160,7 +160,8 @@ namespace DeviceLibrary
return; return;
} }
//判断有无出库任务 //判断有无出库任务
var testInStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes<4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError)); //var testInStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes<4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
var testInStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
var hasoutjob = false; var hasoutjob = false;
if (testInStoreError != null) if (testInStoreError != null)
hasoutjob = true; hasoutjob = true;
...@@ -254,7 +255,8 @@ namespace DeviceLibrary ...@@ -254,7 +255,8 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.MI_50: case MoveStep.MI_50:
var InStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes < 4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError)); //var InStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => DateTime.Now > vs.LastProcessErrorTime && vs.LastProcessErrorTimes < 4 && (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
var InStoreError = VStoreCollection.VStoreList.Values.Where(vs => vs.TowerInfo.DeviceGroupName == GroupName).ToList().Find(vs => (vs.RTStoreStatus == RTStoreStatus.InStoreError || vs.RTStoreStatus == RTStoreStatus.InStoreDataTimeOut || vs.TerminalError));
if (InStoreError != null) if (InStoreError != null)
{ {
var result = TheLine.GetReelSize<ResultData>(InStoreError.CurrentTerminalReelID); var result = TheLine.GetReelSize<ResultData>(InStoreError.CurrentTerminalReelID);
......
...@@ -34,6 +34,8 @@ namespace DeviceLibrary ...@@ -34,6 +34,8 @@ namespace DeviceLibrary
AxisBean axis; AxisBean axis;
CylinderManger Location; CylinderManger Location;
CylinderManger Transplant; CylinderManger Transplant;
public bool Disable { get; set; }=false;
public DeviceStateE DeviceState { get ; set ; } public DeviceStateE DeviceState { get ; set ; }
public TransplantMove(DeviceGroup device, Robot_Config config, out string msg) : base() public TransplantMove(DeviceGroup device, Robot_Config config, out string msg) : base()
...@@ -60,7 +62,16 @@ namespace DeviceLibrary ...@@ -60,7 +62,16 @@ namespace DeviceLibrary
} }
public void Start() public void Start()
{ {
OpenAllServo(); axis.Disable = Disable;
if (Disable)
{
MoveInfo.log("移栽设备已禁用");
}
else
{
OpenAllServo();
}
DeviceState = DeviceStateE.HomeReset; DeviceState = DeviceStateE.HomeReset;
MoveInfo.NewMove(MoveStep.H01_HomeReset); MoveInfo.NewMove(MoveStep.H01_HomeReset);
MoveInfo.log("开始回原"); MoveInfo.log("开始回原");
...@@ -127,9 +138,18 @@ namespace DeviceLibrary ...@@ -127,9 +138,18 @@ namespace DeviceLibrary
IOMove(IO_Type.AMH_Front_Stop, IO_VALUE.LOW); IOMove(IO_Type.AMH_Front_Stop, IO_VALUE.LOW);
if (IOValue(IO_Type.AMH_In_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.AMH_In_Check).Equals(IO_VALUE.HIGH))
{ {
MoveInfo.NextMoveStep(MoveStep.TransplantMove_03); if (Disable)
{
MoveInfo.NextMoveStep(MoveStep.TransplantMove_04);
MoveInfo.log("移栽设备禁用,直接通过");
Location.ToLow(MoveInfo);
}
else
MoveInfo.NextMoveStep(MoveStep.TransplantMove_03);
MoveInfo.CanWhileCount = 3; MoveInfo.CanWhileCount = 3;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//Location.ToHigh(MoveInfo); //Location.ToHigh(MoveInfo);
} }
else if (MoveInfo.IsTimeOut(10)) { else if (MoveInfo.IsTimeOut(10)) {
...@@ -551,16 +571,18 @@ namespace DeviceLibrary ...@@ -551,16 +571,18 @@ namespace DeviceLibrary
break; break;
case MoveStep.H01_HomeReset: case MoveStep.H01_HomeReset:
MoveInfo.NextMoveStep(MoveStep.H02_HomeReset); MoveInfo.NextMoveStep(MoveStep.H02_HomeReset);
axis.HomeMove(MoveInfo); if (!Disable)
axis.HomeMove(MoveInfo);
break; break;
case MoveStep.H02_HomeReset: case MoveStep.H02_HomeReset:
MoveInfo.NextMoveStep(MoveStep.H03_HomeReset); MoveInfo.NextMoveStep(MoveStep.H03_HomeReset);
Location.ToLow(MoveInfo); Location.ToLow(MoveInfo);
Transplant.ToLow(MoveInfo); if (!Disable)
Transplant.ToLow(MoveInfo);
break; break;
case MoveStep.H03_HomeReset: case MoveStep.H03_HomeReset:
MoveInfo.NextMoveStep(MoveStep.H04_HomeReset); MoveInfo.NextMoveStep(MoveStep.H04_HomeReset);
if (ConfigHelper.Config.Get($"Runtime_{GroupName}_IsSucker",false)) if (ConfigHelper.Config.Get($"Runtime_{GroupName}_IsSucker",false) && !Disable)
{ {
if (string.IsNullOrEmpty(CurrrentRFID)) if (string.IsNullOrEmpty(CurrrentRFID))
CurrrentRFID = ConfigHelper.Config.Get($"Runtime_{GroupName}_CurrrentRFID"); CurrrentRFID = ConfigHelper.Config.Get($"Runtime_{GroupName}_CurrrentRFID");
......
...@@ -7,6 +7,7 @@ using System.Collections.Generic; ...@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -150,7 +151,7 @@ namespace DeviceLibrary ...@@ -150,7 +151,7 @@ namespace DeviceLibrary
var stop = TrayManager.TryGetTrayRequest(GroupName, CurrrentRFID, out _); var stop = TrayManager.TryGetTrayRequest(GroupName, CurrrentRFID, out _);
MoveInfo.log($"CurrrentRFID:{CurrrentRFID},HasLoad:{trayInfo.HasLoad},MI_Reel_Check:{IOValue(IO_Type.MI_Reel_Check)},NeedStop:{stop}"); MoveInfo.log($"CurrrentRFID:{CurrrentRFID},HasLoad:{trayInfo.HasLoad},MI_Reel_Check:{IOValue(IO_Type.MI_Reel_Check)},NeedStop:{stop}");
#region MI1,Mi2的情况判断 #region MI1,Mi2的情况判断
if ((GroupName == "AMH-MI1" || GroupName == "AMH-MI2") && trayInfo.TrayType== TrayTypeE.MTP1) if ((GroupName == "AMH-MI1" || GroupName == "AMH-MI2") && trayInfo.TrayType == TrayTypeE.MTP1)
{ {
/* /*
* 请求一个空托盘 * 请求一个空托盘
...@@ -185,7 +186,8 @@ namespace DeviceLibrary ...@@ -185,7 +186,8 @@ namespace DeviceLibrary
MoveInfo.log("检测到机器人急停,托盘放行处理"); MoveInfo.log("检测到机器人急停,托盘放行处理");
MoveInfo.NextMoveStep(MoveStep.TrayStop_04); MoveInfo.NextMoveStep(MoveStep.TrayStop_04);
return; return;
}else }
else
if (!trayInfo.HasLoad && IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW)) if (!trayInfo.HasLoad && IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW))
{ {
MoveInfo.NextMoveStep(MoveStep.TrayStop_07); MoveInfo.NextMoveStep(MoveStep.TrayStop_07);
...@@ -201,7 +203,8 @@ namespace DeviceLibrary ...@@ -201,7 +203,8 @@ namespace DeviceLibrary
} }
else if (trayInfo.DestinationAddr == DeviceGroup.addr_1 && trayInfo.HasLoad) else if (trayInfo.DestinationAddr == DeviceGroup.addr_1 && trayInfo.HasLoad)
{ {
if (IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW)) { if (IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW))
{
TrayManager.SetTrayError(CurrrentRFID); TrayManager.SetTrayError(CurrrentRFID);
Msg.add(crc.GetString("Res0034", "托盘没有检测到物料"), MsgLevel.alarm); Msg.add(crc.GetString("Res0034", "托盘没有检测到物料"), MsgLevel.alarm);
MoveInfo.log("托盘没有检测到物料"); MoveInfo.log("托盘没有检测到物料");
...@@ -212,11 +215,11 @@ namespace DeviceLibrary ...@@ -212,11 +215,11 @@ namespace DeviceLibrary
if (VStoreCollection.VStoreList[cid].RTStoreStatus == RTStoreStatus.Offline) if (VStoreCollection.VStoreList[cid].RTStoreStatus == RTStoreStatus.Offline)
{ {
MoveInfo.log($"当前需求设备CID:{cid}已离线"); MoveInfo.log($"当前需求设备CID:{cid}已离线");
var rm= TheLine.Regetposid(trayInfo.TrayParam, trayInfo.TrayType.ToString(), out string msg); var rm = TheLine.Regetposid(trayInfo.TrayParam, trayInfo.TrayType.ToString(), out string msg);
MoveInfo.log($"重新获取库位 msg:{msg},\t {rm.ToStr()}"); MoveInfo.log($"重新获取库位 msg:{msg},\t {rm.ToStr()}");
RequestLoadInfo RequestLoadInfo = new RequestLoadInfo(); RequestLoadInfo RequestLoadInfo = new RequestLoadInfo();
RequestLoadInfo.LoadParam = rm.clone(); RequestLoadInfo.LoadParam = rm.clone();
RequestLoadInfo.DeviceGroupName= rm.cid; RequestLoadInfo.DeviceGroupName = rm.cid;
RequestLoadInfo.TrayType = trayInfo.TrayType.ToString(); RequestLoadInfo.TrayType = trayInfo.TrayType.ToString();
RequestLoadInfo.IsEmpty = false; RequestLoadInfo.IsEmpty = false;
TrayManager.SetTrayLoadInfo(CurrrentRFID, RequestLoadInfo); TrayManager.SetTrayLoadInfo(CurrrentRFID, RequestLoadInfo);
...@@ -242,6 +245,37 @@ namespace DeviceLibrary ...@@ -242,6 +245,37 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.TrayStop_04); MoveInfo.NextMoveStep(MoveStep.TrayStop_04);
return; return;
} }
else if (GroupName == "CI" && trayInfo.TrayType == TrayTypeE.MTP1) {
var device = CI.DeviceList[GroupName];
if (!device.ManualCount)
{
MoveInfo.log($"点料机当前不可用,NG处理");
RequestLoadInfo RequestLoadInfo = new RequestLoadInfo();
RequestLoadInfo.LoadParam = trayInfo.TrayParam.clone();
RequestLoadInfo.LoadParam.IsNg=true;
RequestLoadInfo.LoadParam.NgMsg="XRay not enable";
RequestLoadInfo.DeviceGroupName = "AMH-MI2";
RequestLoadInfo.TrayType = trayInfo.TrayType.ToString();
RequestLoadInfo.IsEmpty = false;
TrayManager.SetTrayLoadInfo(CurrrentRFID, RequestLoadInfo);
//查询新库位, 检查料仓状态
MoveInfo.NextMoveStep(MoveStep.TrayStop_03);
return;
}
else
{
MoveInfo.NextMoveStep(MoveStep.TrayStop_07);
//抵达了一个有物料的托盘等待处理
if (!device.HasJob(trayInfo.TrayParam))
MoveInfo.NextMoveStep(MoveStep.TrayStop_04);
else
{
MoveInfo.NextMoveStep(MoveStep.TrayStop_07);
device.StartInStore(trayInfo.TrayParam);
}
}
}
#endregion #endregion
if (stop && !trayInfo.HasLoad && IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW)) if (stop && !trayInfo.HasLoad && IOValue(IO_Type.MI_Reel_Check).Equals(IO_VALUE.LOW))
{ {
......
...@@ -103,5 +103,11 @@ ...@@ -103,5 +103,11 @@
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43CDD09E-FCF3-4960-A01D-3BBFE9933122}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file \ No newline at end of file
using ConfigHelper; using ConfigHelper;
using Newtonsoft.Json; using Newtonsoft.Json;
using OnlineStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
...@@ -298,7 +299,7 @@ namespace RemoteSheardObject ...@@ -298,7 +299,7 @@ namespace RemoteSheardObject
if (mid == "AMH-MI1" || mid == "AMH-MI2") if (mid == "AMH-MI1" || mid == "AMH-MI2")
{ {
var micode = $"P{reelParam.PN}#S{reelParam.RI}#{reelParam.QTY}#{reelParam.DC}"; var micode = $"P{reelParam.PN}#S{reelParam.RI}#{reelParam.QTY}#{reelParam.DC}";
msg += "送往MI物料重组2dcode:" + micode; msg += $"送往MI物料重组2dcode:" + micode;
reelParam.SubCID = result.cid; reelParam.SubCID = result.cid;
reelParam.WareCode = micode; reelParam.WareCode = micode;
......
...@@ -34,12 +34,13 @@ ...@@ -34,12 +34,13 @@
this.txt_barcode = new System.Windows.Forms.TextBox(); this.txt_barcode = new System.Windows.Forms.TextBox();
this.label_barcode = new System.Windows.Forms.Label(); this.label_barcode = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.cb_manualcount = new System.Windows.Forms.CheckBox();
this.SuspendLayout(); this.SuspendLayout();
// //
// label_status // label_status
// //
this.label_status.AutoSize = true; this.label_status.AutoSize = true;
this.label_status.Location = new System.Drawing.Point(60, 86); this.label_status.Location = new System.Drawing.Point(60, 128);
this.label_status.Name = "label_status"; this.label_status.Name = "label_status";
this.label_status.Size = new System.Drawing.Size(41, 12); this.label_status.Size = new System.Drawing.Size(41, 12);
this.label_status.TabIndex = 0; this.label_status.TabIndex = 0;
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
// //
// btn_start // btn_start
// //
this.btn_start.Location = new System.Drawing.Point(325, 86); this.btn_start.Location = new System.Drawing.Point(325, 128);
this.btn_start.Name = "btn_start"; this.btn_start.Name = "btn_start";
this.btn_start.Size = new System.Drawing.Size(135, 23); this.btn_start.Size = new System.Drawing.Size(135, 23);
this.btn_start.TabIndex = 1; this.btn_start.TabIndex = 1;
...@@ -57,7 +58,7 @@ ...@@ -57,7 +58,7 @@
// //
// txt_barcode // txt_barcode
// //
this.txt_barcode.Location = new System.Drawing.Point(123, 34); this.txt_barcode.Location = new System.Drawing.Point(123, 76);
this.txt_barcode.Name = "txt_barcode"; this.txt_barcode.Name = "txt_barcode";
this.txt_barcode.Size = new System.Drawing.Size(337, 21); this.txt_barcode.Size = new System.Drawing.Size(337, 21);
this.txt_barcode.TabIndex = 2; this.txt_barcode.TabIndex = 2;
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
// label_barcode // label_barcode
// //
this.label_barcode.AutoSize = true; this.label_barcode.AutoSize = true;
this.label_barcode.Location = new System.Drawing.Point(60, 37); this.label_barcode.Location = new System.Drawing.Point(60, 79);
this.label_barcode.Name = "label_barcode"; this.label_barcode.Name = "label_barcode";
this.label_barcode.Size = new System.Drawing.Size(53, 12); this.label_barcode.Size = new System.Drawing.Size(53, 12);
this.label_barcode.TabIndex = 0; this.label_barcode.TabIndex = 0;
...@@ -78,10 +79,22 @@ ...@@ -78,10 +79,22 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// cb_manualcount
//
this.cb_manualcount.AutoSize = true;
this.cb_manualcount.Location = new System.Drawing.Point(32, 27);
this.cb_manualcount.Name = "cb_manualcount";
this.cb_manualcount.Size = new System.Drawing.Size(96, 16);
this.cb_manualcount.TabIndex = 3;
this.cb_manualcount.Text = "手动拦截点料";
this.cb_manualcount.UseVisualStyleBackColor = true;
this.cb_manualcount.CheckedChanged += new System.EventHandler(this.cb_manualcount_CheckedChanged);
//
// CIDebugControl // CIDebugControl
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.cb_manualcount);
this.Controls.Add(this.txt_barcode); this.Controls.Add(this.txt_barcode);
this.Controls.Add(this.btn_start); this.Controls.Add(this.btn_start);
this.Controls.Add(this.label_barcode); this.Controls.Add(this.label_barcode);
...@@ -100,5 +113,6 @@ ...@@ -100,5 +113,6 @@
private System.Windows.Forms.TextBox txt_barcode; private System.Windows.Forms.TextBox txt_barcode;
private System.Windows.Forms.Label label_barcode; private System.Windows.Forms.Label label_barcode;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.CheckBox cb_manualcount;
} }
} }
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -50,13 +51,18 @@ namespace TheMachine.device ...@@ -50,13 +51,18 @@ namespace TheMachine.device
LogUtil.info("手动点击开始点料"); LogUtil.info("手动点击开始点料");
} }
else { else {
MessageBox.Show("未成功连接VJ点料机"); MessageBox.Show(crc.GetString("Res0117.c9f109fe","未成功连接VJ点料机"));
} }
} }
else else
{ {
MessageBox.Show("点料机没有准备好,不能启动."); MessageBox.Show(crc.GetString("Res0118.f955ef4e","点料机没有准备好,不能启动."));
} }
} }
private void cb_manualcount_CheckedChanged(object sender, EventArgs e)
{
CI.DeviceList["CI"].ManualCount = cb_manualcount.Checked;
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -43,9 +43,10 @@ namespace TheMachine ...@@ -43,9 +43,10 @@ namespace TheMachine
this.cylinderButton1 = new TheMachine.CylinderButton(); this.cylinderButton1 = new TheMachine.CylinderButton();
this.ioControl1 = new TheMachine.IOControl(); this.ioControl1 = new TheMachine.IOControl();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.btn_Reset = new System.Windows.Forms.Button();
this.btn_sucker_release = new System.Windows.Forms.Button(); this.btn_sucker_release = new System.Windows.Forms.Button();
this.rfidControl1 = new TheMachine.UC.RfidControl(); this.rfidControl1 = new TheMachine.UC.RfidControl();
this.btn_Reset = new System.Windows.Forms.Button(); this.cb_disabledevice = new System.Windows.Forms.CheckBox();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
...@@ -59,7 +60,7 @@ namespace TheMachine ...@@ -59,7 +60,7 @@ namespace TheMachine
// //
// button_save // button_save
// //
this.button_save.Location = new System.Drawing.Point(755, 623); this.button_save.Location = new System.Drawing.Point(762, 640);
this.button_save.Name = "button_save"; this.button_save.Name = "button_save";
this.button_save.Size = new System.Drawing.Size(100, 23); this.button_save.Size = new System.Drawing.Size(100, 23);
this.button_save.TabIndex = 7; this.button_save.TabIndex = 7;
...@@ -69,21 +70,21 @@ namespace TheMachine ...@@ -69,21 +70,21 @@ namespace TheMachine
// //
// textBox_p2 // textBox_p2
// //
this.textBox_p2.Location = new System.Drawing.Point(758, 544); this.textBox_p2.Location = new System.Drawing.Point(765, 570);
this.textBox_p2.Name = "textBox_p2"; this.textBox_p2.Name = "textBox_p2";
this.textBox_p2.Size = new System.Drawing.Size(100, 21); this.textBox_p2.Size = new System.Drawing.Size(100, 21);
this.textBox_p2.TabIndex = 8; this.textBox_p2.TabIndex = 8;
// //
// textBox_p3 // textBox_p3
// //
this.textBox_p3.Location = new System.Drawing.Point(755, 587); this.textBox_p3.Location = new System.Drawing.Point(762, 613);
this.textBox_p3.Name = "textBox_p3"; this.textBox_p3.Name = "textBox_p3";
this.textBox_p3.Size = new System.Drawing.Size(100, 21); this.textBox_p3.Size = new System.Drawing.Size(100, 21);
this.textBox_p3.TabIndex = 8; this.textBox_p3.TabIndex = 8;
// //
// button_p2 // button_p2
// //
this.button_p2.Location = new System.Drawing.Point(581, 542); this.button_p2.Location = new System.Drawing.Point(588, 568);
this.button_p2.Name = "button_p2"; this.button_p2.Name = "button_p2";
this.button_p2.Size = new System.Drawing.Size(162, 23); this.button_p2.Size = new System.Drawing.Size(162, 23);
this.button_p2.TabIndex = 9; this.button_p2.TabIndex = 9;
...@@ -93,7 +94,7 @@ namespace TheMachine ...@@ -93,7 +94,7 @@ namespace TheMachine
// //
// button_p3 // button_p3
// //
this.button_p3.Location = new System.Drawing.Point(578, 585); this.button_p3.Location = new System.Drawing.Point(585, 611);
this.button_p3.Name = "button_p3"; this.button_p3.Name = "button_p3";
this.button_p3.Size = new System.Drawing.Size(162, 23); this.button_p3.Size = new System.Drawing.Size(162, 23);
this.button_p3.TabIndex = 9; this.button_p3.TabIndex = 9;
...@@ -103,7 +104,7 @@ namespace TheMachine ...@@ -103,7 +104,7 @@ namespace TheMachine
// //
// button_p1 // button_p1
// //
this.button_p1.Location = new System.Drawing.Point(581, 513); this.button_p1.Location = new System.Drawing.Point(588, 539);
this.button_p1.Name = "button_p1"; this.button_p1.Name = "button_p1";
this.button_p1.Size = new System.Drawing.Size(162, 23); this.button_p1.Size = new System.Drawing.Size(162, 23);
this.button_p1.TabIndex = 9; this.button_p1.TabIndex = 9;
...@@ -118,7 +119,7 @@ namespace TheMachine ...@@ -118,7 +119,7 @@ namespace TheMachine
this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton8.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton8.IO_HIGH = "AMH_Front_Stop"; this.cylinderButton8.IO_HIGH = "AMH_Front_Stop";
this.cylinderButton8.IO_LOW = ""; this.cylinderButton8.IO_LOW = "";
this.cylinderButton8.Location = new System.Drawing.Point(618, 378); this.cylinderButton8.Location = new System.Drawing.Point(625, 404);
this.cylinderButton8.Name = "cylinderButton8"; this.cylinderButton8.Name = "cylinderButton8";
this.cylinderButton8.Size = new System.Drawing.Size(181, 38); this.cylinderButton8.Size = new System.Drawing.Size(181, 38);
this.cylinderButton8.TabIndex = 2; this.cylinderButton8.TabIndex = 2;
...@@ -133,7 +134,7 @@ namespace TheMachine ...@@ -133,7 +134,7 @@ namespace TheMachine
this.cylinderButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton2.IO_HIGH = "AMH_Tray_Stop"; this.cylinderButton2.IO_HIGH = "AMH_Tray_Stop";
this.cylinderButton2.IO_LOW = ""; this.cylinderButton2.IO_LOW = "";
this.cylinderButton2.Location = new System.Drawing.Point(618, 422); this.cylinderButton2.Location = new System.Drawing.Point(625, 448);
this.cylinderButton2.Name = "cylinderButton2"; this.cylinderButton2.Name = "cylinderButton2";
this.cylinderButton2.Size = new System.Drawing.Size(181, 38); this.cylinderButton2.Size = new System.Drawing.Size(181, 38);
this.cylinderButton2.TabIndex = 3; this.cylinderButton2.TabIndex = 3;
...@@ -148,7 +149,7 @@ namespace TheMachine ...@@ -148,7 +149,7 @@ namespace TheMachine
this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton7.IO_HIGH = "AMH_Sucker"; this.cylinderButton7.IO_HIGH = "AMH_Sucker";
this.cylinderButton7.IO_LOW = ""; this.cylinderButton7.IO_LOW = "";
this.cylinderButton7.Location = new System.Drawing.Point(618, 337); this.cylinderButton7.Location = new System.Drawing.Point(625, 363);
this.cylinderButton7.Name = "cylinderButton7"; this.cylinderButton7.Name = "cylinderButton7";
this.cylinderButton7.Size = new System.Drawing.Size(181, 38); this.cylinderButton7.Size = new System.Drawing.Size(181, 38);
this.cylinderButton7.TabIndex = 3; this.cylinderButton7.TabIndex = 3;
...@@ -163,7 +164,7 @@ namespace TheMachine ...@@ -163,7 +164,7 @@ namespace TheMachine
this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton6.IO_HIGH = "AMH_Trans_Fwd"; this.cylinderButton6.IO_HIGH = "AMH_Trans_Fwd";
this.cylinderButton6.IO_LOW = "AMH_Trans_Bwd"; this.cylinderButton6.IO_LOW = "AMH_Trans_Bwd";
this.cylinderButton6.Location = new System.Drawing.Point(618, 293); this.cylinderButton6.Location = new System.Drawing.Point(625, 319);
this.cylinderButton6.Name = "cylinderButton6"; this.cylinderButton6.Name = "cylinderButton6";
this.cylinderButton6.Size = new System.Drawing.Size(181, 38); this.cylinderButton6.Size = new System.Drawing.Size(181, 38);
this.cylinderButton6.TabIndex = 4; this.cylinderButton6.TabIndex = 4;
...@@ -178,7 +179,7 @@ namespace TheMachine ...@@ -178,7 +179,7 @@ namespace TheMachine
this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton1.IO_HIGH = "AMH_Location_Up"; this.cylinderButton1.IO_HIGH = "AMH_Location_Up";
this.cylinderButton1.IO_LOW = "AMH_Location_Down"; this.cylinderButton1.IO_LOW = "AMH_Location_Down";
this.cylinderButton1.Location = new System.Drawing.Point(618, 249); this.cylinderButton1.Location = new System.Drawing.Point(625, 275);
this.cylinderButton1.Name = "cylinderButton1"; this.cylinderButton1.Name = "cylinderButton1";
this.cylinderButton1.Size = new System.Drawing.Size(181, 38); this.cylinderButton1.Size = new System.Drawing.Size(181, 38);
this.cylinderButton1.TabIndex = 5; this.cylinderButton1.TabIndex = 5;
...@@ -197,6 +198,7 @@ namespace TheMachine ...@@ -197,6 +198,7 @@ namespace TheMachine
// panel1 // panel1
// //
this.panel1.AutoScroll = true; this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.cb_disabledevice);
this.panel1.Controls.Add(this.btn_Reset); this.panel1.Controls.Add(this.btn_Reset);
this.panel1.Controls.Add(this.btn_sucker_release); this.panel1.Controls.Add(this.btn_sucker_release);
this.panel1.Controls.Add(this.rfidControl1); this.panel1.Controls.Add(this.rfidControl1);
...@@ -219,11 +221,21 @@ namespace TheMachine ...@@ -219,11 +221,21 @@ namespace TheMachine
this.panel1.Size = new System.Drawing.Size(1021, 741); this.panel1.Size = new System.Drawing.Size(1021, 741);
this.panel1.TabIndex = 10; this.panel1.TabIndex = 10;
// //
// btn_Reset
//
this.btn_Reset.Location = new System.Drawing.Point(770, 140);
this.btn_Reset.Name = "btn_Reset";
this.btn_Reset.Size = new System.Drawing.Size(100, 69);
this.btn_Reset.TabIndex = 12;
this.btn_Reset.Text = "Reset";
this.btn_Reset.UseVisualStyleBackColor = true;
this.btn_Reset.Click += new System.EventHandler(this.btn_Reset_Click);
//
// btn_sucker_release // btn_sucker_release
// //
this.btn_sucker_release.BackColor = System.Drawing.Color.White; this.btn_sucker_release.BackColor = System.Drawing.Color.White;
this.btn_sucker_release.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_sucker_release.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn_sucker_release.Location = new System.Drawing.Point(618, 469); this.btn_sucker_release.Location = new System.Drawing.Point(625, 495);
this.btn_sucker_release.Name = "btn_sucker_release"; this.btn_sucker_release.Name = "btn_sucker_release";
this.btn_sucker_release.Size = new System.Drawing.Size(181, 38); this.btn_sucker_release.Size = new System.Drawing.Size(181, 38);
this.btn_sucker_release.TabIndex = 11; this.btn_sucker_release.TabIndex = 11;
...@@ -240,15 +252,16 @@ namespace TheMachine ...@@ -240,15 +252,16 @@ namespace TheMachine
this.rfidControl1.TabIndex = 10; this.rfidControl1.TabIndex = 10;
this.rfidControl1.Visible = false; this.rfidControl1.Visible = false;
// //
// btn_Reset // cb_disabledevice
// //
this.btn_Reset.Location = new System.Drawing.Point(770, 140); this.cb_disabledevice.AutoSize = true;
this.btn_Reset.Name = "btn_Reset"; this.cb_disabledevice.Location = new System.Drawing.Point(588, 245);
this.btn_Reset.Size = new System.Drawing.Size(100, 69); this.cb_disabledevice.Name = "cb_disabledevice";
this.btn_Reset.TabIndex = 12; this.cb_disabledevice.Size = new System.Drawing.Size(108, 16);
this.btn_Reset.Text = "Reset"; this.cb_disabledevice.TabIndex = 13;
this.btn_Reset.UseVisualStyleBackColor = true; this.cb_disabledevice.Text = "Disable device";
this.btn_Reset.Click += new System.EventHandler(this.btn_Reset_Click); this.cb_disabledevice.UseVisualStyleBackColor = true;
this.cb_disabledevice.CheckedChanged += new System.EventHandler(this.cb_disabledevice_CheckedChanged);
// //
// TransplantControl // TransplantControl
// //
...@@ -282,5 +295,6 @@ namespace TheMachine ...@@ -282,5 +295,6 @@ namespace TheMachine
private UC.RfidControl rfidControl1; private UC.RfidControl rfidControl1;
private System.Windows.Forms.Button btn_sucker_release; private System.Windows.Forms.Button btn_sucker_release;
private System.Windows.Forms.Button btn_Reset; private System.Windows.Forms.Button btn_Reset;
private System.Windows.Forms.CheckBox cb_disabledevice;
} }
} }
...@@ -96,5 +96,10 @@ namespace TheMachine ...@@ -96,5 +96,10 @@ namespace TheMachine
{ {
TransplantMove.DeviceList[DeviceGroupName].ResetStatus(); TransplantMove.DeviceList[DeviceGroupName].ResetStatus();
} }
private void cb_disabledevice_CheckedChanged(object sender, EventArgs e)
{
TransplantMove.DeviceList[DeviceGroupName].Disable = cb_disabledevice.Checked;
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!