3.25 测试
改端子扫码,产线页面,主页
This commit is contained in:
1 parent
bd70f38e1a
commit
083c4ec3ac
16 files changed
+1016
-877
No files matched your search
@@ -42,16 +42,16 @@ namespace WindowsFormsApp1
|
||||
FormRecover();
|
||||
|
||||
linename.Text = Init.t_Line.linename;
|
||||
linecode.Text = Init.t_Line.linecode;
|
||||
linetype.Text = Init.t_Line.linetype;
|
||||
linemode.Text = Init.t_Line.linemode;
|
||||
lineremark1.Text = Init.t_Line.lineremark1;
|
||||
lineremark2.Text = Init.t_Line.lineremark2;
|
||||
lineremark3.Text = Init.t_Line.lineremark3;
|
||||
lineremark4.Text = Init.t_Line.lineremark4;
|
||||
lineremark5.Text = Init.t_Line.lineremark5;
|
||||
lineremark6.Text = Init.t_Line.lineremark6;
|
||||
lineremark7.Text = Init.t_Line.lineremark7;
|
||||
linecode.Text = Init.t_Line.lineremark1;
|
||||
linetype.Text = Init.t_Line.lineremark2;
|
||||
linemode.Text = Init.t_Line.lineremark3;
|
||||
//lineremark1.Text = "";
|
||||
//lineremark2.Text = "";
|
||||
//lineremark3.Text = "";
|
||||
//lineremark4.Text = "";
|
||||
//lineremark5.Text = "";
|
||||
//lineremark6.Text = "";
|
||||
//lineremark7.Text = "";
|
||||
|
||||
操作人员ID.Text = Init.t_User.username;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
DateTime oldPlcstatus_LastTime = Init.Plcstatus_LastTime;
|
||||
//状态+报警
|
||||
if (oldstatus != PlcData.Read_Status || (Plc_Time - oldPlcstatus_LastTime).TotalSeconds > 5)
|
||||
if (oldstatus != PlcData.Read_Status || (Plc_Time - oldPlcstatus_LastTime).TotalSeconds >= 15)
|
||||
{
|
||||
//反馈状态
|
||||
Init.Plcstatus = PlcData.Read_Status;
|
||||
@@ -271,6 +271,7 @@ namespace WindowsFormsApp1
|
||||
//扫码
|
||||
ScanForm_DZ scanForm = new ScanForm_DZ();
|
||||
DialogResult scan_result = scanForm.ShowDialog();
|
||||
ChangeBarcode();
|
||||
|
||||
var writeresult = siemensHelp.WriteAddress(plcaddress, PlcData);
|
||||
if (!writeresult.Success)
|
||||
@@ -379,6 +380,9 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeBarcode();
|
||||
MES_MsgfORM(nowinterface.code, result.Mesresult, result.Requesttime);
|
||||
|
||||
MES链接状态.Text = "MES链接状态:OK";
|
||||
MES链接状态.BackColor = SystemColors.Control;
|
||||
MES通讯时间.Text = "MES通讯时间:" + DateTime.Now.ToString("MM-dd HH:mm:ss");
|
||||
@@ -770,57 +774,21 @@ namespace WindowsFormsApp1
|
||||
底部注释5.Visible = false;
|
||||
|
||||
剩余寿命.Visible = false;
|
||||
barcode1.Visible = false;
|
||||
barcode2.Visible = false;
|
||||
barcode3.Visible = false;
|
||||
barcode4.Visible = false;
|
||||
barcode5.Visible = false;
|
||||
barcode6.Visible = false;
|
||||
barcode7.Visible = false;
|
||||
barcode8.Visible = false;
|
||||
barcode9.Visible = false;
|
||||
|
||||
}
|
||||
|
||||
public void ChangeBarcode()
|
||||
{
|
||||
剩余寿命.Visible = true;
|
||||
barcode1.Visible = true;
|
||||
barcode2.Visible = true;
|
||||
barcode3.Visible = true;
|
||||
barcode4.Visible = true;
|
||||
barcode5.Visible = true;
|
||||
barcode6.Visible = true;
|
||||
barcode7.Visible = true;
|
||||
barcode8.Visible = true;
|
||||
barcode9.Visible = true;
|
||||
|
||||
var power = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Power");
|
||||
var i_barcode1 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode1");
|
||||
var i_barcode2 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode2");
|
||||
var i_barcode3 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode3");
|
||||
var i_barcode4 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode4");
|
||||
var i_barcode5 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode5");
|
||||
var i_barcode6 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode6");
|
||||
var i_barcode7 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode7");
|
||||
var i_barcode8 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode8");
|
||||
var i_barcode9 = Init.t_Keyvalues.FirstOrDefault(a => a.key == "Barcode9");
|
||||
|
||||
|
||||
剩余寿命.Text = power == null ? "": power.value;
|
||||
barcode1.Text = i_barcode1 == null ? "":i_barcode1.value;
|
||||
barcode2.Text = i_barcode2 == null ? "":i_barcode2.value;
|
||||
barcode3.Text = i_barcode3 == null ? "":i_barcode3.value;
|
||||
barcode4.Text = i_barcode4 == null ? "":i_barcode4.value;
|
||||
barcode5.Text = i_barcode5 == null ? "":i_barcode5.value;
|
||||
barcode6.Text = i_barcode6 == null ? "":i_barcode6.value;
|
||||
barcode7.Text = i_barcode7 == null ? "":i_barcode7.value;
|
||||
barcode8.Text = i_barcode8 == null ? "":i_barcode8.value;
|
||||
barcode9.Text = i_barcode9 == null ? "":i_barcode9.value;
|
||||
}
|
||||
|
||||
public void PLC_Form(t_plc plc, plcstate state, DateTime time)
|
||||
{
|
||||
string plcname = plc.plcname + ":" + plc.plcip;
|
||||
string plcname = plc.plcip;
|
||||
string datetime = time.ToString("HH:mm:ss");
|
||||
PLC1名称.Visible = true;
|
||||
PLC1状态.Visible = true;
|
||||
@@ -963,6 +931,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
ScanForm_SSQ scanForm = new ScanForm_SSQ();
|
||||
DialogResult result = scanForm.ShowDialog();
|
||||
// 写plc
|
||||
}
|
||||
public void AirtightPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user