Commit 9d5db606 LN

检测到信号2000后再停止线体

1 个父辈 fd5f97ce
...@@ -245,10 +245,11 @@ namespace TSA_V.Common ...@@ -245,10 +245,11 @@ namespace TSA_V.Common
public static void UpdateAppSetting(string key, string value) public static void UpdateAppSetting(string key, string value)
{ {
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); SaveValue(key, value);
configuration.AppSettings.Settings[key].Value = value; //Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
configuration.Save(ConfigurationSaveMode.Modified); //configuration.AppSettings.Settings[key].Value = value;
ConfigurationManager.RefreshSection("appSettings"); //configuration.Save(ConfigurationSaveMode.Modified);
//ConfigurationManager.RefreshSection("appSettings");
} }
} }
} }
...@@ -26,7 +26,7 @@ namespace TSA_V.DeviceLibrary ...@@ -26,7 +26,7 @@ namespace TSA_V.DeviceLibrary
public static bool DisableSideCylinder = false; public static bool DisableSideCylinder = false;
public static bool DisableBottomCylinder = false; public static bool DisableBottomCylinder = false;
public static ServerCommunication serverCommunication = null; public static ServerCommunication serverCommunication = null;
private static string warnMsg = ""; private static string warnMsg = "";
public static string WarnMsg public static string WarnMsg
{ {
get { return warnMsg; } get { return warnMsg; }
......
...@@ -249,8 +249,8 @@ namespace TSA_V.DeviceLibrary ...@@ -249,8 +249,8 @@ namespace TSA_V.DeviceLibrary
else if (LineStep.IsStep(StepEnum.LS02_LineMove)) else if (LineStep.IsStep(StepEnum.LS02_LineMove))
{ {
LineStep.NextStep(StepEnum.LS03_WaitBoard); LineStep.NextStep(StepEnum.LS03_WaitBoard);
LineLog("流水线转动:检测到组装工位信号,再转动1000停止"); LineLog("流水线转动:检测到组装工位信号,再转动2000停止");
LineStep.WaitList.Add(WaitResultInfo.WaitTime(1000)); LineStep.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
else if (LineStep.IsStep(StepEnum.LS03_WaitBoard)) else if (LineStep.IsStep(StepEnum.LS03_WaitBoard))
{ {
......
...@@ -39,6 +39,7 @@ namespace TSA_V.DeviceLibrary ...@@ -39,6 +39,7 @@ namespace TSA_V.DeviceLibrary
public DateTime beginWorkTime = DateTime.Now; public DateTime beginWorkTime = DateTime.Now;
public bool IsShowAOI = false; public bool IsShowAOI = false;
private List<ComponetInfo> useComponets = new List<ComponetInfo>(); private List<ComponetInfo> useComponets = new List<ComponetInfo>();
public static bool isContinue = false;
public void StartWork(BoardInfo boardInfo) public void StartWork(BoardInfo boardInfo)
{ {
//StatusClient.instance.SendNew(Color.Green, "扫码成功:" + BoardManager.CurrBoard.boardCode); //StatusClient.instance.SendNew(Color.Green, "扫码成功:" + BoardManager.CurrBoard.boardCode);
...@@ -47,7 +48,13 @@ namespace TSA_V.DeviceLibrary ...@@ -47,7 +48,13 @@ namespace TSA_V.DeviceLibrary
LogUtil.info("开始程序【" + boardInfo.boardName + "】的插件"); LogUtil.info("开始程序【" + boardInfo.boardName + "】的插件");
currBoard = boardInfo; currBoard = boardInfo;
needWorkSmtList = currBoard.GetSmtList(); needWorkSmtList = currBoard.GetSmtList();
currIndex = -1; currIndex = -1;
if (isContinue)
{
LogUtil.info("开始程序【" + boardInfo.boardName + "】的插件 , 继续之前的工作,索引号="+currIndex);
currIndex = ConfigAppSettings.GetIntValue(Setting_Init.TagNumber);
isContinue = false;
}
IsShowAOI = false; IsShowAOI = false;
currPoint = null; currPoint = null;
IsWorking = true; IsWorking = true;
......
...@@ -124,9 +124,6 @@ ...@@ -124,9 +124,6 @@
<add key="DisableBottomCylinder" value="1" /> <add key="DisableBottomCylinder" value="1" />
<add key="SMF_Serverurl" value ="http://localhost:8800/"/> <add key="SMF_Serverurl" value ="http://localhost:8800/"/>
<add key="SMF_CID" value ="NEOSTATION001"/> <add key="SMF_CID" value ="NEOSTATION001"/>
<!--记录程序运行步骤-->
<add key="ProcedureName" value="12343" />
<add key="TagNumber" value ="3"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="defaultAppender" type="log4net.Appender.RollingFileAppender"> <appender name="defaultAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -2584,4 +2584,7 @@ ...@@ -2584,4 +2584,7 @@
<data name="ComInsufficient" xml:space="preserve"> <data name="ComInsufficient" xml:space="preserve">
<value>Insufficient component inventory</value> <value>Insufficient component inventory</value>
</data> </data>
<data name="iscontinue" xml:space="preserve">
<value>There is an open program '{0}', whether to continue or not?</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2580,4 +2580,7 @@ ...@@ -2580,4 +2580,7 @@
<data name="NoAirAlarm" xml:space="preserve"> <data name="NoAirAlarm" xml:space="preserve">
<value>未检测到气压信号</value> <value>未检测到气压信号</value>
</data> </data>
<data name="iscontinue" xml:space="preserve">
<value>有未结束的程序'{0}',是否继续?</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -2580,4 +2580,7 @@ ...@@ -2580,4 +2580,7 @@
<data name="NoAirAlarm" xml:space="preserve"> <data name="NoAirAlarm" xml:space="preserve">
<value>未检测到气压信号</value> <value>未检测到气压信号</value>
</data> </data>
<data name="iscontinue" xml:space="preserve">
<value>有未结束的程序'{0}',是否继续?</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -386,17 +386,17 @@ namespace TSA_V ...@@ -386,17 +386,17 @@ namespace TSA_V
string TagNumber = ConfigAppSettings.GetValue(Setting_Init.TagNumber); string TagNumber = ConfigAppSettings.GetValue(Setting_Init.TagNumber);
if (!string.IsNullOrEmpty(ProcedureName)&&!string.IsNullOrEmpty(TagNumber)) if (!string.IsNullOrEmpty(ProcedureName)&&!string.IsNullOrEmpty(TagNumber))
{ {
DialogResult dr = MessageBox.Show($"有未结束的程序'{ProcedureName}',是否继续?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); BoardInfo board = BoardManager.getBoardByName(ProcedureName);
if (dr == DialogResult.OK) if (board == null)
{ {
cmbBoardList.Text = ProcedureName; return;
BoardInfo board = (BoardInfo)cmbBoardList.SelectedItem; }
if (string.IsNullOrEmpty(board.boardName)) string msg = ResourceCulture.GetString("iscontinue", "有未结束的程序'{0}',是否继续?", new string[] { ProductName });
{ DialogResult dr = MessageBox.Show(msg, ResourceCulture.GetString("提示"), MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
MessageBox.Show($"未找到当前板子信息{ProcedureName},请检查!"); if (dr == DialogResult.OK)
return; {
}
BoardManager.CurrBoard = board; BoardManager.CurrBoard = board;
LogUtil.info($"继续之前的工作: {ProcedureName} ,索引{TagNumber}");
FrmWork fw = new FrmWork(true); FrmWork fw = new FrmWork(true);
this.Hide(); this.Hide();
this.Close(); this.Close();
......
...@@ -29,6 +29,7 @@ namespace TSA_V ...@@ -29,6 +29,7 @@ namespace TSA_V
{ {
InitializeComponent(); InitializeComponent();
isContinue= iscontinue; isContinue= iscontinue;
WorkInfo.isContinue = iscontinue;
} }
private bool isInitOk = false; private bool isInitOk = false;
...@@ -582,7 +583,7 @@ namespace TSA_V ...@@ -582,7 +583,7 @@ namespace TSA_V
} }
if (!smtPoint.PN.Equals("")) if (!smtPoint.PN.Equals(""))
{ {
lblPositionNum.Text = smtPoint.PositionNum; lblPositionNum.Text = smtPoint.PositionNum;
lblPartNum.Text = smtPoint.TagNo; lblPartNum.Text = smtPoint.TagNo;
lblPointName.Text = smtPoint.PN; lblPointName.Text = smtPoint.PN;
#region 2023-10-31修改 #region 2023-10-31修改
...@@ -593,6 +594,7 @@ namespace TSA_V ...@@ -593,6 +594,7 @@ namespace TSA_V
if (position != null) if (position != null)
{ {
lblPositionNum.Text = position.PositionNum; lblPositionNum.Text = position.PositionNum;
smtPoint.PositionNum = position.PositionNum;
} }
lblComDes.Text = com.ComponentDes; lblComDes.Text = com.ComponentDes;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!