完善端子扫码
This commit is contained in:
1 parent
1670395816
commit
bd70f38e1a
2 files changed
+39
-10
No files matched your search
@@ -271,17 +271,35 @@ namespace WindowsFormsApp1
|
|||||||
//扫码
|
//扫码
|
||||||
ScanForm_DZ scanForm = new ScanForm_DZ();
|
ScanForm_DZ scanForm = new ScanForm_DZ();
|
||||||
DialogResult scan_result = scanForm.ShowDialog();
|
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
|
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)
|
if (nowflow.finalpressurecurve)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -90,11 +90,22 @@ namespace WindowsFormsApp1
|
|||||||
端子1校验.Text = "校验OK";
|
端子1校验.Text = "校验OK";
|
||||||
}));
|
}));
|
||||||
//继续调用接口
|
//继续调用接口
|
||||||
|
var result2 = ApiClient.CallFunctionByName("nowinterface.code", null, new otherdata() { JS_SN = barcode });
|
||||||
this.Invoke(new Action(() =>
|
if (result2.Success)
|
||||||
{
|
{
|
||||||
button1.Visible = false;
|
this.Invoke(new Action(() =>
|
||||||
}));
|
{
|
||||||
|
端子1结果.Text = "绑定OK";
|
||||||
|
button1.Visible = false;
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.Invoke(new Action(() =>
|
||||||
|
{
|
||||||
|
端子1结果.Text = "绑定NG";
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user