Commit 8189c6d2 刘韬

1

1 个父辈 f27ffb8e
......@@ -37,14 +37,13 @@ namespace OnlineStore
LoadData();
LoadData(true);
var lngjson = JsonHelper.SerializeObject(LangMap);
Task.Run(() => {
//return;
try
{
Task.Delay(10 * 1000).Wait();
var lngjson = JsonHelper.SerializeObject(LangMap);
Task.Delay(10 * 1000).Wait();
if (SMF.UploadLangJsonData(lngjson, out SmfResult smfResult))
{
LogUtil.info("语言资源上传成功");
......@@ -72,6 +71,8 @@ namespace OnlineStore
LogUtil.info("语言资源处理出错:" + e.ToString());
}
});
LoadData(true);
}
private static char spilt = '\t';
......
......@@ -127,6 +127,17 @@ namespace OnlineStore.Common
monitor_config_not_exist,
AxisMoveControl_status_monitor,
string_full_takeout,
string_not_onposition
string_not_onposition,
in_store_nothave_position,
begin_singlein,
Clamp_Axis_running_cant_singlein,
string_begin_release,
store_running_cant_inout,
close_singledoor,
not_in_single_prosses,
begin_open_string_door,
string_not_onposition_01,
begin_close_string_door,
tray_detect_reel_01
}
}
......@@ -152,6 +152,11 @@ public class HIKCamera
}
public string GetFixtureStateFilename(string PositionNum, string WareNumber, StoreMoveType storeMoveType, FixtureState fixtureState)
{
Path.GetInvalidFileNameChars().ToList().ForEach((ix) => { WareNumber = WareNumber.Replace(ix.ToString(), ""); });
if (WareNumber.Length > 200) {
WareNumber = "";
}
string dir = $"\\image\\Fixture\\{storeMoveType}\\{PositionNum}\\";
Directory.CreateDirectory(dir);
string filename = $"{WareNumber}@@{fixtureState}.jpg";
......
using OnlineStore.Common;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Concurrent;
......@@ -406,7 +407,7 @@ namespace DeviceLibrary
{
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因
//SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId);
WarnMsg = "入库未找到库位:二维码【" + message + "】库位【" + posId + "】 ";
WarnMsg = crc.GetString(L.in_store_nothave_position,"入库未找到库位:") + posId;//0505
LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return;
}
......
......@@ -113,11 +113,15 @@ namespace DeviceLibrary
case MoveStep.StoreTS01:
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString(L.out_store_detect_material,"出库时料叉X30检测到有物料无法继续,请检查."), MsgLevel.alarm);
RobotManage.UserPause("出库时料叉X30检测到有物料无法继续,请检查");
if (!IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture,Config,IO_VALUE.HIGH,5000))
Msg.add(crc.GetString(L.out_store_detect_material,"出库时料叉X30检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("出库时料叉X30检测到有物料无法继续,请检查");
}
else
{
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false;
MoveInfo.NextMoveStep(MoveStep.StoreTS02);
MoveInfo.log($"{storeMoveType}:检查安全状态");
}
......@@ -175,6 +179,8 @@ namespace DeviceLibrary
}
else
{
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false;
if (To.posid== BoxStorePosition.strings && ConfigHelper.Config.Get("Device_Use_Fixpos",false) && Fix!=null)
MoveInfo.NextMoveStep(MoveStep.StoreFIX01);
......@@ -207,7 +213,7 @@ namespace DeviceLibrary
case MoveStep.StoreFIX04:
MoveInfo.NextMoveStep(MoveStep.StoreFIX05);
Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PL, Config.Comp_P2_speed);
UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed);
UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed/2);
MoveInfo.log($"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}");
MoveInfo.log($"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}");
break;
......@@ -264,13 +270,16 @@ namespace DeviceLibrary
break;
case MoveStep.StoreTS15:
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut));
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
if (!IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString(L.in_store_detect_material,"入库后料叉X30上任然检测到物料,请检查."), MsgLevel.alarm);
RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查");
Msg.add(crc.GetString(L.in_store_detect_material,"入库后料叉X30上任然检测到物料,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查");
}
else
{
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false;
MoveInfo.NextMoveStep(MoveStep.StoreTS16);
MoveInfo.log($"{storeMoveType}:安全检查");
}
......
......@@ -354,7 +354,8 @@ namespace DeviceLibrary
X09_BoxNotDetect,
ResetBtn,
RunBtn,
SuddenStop
SuddenStop,
X09_Clear
}
public class IdWorker
{
......
......@@ -236,7 +236,7 @@ namespace DeviceLibrary
else {
hasAlarm = true;
AlarmBuzzer.ON();
ServerCM.storeStatus = StoreStatus.Warning;
ServerCM.storeStatus = isInSuddenDown ? StoreStatus.SuddenStop : StoreStatus.Warning;
}
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
if (!UserPause)
......@@ -253,6 +253,7 @@ namespace DeviceLibrary
}
public void Stop() {
mstart = false;
AutoInOutTest = false;
ServerCM.StopConnectServer();
Thread.Sleep(300);
Alarm(AlarmType.None);
......@@ -515,6 +516,7 @@ namespace DeviceLibrary
internal DateTime checkAlarmTime = DateTime.Now;
public bool DeviceCheck() {
bool ok = true;
isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW);
if (UserPause)
{
Msg.add(crc.GetString(L.system_pause, "系统暂停"), MsgLevel.warning);
......@@ -523,7 +525,7 @@ namespace DeviceLibrary
ok = false;
return ok;
}
else if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
else if (isInSuddenDown)
{
Alarm(AlarmType.SuddenStop);
Msg.add(crc.GetString(L.in_suddenstop, "急停中"), MsgLevel.alarm);
......
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -19,9 +20,9 @@ namespace DeviceLibrary
if (ClampMoveInfo.MoveStep == MoveStep.Wait)
{
ClampMoveInfo.NewMove(MoveStep.SingleIn);
return "开始单盘入库";
return crc.GetString(L.begin_singlein ,"开始单盘入库");
}
return "取料机构运转中,无法单盘入库";
return crc.GetString(L.Clamp_Axis_running_cant_singlein,"取料机构运转中,无法单盘入库");
}
public string doTakeOutReel()
......@@ -32,15 +33,15 @@ namespace DeviceLibrary
if (step == MoveStep.StringReadyGet && clampstep >= MoveStep.ReelClamp_GetHeight)
{
RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
return "开始释放料串";
return crc.GetString(L.string_begin_release, "开始释放料串");
}
if (step == MoveStep.StringReadyPut)
{
RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
return "开始释放料串";
return crc.GetString(L.string_begin_release, "开始释放料串");
}
LogUtil.info($"料串无法释放,料仓正在出入库中:{StringMoveInfo.MoveStep}");
return $"料串无法释放,料仓正在出入库中.";
return crc.GetString(L.store_running_cant_inout, "料串无法释放,料仓正在出入库中.");
}
public string doSingleInCloseNgDoor()
{
......@@ -48,10 +49,10 @@ namespace DeviceLibrary
if (ClampMoveInfo.MoveStep == MoveStep.SingleInReady)
{
ClampMoveInfo.NewMove(MoveStep.SingleInRun);
return "关闭单料门";
return crc.GetString(L.close_singledoor, "关闭单料门");
}
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
return $"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}";
return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:")+ClampMoveInfo.MoveStep;
}
public string doOpenBatchDoor()
......@@ -64,7 +65,7 @@ namespace DeviceLibrary
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.HIGH);
return "开始打开折叠门";
return crc.GetString(L.begin_open_string_door, "开始打开料串门");
//LogUtil.info($"批量料门无法打开,料仓正在出入库中:{StringMoveInfo.MoveStep}");
//return $"批量料门无法打开,料仓正在出入库中.";
......@@ -75,7 +76,7 @@ namespace DeviceLibrary
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{
LogUtil.info("料串尚未到位无法关门X09=High");
return $"料串尚未到位无法关门X09=High";
return crc.GetString(L.string_not_onposition_01, "料串尚未到位无法关门X09=High");
}
//RobotManage.mainMachine.StringMoveInfo.NewMove(MoveStep.Wait);
......@@ -84,7 +85,7 @@ namespace DeviceLibrary
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
return $"批量料门关闭";
return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
}
}
}
......@@ -35,13 +35,14 @@ namespace DeviceLibrary
switch (StoreMoveInfo.MoveStep)
{
case MoveStep.Wait:
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait) {
//IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)
if (StoreMoveInfo.IsTimeOut(5) && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture,Config,IO_VALUE.HIGH,5000) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait) {
StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
StoreMoveInfo.MoveParam.PosID = "NG";
StoreMoveInfo.MoveParam.PlateH = 56;
StoreMoveInfo.MoveParam.PlateW = 7;
StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.no_info_reel, "无信息料盘出库");
StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.tray_detect_reel_01, "料叉传感器X30感应到有料,请人工确认");
StoreMoveInfo.log($"开始无信息料盘出库");
ServerCM.storeStatus = StoreStatus.OutStoreExecute;
CloseFlipDoor(StoreMoveInfo);
......
......@@ -68,6 +68,7 @@ namespace DeviceLibrary
bool newreel = true;
bool downCheck1 = false;
bool downCheck2 = false;
bool downCheck3 = false;
int ReelGetFail = 0;
void StringProcess()
{
......@@ -127,6 +128,7 @@ namespace DeviceLibrary
newreel = true;
downCheck1 = false;
downCheck2 = false;
downCheck3 = false;
break;
case MoveStep.StringLoad_03:
if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
......@@ -171,7 +173,15 @@ namespace DeviceLibrary
StringMoveInfo.log($"料串有盘下降5mm");
var tpos2 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_DetectDownMM;
if (tpos2 < 0)
{
tpos2 = 0;
if (tpos2 - Config.Batch_PoToMM * 30 < 0)
{
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出");
}
}
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1);
}
break;
......@@ -197,7 +207,9 @@ namespace DeviceLibrary
StringMoveInfo.log($"料串出库模式,下降5cm");
var tpos2 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutStoreDownMM;
if (tpos2 < 0)
{
tpos2 = 0;
}
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1);
StringType = StringTypeE.Out;
}
......@@ -230,7 +242,7 @@ namespace DeviceLibrary
tpos = 0;
if (tpos < Config.Batch_P2 * 0.3 && !downCheck1)
{
StringMoveInfo.log($"料串下降到20%位置,重新上升");
StringMoveInfo.log($"料串下降到30%位置,重新上升");
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
downCheck1 = true;
}
......@@ -240,11 +252,20 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
downCheck2 = true;
}
else if (tpos > Config.Batch_P1) {
else if (tpos > Config.Batch_P1)
{
StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut);
StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}cm");
Batch_Axis.AbsMove(StringMoveInfo, tpos, Config.Batch_P1_speed);
} else {
}
else if (!downCheck3)
{
StringMoveInfo.log($"料串下降到0%位置,重新上升");
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_01);
downCheck3 = true;
}
else
{
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full;
StringMoveInfo.log($"料串已满可以送出");
......
......@@ -369,7 +369,10 @@ namespace DeviceLibrary
else
{
string mode = HCBoardManager.AxisPrfMode(modeValue);
lblAxisPrfMode.Text = mode;
if (crc.CurrLanguage == "zh-CN")
lblAxisPrfMode.Text = mode;
else
lblAxisPrfMode.Text = modeValue.ToString();
}
......@@ -405,7 +408,10 @@ namespace DeviceLibrary
short value = HCBoardManager.GetHomeStatus(axisNo);
string homesstr = HCBoardManager.AxisHomeSts(value);
lblhomeSts.Text = homesstr;
if (crc.CurrLanguage == "zh-CN")
lblhomeSts.Text = homesstr;
else
lblhomeSts.Text = value.ToString();
btnReadPosition_Click(null, null);
}
private void ShowlbSts(Label lbl, int value,bool isAlarm=false )
......
......@@ -140,7 +140,7 @@ namespace TheMachine
// 简体中文ToolStripMenuItem
//
this.简体中文ToolStripMenuItem.Name = "简体中文ToolStripMenuItem";
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.简体中文ToolStripMenuItem.Tag = "not";
this.简体中文ToolStripMenuItem.Text = "简体中文";
this.简体中文ToolStripMenuItem.Click += new System.EventHandler(this.简体中文ToolStripMenuItem_Click);
......@@ -148,7 +148,7 @@ namespace TheMachine
// 日本语ToolStripMenuItem
//
this.日本语ToolStripMenuItem.Name = "日本语ToolStripMenuItem";
this.日本语ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.日本语ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.日本语ToolStripMenuItem.Tag = "not";
this.日本语ToolStripMenuItem.Text = "日本語";
this.日本语ToolStripMenuItem.Click += new System.EventHandler(this.日本语ToolStripMenuItem_Click);
......@@ -156,10 +156,9 @@ namespace TheMachine
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.englishToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.englishToolStripMenuItem.Tag = "not";
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Visible = false;
this.englishToolStripMenuItem.Click += new System.EventHandler(this.englishToolStripMenuItem_Click);
//
// 关于ToolStripMenuItem
......
......@@ -318,6 +318,9 @@ namespace TheMachine
if (msg.errInfo == ErrInfo.X09_BoxNotDetect)
{
btn_IgnoreX09.Visible = true;
}else if (msg.errInfo == ErrInfo.X09_Clear)
{
btn_IgnoreX09.Visible = false;
}
else if (msg.errInfo == ErrInfo.RunBtn)
{
......
......@@ -156,7 +156,7 @@ namespace TheMachine
this.dataGridView1.ShowCellToolTips = false;
this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.ShowRowErrors = false;
this.dataGridView1.Size = new System.Drawing.Size(981, 308);
this.dataGridView1.Size = new System.Drawing.Size(981, 246);
this.dataGridView1.TabIndex = 103;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
......
......@@ -325,7 +325,8 @@ namespace TheMachine
if (RobotManage.mainMachine.runStatus == RunStatus.Running)
{
string selectPositionNum = cmbPosition.Text;
JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum);
ACStorePosition ktkPosition = CSVPositionReader<ACStorePosition>.GetPositon(selectPositionNum);
JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum, ktkPosition.BagWidth, ktkPosition.BagHigh);
if (!RobotManage.mainMachine.StartInStore(jobInfo)) {
MessageBox.Show(crc.GetString(L.reel_not_onposition_cant_manual_in, "料盘没有到位,无法手动入库"));
return;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!