Commit 9d5db606 LN

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

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