Commit a12fb6e3 张东亮

库位高低点设置防呆添加

1 个父辈 ef6c5274
此文件类型无法预览
...@@ -47,22 +47,22 @@ namespace DeviceLibrary ...@@ -47,22 +47,22 @@ namespace DeviceLibrary
{ {
//if (!Monitor.TryEnter(serverConnectTimer)) //if (!Monitor.TryEnter(serverConnectTimer))
//{ //{
try try
{ {
if (!server.StartsWith("http")) if (!server.StartsWith("http"))
return; return;
if (!RobotManage.isRunning) if (!RobotManage.isRunning)
ProcessMsg(Msg.msg); ProcessMsg(Msg.msg);
SendLineStatus(); SendLineStatus();
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.info($"ServerConnectTimer_Elapsed:{ex}"); LogUtil.info($"ServerConnectTimer_Elapsed:{ex}");
} }
finally finally
{ {
//Monitor.Exit(serverConnectTimer); //Monitor.Exit(serverConnectTimer);
} }
//} //}
} }
...@@ -148,7 +148,7 @@ namespace DeviceLibrary ...@@ -148,7 +148,7 @@ namespace DeviceLibrary
LogUtil.info(JsonHelper.SerializeObject(operation)); LogUtil.info(JsonHelper.SerializeObject(operation));
if (RobotManage.InoutDebugMode) if (RobotManage.InoutDebugMode)
return true; return true;
Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 5000,true); Operation resultOperation = HttpHelper.Post(GetPostApi(), operation, 5000, true);
if (resultOperation == null) if (resultOperation == null)
{ {
...@@ -238,7 +238,6 @@ namespace DeviceLibrary ...@@ -238,7 +238,6 @@ namespace DeviceLibrary
else if (!string.IsNullOrEmpty(WarnMsg)) else if (!string.IsNullOrEmpty(WarnMsg))
{ {
sendmsg = string.Join(",", new string[] { WarnMsg }); sendmsg = string.Join(",", new string[] { WarnMsg });
//lineOperation.msgData["zh"] = lineOperation.msg; //lineOperation.msgData["zh"] = lineOperation.msg;
//lineOperation.msgData["en"] = lineOperation.msg; //lineOperation.msgData["en"] = lineOperation.msg;
//lineOperation.msgData["jp"] = lineOperation.msg; //lineOperation.msgData["jp"] = lineOperation.msg;
...@@ -248,7 +247,6 @@ namespace DeviceLibrary ...@@ -248,7 +247,6 @@ namespace DeviceLibrary
{ {
sendmsg = crc.GetString("Res0001", "设备未启动"); sendmsg = crc.GetString("Res0001", "设备未启动");
} }
lineOperation.msg = sendmsg; lineOperation.msg = sendmsg;
lineOperation.msg = lineOperation.msg.Trim().Trim(','); lineOperation.msg = lineOperation.msg.Trim().Trim(',');
boxStatus.msg = lineOperation.msg; boxStatus.msg = lineOperation.msg;
...@@ -484,10 +482,10 @@ namespace DeviceLibrary ...@@ -484,10 +482,10 @@ namespace DeviceLibrary
map[ParamDefine.singleReelIn] = ParamDefine.enable; map[ParamDefine.singleReelIn] = ParamDefine.enable;
} }
} }
map[ParamDefine.SendEmptyShelf]= ParamDefine.disable; map[ParamDefine.SendEmptyShelf] = ParamDefine.disable;
map[ParamDefine.SendFullShelf] =ParamDefine.disable; map[ParamDefine.SendFullShelf] = ParamDefine.disable;
map[ParamDefine.NeedEmptySHelf]= ParamDefine.disable; map[ParamDefine.NeedEmptySHelf] = ParamDefine.disable;
map[ParamDefine.NeedFullShelf]= ParamDefine.disable; map[ParamDefine.NeedFullShelf] = ParamDefine.disable;
if (RobotManage.mainMachine?.StringState == MainMachine.StringStateE.None) if (RobotManage.mainMachine?.StringState == MainMachine.StringStateE.None)
{ {
//map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable; //map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable;
...@@ -507,7 +505,7 @@ namespace DeviceLibrary ...@@ -507,7 +505,7 @@ namespace DeviceLibrary
return map; return map;
} }
public Dictionary<string,string> GetAgvBtnStatus() public Dictionary<string, string> GetAgvBtnStatus()
{ {
//mimo呼叫agv按钮 //mimo呼叫agv按钮
Dictionary<string, string> map = new Dictionary<string, string>(); Dictionary<string, string> map = new Dictionary<string, string>();
......
...@@ -23,12 +23,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -23,12 +23,12 @@ namespace OnlineStore.LoadCSVLibrary
[CSVAttribute("旋转轴位置P2"), Editable(0)] [CSVAttribute("旋转轴位置P2"), Editable(0)]
public int XAxis_Position_P2 { get; set; } public int XAxis_Position_P2 { get; set; }
/// <summary> /// <summary>
/// 升降轴(库位入料前点)P3 /// 升降轴库位入料高点P3
/// </summary> /// </summary>
[CSVAttribute("升降轴库位入料高点P3"), Editable(1)] [CSVAttribute("升降轴库位入料高点P3"), Editable(1)]
public int UpDownAxis_IHPosition_P3 { get; set; } public int UpDownAxis_IHPosition_P3 { get; set; }
/// <summary> /// <summary>
/// 升降轴(库位入料缓冲点)P4 /// 升降轴库位入料低点P4
/// </summary> /// </summary>
[CSVAttribute("升降轴库位入料低点P4"), Editable(1)] [CSVAttribute("升降轴库位入料低点P4"), Editable(1)]
public int UpDownAxis_ILPosition_P4 { get; set; } public int UpDownAxis_ILPosition_P4 { get; set; }
......
using DeviceLibrary; using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -55,7 +56,7 @@ namespace TheMachine ...@@ -55,7 +56,7 @@ namespace TheMachine
} }
private ACStorePosition _aCStorePosition; private ACStorePosition _aCStorePosition;
public void LoadPos(ACStorePosition aCStorePosition) public void LoadPos(ACStorePosition aCStorePosition)
...@@ -88,7 +89,7 @@ namespace TheMachine ...@@ -88,7 +89,7 @@ namespace TheMachine
if (attrib.Count() == 0) if (attrib.Count() == 0)
continue; continue;
var FieldName=((CSVAttribute)attrib.First()).FieldName; var FieldName = ((CSVAttribute)attrib.First()).FieldName;
var ProValue = prop.GetValue(aCStorePosition).ToString(); var ProValue = prop.GetValue(aCStorePosition).ToString();
if (asixno != lastSubType) if (asixno != lastSubType)
...@@ -115,7 +116,8 @@ namespace TheMachine ...@@ -115,7 +116,8 @@ namespace TheMachine
button.Tag = asixno; button.Tag = asixno;
tableLayoutPanel1.Controls.Add(button, c, r); tableLayoutPanel1.Controls.Add(button, c, r);
} }
else { else
{
Label button = new Label(); Label button = new Label();
button.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom); button.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom);
button.Name = prop.Name; button.Name = prop.Name;
...@@ -124,7 +126,7 @@ namespace TheMachine ...@@ -124,7 +126,7 @@ namespace TheMachine
button.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; button.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
button.ForeColor = color; button.ForeColor = color;
tableLayoutPanel1.Controls.Add(button, c, r); tableLayoutPanel1.Controls.Add(button, c, r);
} }
TextBox textBox = new TextBox(); TextBox textBox = new TextBox();
textBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); textBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
...@@ -139,9 +141,9 @@ namespace TheMachine ...@@ -139,9 +141,9 @@ namespace TheMachine
tableLayoutPanel1.Controls.Add(textBox, c + 1, r); tableLayoutPanel1.Controls.Add(textBox, c + 1, r);
textBox.Tag = prop.PropertyType.Name; textBox.Tag = prop.PropertyType.Name;
if (false) if (false)
{ {
...@@ -158,7 +160,8 @@ namespace TheMachine ...@@ -158,7 +160,8 @@ namespace TheMachine
textBox.Tag = "Int32"; textBox.Tag = "Int32";
} }
else { else
{
tableLayoutPanel1.SetColumnSpan(textBox, 2); tableLayoutPanel1.SetColumnSpan(textBox, 2);
} }
...@@ -169,7 +172,8 @@ namespace TheMachine ...@@ -169,7 +172,8 @@ namespace TheMachine
c += 3; c += 3;
} }
} }
if (r <= maxrow+1) { if (r <= maxrow + 1)
{
Label button1 = new Label(); Label button1 = new Label();
tableLayoutPanel1.Controls.Add(button1, c, r++); tableLayoutPanel1.Controls.Add(button1, c, r++);
} }
...@@ -192,7 +196,7 @@ namespace TheMachine ...@@ -192,7 +196,7 @@ namespace TheMachine
s.Text = lastvalue; s.Text = lastvalue;
//s.SelectionStart = lastselectindex; //s.SelectionStart = lastselectindex;
} }
} }
string lastvalue = ""; string lastvalue = "";
...@@ -215,7 +219,7 @@ namespace TheMachine ...@@ -215,7 +219,7 @@ namespace TheMachine
private void Button_Click(object sender, EventArgs e) private void Button_Click(object sender, EventArgs e)
{ {
var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false); var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false);
var speed = tableLayoutPanel1.Controls.Find(((Button)sender).Name+ "_speed", false); var speed = tableLayoutPanel1.Controls.Find(((Button)sender).Name + "_speed", false);
var axis = getConfigMoveAxis((int)((Button)sender).Tag); var axis = getConfigMoveAxis((int)((Button)sender).Tag);
ConfigMoveAxis configMoveAxis = axis.Config; ConfigMoveAxis configMoveAxis = axis.Config;
...@@ -227,7 +231,7 @@ namespace TheMachine ...@@ -227,7 +231,7 @@ namespace TheMachine
} }
var targetSpeed = configMoveAxis.TargetSpeed; var targetSpeed = configMoveAxis.TargetSpeed;
if (speed.Length>0) if (speed.Length > 0)
{ {
int.TryParse((speed[0] as TextBox).Text, out targetSpeed); int.TryParse((speed[0] as TextBox).Text, out targetSpeed);
} }
...@@ -263,7 +267,7 @@ namespace TheMachine ...@@ -263,7 +267,7 @@ namespace TheMachine
private void ConfigControl_Load(object sender, EventArgs e) private void ConfigControl_Load(object sender, EventArgs e)
{ {
OnlineStore.CodeResourceControl.LanguageChangeEvent += CodeResourceControl_LanguageChange; OnlineStore.CodeResourceControl.LanguageChangeEvent += CodeResourceControl_LanguageChange;
CodeResourceControl_LanguageChange(null,null); CodeResourceControl_LanguageChange(null, null);
} }
private void CodeResourceControl_LanguageChange(object sender, EventArgs e) private void CodeResourceControl_LanguageChange(object sender, EventArgs e)
...@@ -293,11 +297,24 @@ namespace TheMachine ...@@ -293,11 +297,24 @@ namespace TheMachine
pi.SetValue(_aCStorePosition, textBox.Text); pi.SetValue(_aCStorePosition, textBox.Text);
} }
} }
//库位高低点检查
if (_aCStorePosition.UpDownAxis_IHPosition_P3 < _aCStorePosition.UpDownAxis_ILPosition_P4)
{
MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n" + crc.GetString("UpDownAxis_IHPosition_P3", "升降轴库位入料高点P3") + $"[{_aCStorePosition.UpDownAxis_IHPosition_P3}]" + "<" + crc.GetString("UpDownAxis_ILPosition_P4", "升降轴库位入料低点P4") + $"[{_aCStorePosition.UpDownAxis_ILPosition_P4}]");
return;
}
int maxDiff = ConfigAppSettings.GetValue("UpDownAxis_Position_MaxRange", 30000, "库位高低点最大相差的值");
if ((_aCStorePosition.UpDownAxis_IHPosition_P3 - _aCStorePosition.UpDownAxis_ILPosition_P4) > maxDiff)
{
MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n("
+ crc.GetString("UpDownAxis_IHPosition_P3", "升降轴库位入料高点P3") + $"[{_aCStorePosition.UpDownAxis_IHPosition_P3}]"
+ "-" + crc.GetString("UpDownAxis_ILPosition_P4", "升降轴库位入料低点P4") + $"[{_aCStorePosition.UpDownAxis_ILPosition_P4}])>" + maxDiff);
return;
}
var positionConfigFile = Path.Combine(Application.StartupPath, "StoreConfig\\linePositions.csv"); var positionConfigFile = Path.Combine(Application.StartupPath, "StoreConfig\\linePositions.csv");
var positionConfigFile1 = Path.Combine(Application.StartupPath, "StoreConfig\\fixPositions.csv"); var positionConfigFile1 = Path.Combine(Application.StartupPath, "StoreConfig\\fixPositions.csv");
bool result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile, _aCStorePosition); bool result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile, _aCStorePosition);
result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile1, _aCStorePosition); result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile1, _aCStorePosition);
} }
......
...@@ -402,4 +402,5 @@ r_flipDoor_no_work 右侧翻板水平信号未亮 The right flap horizontal sign ...@@ -402,4 +402,5 @@ r_flipDoor_no_work 右侧翻板水平信号未亮 The right flap horizontal sign
reel_not_in_right_status 料盘放置异常 The reel is placed abnormally reel_not_in_right_status 料盘放置异常 The reel is placed abnormally
confirm_no_reel_in_com 请确保料盘已从库位中取出 Make sure that the reel has been removed from the location confirm_no_reel_in_com 请确保料盘已从库位中取出 Make sure that the reel has been removed from the location
outstore_abnormal_reel The material tray is not successfully put into the string, please check outstore_abnormal_reel The material tray is not successfully put into the string, please check
bacth_no_fix 料串未成功放入料叉上,请检查 The string was not successfully placed on the fork, please check
\ No newline at end of file \ No newline at end of file
bacth_no_fix 料串未成功放入料叉上,请检查 The string was not successfully placed on the fork, please check
not_allow 不允许 Not allowed
\ No newline at end of file \ No newline at end of file
...@@ -404,4 +404,5 @@ r_flipDoor_no_work 右侧翻板水平信号未亮 右フラップ水平信号が ...@@ -404,4 +404,5 @@ r_flipDoor_no_work 右侧翻板水平信号未亮 右フラップ水平信号が
reel_not_in_right_status 料盘放置异常 リールが異常に配置されている reel_not_in_right_status 料盘放置异常 リールが異常に配置されている
confirm_no_reel_in_com 请确保料盘已从库位中取出 リールがその場所から取り外されていることを確認してください confirm_no_reel_in_com 请确保料盘已从库位中取出 リールがその場所から取り外されていることを確認してください
outstore_abnormal_reel 倉庫を出るとき、材料トレイがひもにうまく入れられていません、確認してください outstore_abnormal_reel 倉庫を出るとき、材料トレイがひもにうまく入れられていません、確認してください
bacth_no_fix 料串未成功放入料叉上,请检查 文字列がフォークに正常に配置されませんでした。確認してください
\ No newline at end of file \ No newline at end of file
bacth_no_fix 料串未成功放入料叉上,请检查 文字列がフォークに正常に配置されませんでした。確認してください
not_allow 不允许 禁じられた
\ No newline at end of file \ No newline at end of file
...@@ -377,7 +377,7 @@ tray_detect_reel_01 料叉传感器X30感应到有料,请人工确认 料叉传 ...@@ -377,7 +377,7 @@ tray_detect_reel_01 料叉传感器X30感应到有料,请人工确认 料叉传
system_running_cantmove 系统正在运行,不能手动控制伺服 system_running_cantmove 系统正在运行,不能手动控制伺服
before_FrmPositionTool_stopmuchine 运行库位校准程序前,需要先停止料仓的运行 before_FrmPositionTool_stopmuchine 运行库位校准程序前,需要先停止料仓的运行
outstore_abnormal_reel 出库时料盘未成功放入料串,请检查 outstore_abnormal_reel 出库时料盘未成功放入料串,请检查
not_allow 禁止 禁止
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!