完善端子扫码

This commit is contained in:
bnala committed 2025-03-25 00:01:26 +08:00
1 parent 1670395816
commit bd70f38e1a
2 files changed
+39 -10

No files matched your search

+24 -6
View File
@@ -271,17 +271,35 @@ namespace WindowsFormsApp1
//扫码
ScanForm_DZ scanForm = new ScanForm_DZ();
DialogResult scan_result = scanForm.ShowDialog();
if (scan_result == DialogResult.OK)
{
string returnValue = scanForm.ReturnValue;
otherdata.JS_SN = returnValue;
Init.ScanString = returnValue;
var writeresult = siemensHelp.WriteAddress(plcaddress, PlcData);
if (!writeresult.Success)
{
//PLC链接状态.Text = "PLC链接状态:NG";
//PLC链接状态.BackColor = Color.Red;
PLC_Form(Plc, plcstate.NG, DateTime.Now);
LogExecute.logNet.WriteError($"{Plc.plcip}写入地址处理错误:处理停止");
continue;
}
else
{
continue;
MES链接状态.Text = "MES链接状态:OK";
MES链接状态.BackColor = SystemColors.Control;
MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss");
}
continue;
//if (scan_result == DialogResult.OK)
//{
// string returnValue = scanForm.ReturnValue;
// otherdata.JS_SN = returnValue;
// Init.ScanString = returnValue;
//}
//else
//{
// continue;
//}
}
if (nowflow.finalpressurecurve)
{