Commit 96048526 刘韬

1

1 个父辈 7ba7c534
......@@ -23,7 +23,7 @@ namespace DeviceLibrary
}
}
}
static AlarmBuzzerState State = AlarmBuzzerState.OFF;
volatile static AlarmBuzzerState State = AlarmBuzzerState.OFF;
public static event EventHandler<bool> BuzzerStateChange;
public static void SetOnOffAction(Action ona, Action offa)
{
......
......@@ -387,7 +387,7 @@ namespace DeviceLibrary
bool hasReel = calc <= threshold;
if (hasReel != lastHasReel) {
lastHasReel = hasReel;
}else
}else if (!ConfigHelper.Config.Get("CamTestReel_debug", false))
logtxt = "";
return hasReel;
}
......
using OnlineStore;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -224,7 +224,7 @@ namespace DeviceLibrary
//lineOperation.status = (int)StoreStatus.Warning;
}
else if (!RobotManage.isRunning){
sendmsg = "设备未启动";
sendmsg = crc.GetString("Res0001","设备未启动");
}
lineOperation.msg = sendmsg;
......@@ -706,4 +706,4 @@ namespace DeviceLibrary
InStoreError = 14,
}
}
}
\ No newline at end of file
......@@ -156,8 +156,8 @@ namespace DeviceLibrary
Reel = reel.clone();
LogUtil.info($"BSP:{posid},Comp_PH:{Comp_PH}={Config.Comp_P2}-({aCStorePosition.BagHigh}-{8}+{Config.Comp_PH_MM})*{Config.Clamp_PoToMM},Comp_PL:{Comp_PL}={reel.PlateH},Comp_PL_MM:{Config.Comp_PL_MM},{JsonHelper.SerializeObject(this)}");
}
public const string ngdoor = $"单料口";
public const string strings = $"料串口";
public const string ngdoor = "单料口";
public const string strings = "料串口";
public BoxStorePosition(Robot_Config Config, StoreSide storeSide, ReelParam reel)
{
......
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -18,12 +18,12 @@ namespace DeviceLibrary
errmsg = "";
if (!boxTransport.IsComplateOrFree)
{
errmsg = "料仓忙碌中,无法启动";
errmsg = crc.GetString("Res0002","料仓忙碌中,无法启动");
return false;
}
if(!IsInStoreReady)
{
errmsg = "入库料盘没有准备好,无法启动";
errmsg = crc.GetString("Res0003","入库料盘没有准备好,无法启动");
return false;
}
poslist =CSVPositionReader<ACStorePosition>.getPositionList();
......@@ -252,4 +252,4 @@ namespace DeviceLibrary
}
}
}
}
}
\ No newline at end of file
using OnlineStore;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
......@@ -301,7 +301,7 @@ namespace DeviceLibrary
}
else if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH)) {
Msg.add(crc.GetString(L.string_not_onposition, "回原时X09,X10信号异常,料串可能不在正确位置,请检查."), MsgLevel.alarm);//0429
RobotManage.UserPause("回原时X09,X10信号异常,料串可能不在正确位置,请检查");
RobotManage.UserPause($"回原时X09,X10信号异常,料串可能不在正确位置,请检查");
return;
}
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
......@@ -400,7 +400,7 @@ namespace DeviceLibrary
if (!NGDoor_Tray_Test_Reel)
{
Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X29未检测到单料口料盘."), MsgLevel.alarm);
RobotManage.UserPause("传感器X29未检测到单料口料盘.");
RobotManage.UserPause(crc.GetString("x29_low_no_reel","传感器X29未检测到单料口料盘."));
}
//CylinderMove(ResetMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
SingleDoor.ToHigh(ResetMoveInfo);
......@@ -413,10 +413,12 @@ namespace DeviceLibrary
{
//ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
//ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (ConfigHelper.Config.Get("Device_ManualCloseSingleDoor", false))
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
else
{
RobotManage.UserPause("系统启动X29检测到有无信息料盘,等待取走单料口料盘");
RobotManage.UserPause($"系统启动X29检测到有无信息料盘,等待取走单料口料盘");
}
}
else {
......@@ -619,4 +621,4 @@ namespace DeviceLibrary
LogUtil.info("按下X09忽略");
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -250,7 +250,7 @@ namespace DeviceLibrary
{
Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X29未检测到单料口料盘."), MsgLevel.alarm);
Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning);
RobotManage.UserPause("传感器X29未检测到单料口料盘");
RobotManage.UserPause(crc.GetString("Res0005","传感器X29未检测到单料口料盘"));
}
SingleDoor.ToHigh(ClampMoveInfo);
break;
......@@ -258,16 +258,18 @@ namespace DeviceLibrary
Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning);
if (!ConfigHelper.Config.Get("CamTestReel_Ability", false) || NGDoor_Tray_Test_Reel)
{
Msg.add(crc.GetString(L.please_take_ngdoor_reel, "等待取走单口料盘"), MsgLevel.alarm);
Msg.add(crc.GetString(L.please_take_ngdoor_reel, "等待取走单口料盘"), MsgLevel.alarm);
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
{
//ClampMoveInfo.LastSetpTime = DateTime.Now;
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (ConfigHelper.Config.Get("Device_ManualCloseSingleDoor", false))
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
else {
if (!ConfigHelper.Config.Get("CamTestReel_Ability", false))
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_04);
RobotManage.UserPause("等待取走单口料盘");
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel","等待取走单口料盘"));
}
}
else
......@@ -433,4 +435,4 @@ namespace DeviceLibrary
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -13,8 +13,8 @@ namespace DeviceLibrary
{
partial class MainMachine
{
StoreJobList OutStoreJobList = new StoreJobList("批量");
StoreJobList OutSingleJobList = new StoreJobList("单盘");
StoreJobList OutStoreJobList = new StoreJobList($"批量");
StoreJobList OutSingleJobList = new StoreJobList($"单盘");
public void AddOutStoreTask(string posId,int plateW,int plateH) {
JobInfo jobInfo = new JobInfo("", posId,plateW,plateH);
......@@ -36,19 +36,19 @@ namespace DeviceLibrary
{
case 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.tray_detect_reel_01, "料叉传感器X30感应到有料,请人工确认");
StoreMoveInfo.log($"开始无信息料盘出库");
ServerCM.storeStatus = StoreStatus.OutStoreExecute;
CloseFlipDoor(StoreMoveInfo);
}
//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.tray_detect_reel_01, "料叉传感器X30感应到有料,请人工确认");
// StoreMoveInfo.log($"开始无信息料盘出库");
// ServerCM.storeStatus = StoreStatus.OutStoreExecute;
// CloseFlipDoor(StoreMoveInfo);
//}
//判断有没有料盘等待入库
else if (IsWaitInStore)
if (IsWaitInStore)
{
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01);
StoreMoveInfo.MoveParam = ClampMoveInfo.MoveParam.clone();
......@@ -57,6 +57,21 @@ namespace DeviceLibrary
//判断有没有单盘出库任务, 需要入库空闲, 出口空闲
else if (OutSingleJobList.Count > 0 && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait)
{
if (!boxTransport.IgnoreX09 && IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 1000))
{
Msg.add(crc.GetString("Res0004","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("收到出库任务,但料叉上有料,无法启动,请检查");
}
else
Msg.add(crc.GetString("Res0004","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.warning);
return;
}
else
boxTransport.IgnoreX09 = false;
if (OutSingleJobList.Dequeue(out JobInfo jobInfo))
{
StoreMoveInfo.NewMove(MoveStep.StoreOut10);
......@@ -73,6 +88,20 @@ namespace DeviceLibrary
//判断有没有出库任务, 需要入库空闲, 出口空闲
else if (OutStoreJobList.Count>0 && boxTransport.IsComplateOrFree)
{
if (!boxTransport.IgnoreX09 && IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 1000))
{
Msg.add(crc.GetString("Res0004","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("收到出库任务,但料叉上有料,无法启动,请检查");
}
else
Msg.add(crc.GetString("Res0004","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.warning);
return;
}
else
boxTransport.IgnoreX09 = false;
TurnToOut();
if (IsPutReelReady && OutStoreJobList.Dequeue(out JobInfo jobInfo))
{
......@@ -88,7 +117,7 @@ namespace DeviceLibrary
case MoveStep.StoreIn01:
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreExecute))
{
Msg.add("服务器连接异常",MsgLevel.warning);
Msg.add(crc.GetString("Res0008","服务器连接异常"),MsgLevel.warning);
return;
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn03);
......@@ -115,7 +144,7 @@ namespace DeviceLibrary
{
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd))
{
Msg.add("服务器连接异常", MsgLevel.warning);
Msg.add(crc.GetString("Res0008","服务器连接异常"), MsgLevel.warning);
return;
}
StoreMoveInfo.log($"料盘已到达目的地");
......@@ -129,7 +158,7 @@ namespace DeviceLibrary
case MoveStep.StoreOut10:
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreExecute))
{
Msg.add("服务器连接异常", MsgLevel.warning);
Msg.add(crc.GetString("Res0008","服务器连接异常"), MsgLevel.warning);
return;
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut11);
......@@ -148,7 +177,7 @@ namespace DeviceLibrary
{
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreBoxEnd))
{
Msg.add("服务器连接异常", MsgLevel.warning);
Msg.add(crc.GetString("Res0008","服务器连接异常"), MsgLevel.warning);
return;
}
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut12);
......@@ -164,7 +193,7 @@ namespace DeviceLibrary
{
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreEnd))
{
Msg.add("服务器连接异常", MsgLevel.warning);
Msg.add(crc.GetString("Res0008","服务器连接异常"), MsgLevel.warning);
return;
}
StoreMoveInfo.log($"料盘已到达目的地");
......@@ -202,4 +231,4 @@ namespace DeviceLibrary
return state;
}
}
}
}
\ No newline at end of file
using CodeLibrary;
using CodeLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
......@@ -147,7 +147,7 @@ namespace DeviceLibrary
StringMoveInfo.log($"批量轴到顶部检测点");
//CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
BatchAxisToP2(StringMoveInfo);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("料串正在上升", MsgLevel.warning));
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0009","料串正在上升"), MsgLevel.warning));
}
else if (StringMoveInfo.IsTimeOut(10))
{
......@@ -183,8 +183,8 @@ namespace DeviceLibrary
break;
case MoveStep.StringLoad_04a:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04b);
StringMoveInfo.log($"料串下降到x13信号灭");
BatchAxisToTagLow(StringMoveInfo);
//StringMoveInfo.log($"料串下降到x13信号灭");
//BatchAxisToTagLow(StringMoveInfo);
break;
case MoveStep.StringLoad_04b:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_05);
......@@ -217,7 +217,7 @@ namespace DeviceLibrary
{
StringMoveInfo.NextMoveStep(MoveStep.StringReadyGet);
StringMoveInfo.log($"料串有盘上升5mm");
var tpos3 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * Config.Batch_DetectDownMM;
var tpos3 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM+0);
Batch_Axis.AbsMove(StringMoveInfo, tpos3, Config.Batch_P1);
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
//OpenFlipDoor(StringMoveInfo);
......@@ -314,7 +314,7 @@ namespace DeviceLibrary
StringMoveInfo.log($"料串下降到P1点");
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.LOW);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("料串正在下降", MsgLevel.warning));
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0010","料串正在下降"), MsgLevel.warning));
break;
case MoveStep.StringOut_02:
StringMoveInfo.NextMoveStep(MoveStep.StringOut_03);
......@@ -512,4 +512,4 @@ namespace DeviceLibrary
return LastHeight;
}
}
}
}
\ No newline at end of file
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
......@@ -78,7 +78,7 @@ namespace DeviceLibrary
{
if (axis == null)
{
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(crc.GetString("Res0011","请先选择运动轴"), crc.GetString("Res0012","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
......@@ -291,7 +291,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("title","提示"), crc.GetString("Res0013","请先输入正确的速度"));
return;
}
btnAddMove.BackColor = Color.Green;
......@@ -320,7 +320,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("title","提示"), crc.GetString("Res0013","请先输入正确的速度"));
return;
}
btnDelMove.BackColor = Color.Green;
......@@ -424,7 +424,7 @@ namespace DeviceLibrary
lbl.BackColor = Color.Red ;
lblAlarmcode.Visible = true;
lblAlarmcode.ForeColor = Color.Red;
lblAlarmcode.Text = "错误码:" + HCBoardManager.GetAxErrCode(SlvAddr);
lblAlarmcode.Text = crc.GetString("Res0014","错误码:") + HCBoardManager.GetAxErrCode(SlvAddr);
}
else
{
......@@ -445,4 +445,4 @@ namespace DeviceLibrary
}
}
}
}
}
\ No newline at end of file
using DeviceLibrary;
using DeviceLibrary;
using HuichuanLibrary;
using OnlineStore;
using OnlineStore.Common;
......@@ -75,11 +75,11 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能",c);
showToolTip(crc.GetString("Res0015","伺服尚未使能"),c);
return;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) {
showToolTip("伺服警报状态中",c);
showToolTip(crc.GetString("Res0016","伺服警报状态中"),c);
return;
}
readPosition();
......@@ -137,7 +137,7 @@ public partial class AxisTipControl : Form
void showToolTip(string txt,Control control) {
var m_ToolTip = new ToolTip();
m_ToolTip.ToolTipIcon = ToolTipIcon.Warning;
m_ToolTip.ToolTipTitle = "无法操作";
m_ToolTip.ToolTipTitle = crc.GetString("Res0017","无法操作");
m_ToolTip.AutoPopDelay = 0;
m_ToolTip.AutomaticDelay = 0;
m_ToolTip.InitialDelay = 0;
......@@ -167,7 +167,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("title","提示"), crc.GetString("Res0013","请先输入正确的速度"));
return;
}
btnAddMove.BackColor = Color.Green;
......@@ -200,7 +200,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0)
{
MessageBox.Show("提示", "请先输入正确的速度");
MessageBox.Show(crc.GetString("title","提示"), crc.GetString("Res0013","请先输入正确的速度"));
return;
}
btnDelMove.BackColor = Color.Green;
......@@ -222,12 +222,12 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0)
{
showToolTip("伺服尚未使能", (Control)sender);
showToolTip(crc.GetString("Res0015","伺服尚未使能"), (Control)sender);
return false;
}
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0)
{
showToolTip("伺服警报状态中", (Control)sender);
showToolTip(crc.GetString("Res0016","伺服警报状态中"), (Control)sender);
return false;
}
return true;
......@@ -257,4 +257,3 @@ public partial class AxisTipControl : Form
SetRelList((int)comjSpeed.SelectedItem);
}
}
......@@ -90,10 +90,10 @@ namespace TheMachine
emptycol.Text = "";
emptycol.Width = 0;
ColumnHeader msgcol = new ColumnHeader();
msgcol.Text = "信息";
msgcol.Text = $"信息";
msgcol.Width = 530;
ColumnHeader timecol = new ColumnHeader();
timecol.Text = "时间";
timecol.Text = $"时间";
timecol.Width = 150;
listView1.Columns.Add(emptycol);
listView1.Columns.Add(timecol);
......@@ -107,13 +107,13 @@ namespace TheMachine
c1.Text = "";
c1.Width = 0;
ColumnHeader c2 = new ColumnHeader();
c2.Text = "模块";
c2.Text = $"模块";
c2.Width = 120;
ColumnHeader c3 = new ColumnHeader();
c3.Text = "步骤";
c3.Text = $"步骤";
c3.Width = 120;
ColumnHeader c4 = new ColumnHeader();
c4.Text = "信息";
c4.Text = $"信息";
c4.Width = 370;
stateView.Columns.Add(c1);
......@@ -501,6 +501,7 @@ namespace TheMachine
private void btn_PauseBuzzer_Click(object sender, EventArgs e)
{
LogUtil.info("用户点击 本次关闭蜂鸣器");
AlarmBuzzer.MuteOnce();
}
......
......@@ -226,6 +226,12 @@ namespace TheMachine
return;
}
var targetSpeed = configMoveAxis.TargetSpeed;
if (speed.Length>0)
{
int.TryParse((speed[0] as TextBox).Text, out targetSpeed);
}
var AddSpeed = configMoveAxis.AddSpeed > 0 ? configMoveAxis.AddSpeed : targetSpeed * 4;
var DelSpeed = configMoveAxis.DelSpeed > 0 ? configMoveAxis.DelSpeed : targetSpeed * 4;
AxisManager.AbsMove("", configMoveAxis.GetAxisValue(), int.Parse(cc[1].Text), targetSpeed, AddSpeed, DelSpeed);//, configMoveAxis.AddSpeed, configMoveAxis.DelSpeed);
......@@ -267,9 +273,33 @@ namespace TheMachine
private void btnSavePos_Click(object sender, EventArgs e)
{
for (int i = 0; i < tableLayoutPanel1.Controls.Count; i++)
{
if (tableLayoutPanel1.Controls[i].GetType().Name != "TextBox")
continue;
TextBox textBox = (TextBox)tableLayoutPanel1.Controls[i];
PropertyInfo pi = _aCStorePosition.GetType().GetProperty(textBox.Name);
if (pi != null)
{
//var cc = Config.configList.Find(new Predicate<ConfigBase>((c) => { return c.ProName == textBox.Name; }));
//if (cc != null)
// cc.ProValue = textBox.Text;
if (pi.PropertyType.Name == "Int32")
pi.SetValue(_aCStorePosition, int.Parse(textBox.Text));
else if (pi.PropertyType.Name == "Double")
pi.SetValue(_aCStorePosition, double.Parse(textBox.Text));
else
pi.SetValue(_aCStorePosition, textBox.Text);
}
}
var positionConfigFile = Path.Combine(Application.StartupPath, "StoreConfig\\linePositions.csv");
var positionConfigFile1 = Path.Combine(Application.StartupPath, "StoreConfig\\fixPositions.csv");
bool result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile, _aCStorePosition);
result = CSVPositionReader<ACStorePosition>.SavePostion(positionConfigFile1, _aCStorePosition);
}
}
}
......@@ -174,7 +174,7 @@ namespace TheMachine
//
this.cb_fixpos.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_fixpos.FormattingEnabled = true;
this.cb_fixpos.Location = new System.Drawing.Point(266, 489);
this.cb_fixpos.Location = new System.Drawing.Point(276, 489);
this.cb_fixpos.Name = "cb_fixpos";
this.cb_fixpos.Size = new System.Drawing.Size(121, 20);
this.cb_fixpos.TabIndex = 226;
......
using DeviceLibrary;
using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common;
using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary;
......@@ -19,7 +20,7 @@ namespace OnlineStore.ACSingleStore
{
public partial class FrmPositionTool : Form
{
private string LogName = "升降轴位置调试:";
private string LogName = crc.GetString("Res0020","升降轴位置调试:");
AxisBean UpDown_Axis;
string iotype="";
......@@ -148,7 +149,7 @@ namespace OnlineStore.ACSingleStore
if (speed <= (0))
{
MessageBox.Show("请输入正确的速度");
MessageBox.Show(crc.GetString("Res0021","请输入正确的速度"));
txtSpeed.Focus();
return;
}
......@@ -261,7 +262,7 @@ namespace OnlineStore.ACSingleStore
}
LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据");
List<string> strList = new List<string>();
strList.Add("编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4");
strList.Add($"编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4");
int index = 1;
foreach (int p in PositionList)
{
......@@ -329,4 +330,4 @@ namespace OnlineStore.ACSingleStore
}
}
}
\ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!