|
@@ -142,7 +142,7 @@ namespace SCADA_DAQ.Customer.Machines
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
- #region //定时上传未上传的产品数据
|
|
|
+ #region 定时上传未上传的产品数据
|
|
|
if (e.ChangeType == DateTimeChangeType.MinuteChanged && e.TimeFlag.Minute % 10 == 0 &&
|
|
|
CustomerEnv.MESServerConnectStatus && CustomerEnv.MESAPIToken != null && CustomerEnv.CustomerConfig.SetPower.MESUpload)
|
|
|
{
|
|
@@ -224,15 +224,14 @@ namespace SCADA_DAQ.Customer.Machines
|
|
|
|
|
|
private void Sr_BarCodeReceived(object sender, BarcodeReceivedEventArgs e)
|
|
|
{
|
|
|
+ PLCMachine = MachineServer.GetInstance().GetMachine<SampleMachine>("Device3");
|
|
|
if (e.Barcode.Length < 22)
|
|
|
{
|
|
|
- PLCMachine = MachineServer.GetInstance().GetMachine<SampleMachine>("Device3");
|
|
|
Barcode = e.Barcode; //NoRead,未拍到条码
|
|
|
PLCMachine?.GetListenReg("RedLight").WriteReg(1);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- PLCMachine = MachineServer.GetInstance().GetMachine<SampleMachine>("Device3");
|
|
|
Barcode = e.Barcode.Substring(e.Barcode.Length - 22, 22);
|
|
|
PLCMachine?.GetListenReg("YellowLight").WriteReg(1);
|
|
|
}
|
|
@@ -570,7 +569,7 @@ namespace SCADA_DAQ.Customer.Machines
|
|
|
{
|
|
|
int secondFFIndex = 0;
|
|
|
List<byte> dataByteList = null;
|
|
|
- try
|
|
|
+ try //有出现两段重复报文数据,提取第一段报文数据
|
|
|
{
|
|
|
for (int i = 0; i < data.Count; i++)
|
|
|
{
|
|
@@ -614,7 +613,7 @@ namespace SCADA_DAQ.Customer.Machines
|
|
|
model.DataDecode(data.ToArray(), i);
|
|
|
points.Add(model);
|
|
|
}
|
|
|
- if (points.Count <= 90 && CustomerEnv.CustomerConfig.SetPower.IsSimulationDta)
|
|
|
+ if (points.Count <= 90 && CustomerEnv.CustomerConfig.SetPower.IsSimulationDta) //当时长不够时进行模拟数据赋值
|
|
|
{
|
|
|
points = ProcessData.SimulationData();
|
|
|
}
|