Compare commits

...
10 Commits
Author SHA1 Message Date
Administrator 1e05b34f00 更换通讯库版本 2026-09-08 14:11:48 +08:00
liming 蔡 6e3ed63886 增加报警信息代码 2026-09-08 08:54:09 +08:00
liming 蔡 8b7829bc1b 能耗定时上传 2026-08-26 16:43:53 +08:00
Administrator c06bb2704e 地址修改 2026-08-17 13:05:18 +08:00
liming 蔡 508647ecca 增加PLC数据的日志记录 2026-08-14 19:28:16 +08:00
liming 蔡 a17a969f25 出站的qualityStatus只有OK/NG 2026-08-14 16:46:55 +08:00
liming 蔡 9550c5572b 修改下料读取PLC长度为700 2026-08-14 14:15:17 +08:00
liming 蔡 c89efa6461 采集项更改 2026-08-14 13:38:34 +08:00
liming 蔡 8e9656a2b5 查询增加字段 2026-08-14 10:01:37 +08:00
liming 蔡 cd841a6aba 界面增加列 2026-08-13 20:18:11 +08:00
33 changed files with 3176 additions and 520 deletions
+12
View File
@@ -49,3 +49,15 @@ bld/
/JY.DAL/obj/Release/JY.DAL.csproj.AssemblyReference.cache
/JY.Inspection/obj/Debug/JY.Inspection.csproj.AssemblyReference.cache
/JY.Inspection/.vs/JY.Inspection.csproj.dtbcache.json
/1440MES采集项PLC地址.xlsx
/1440外观检测机上位机与PLC通讯协议2026-3-30.xlsx
/17J 数采对接文档.xlsx
/17J化成包装接口文档.xlsx
/JY.Control/.vs
/JY.DAL/.vs
/JY.MES/.vs
/JY.Utility/.vs
/PLCCommunication/.vs
/SimpleServer/.vs
/SocketHelper/.vs
/JY.Model/.vs/JY.Model.csproj.dtbcache.json
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JY.Inspection
namespace JY.DAL
{
public class ConstValue
{
@@ -60,5 +60,48 @@ namespace JY.Inspection
{ "CCDI5", "左面凹坑数量" },
{ "CCDI6", "右面凹坑数量" }
};
/// <summary>
/// 报警地址信息: 起始地址-长度(分组数,每个分组10个寄存器)
/// </summary>
public static readonly Dictionary<int, ushort> AlarmAddressDic = new Dictionary<int, ushort>()
{
{ 10010, 15 }
};
// 展开后的平铺映射表:Key为连续的位索引(0, 1, 2...),Value为实际的物理地址
public static readonly Dictionary<int, int> FlatAddressMap = new Dictionary<int, int>();
/// <summary>
/// 根据数组索引获取对应的物理地址
/// </summary>
public static int GetAddressByIndex(int index)
{
if (FlatAddressMap.TryGetValue(index, out int address))
{
return address;
}
throw new IndexOutOfRangeException($"索引 {index} 超出了地址字典的映射范围。");
}
static ConstValue()
{
FlatAddressMap = new Dictionary<int, int>();
int bitIndex = 0;
// 按起始地址排序,确保映射顺序正确
foreach (var kvp in AlarmAddressDic.OrderBy(x => x.Key))
{
int startAddress = kvp.Key;
ushort length = kvp.Value;
// 将当前段的每一位索引映射到具体的物理地址
for (int i = 0; i < length; i++)
{
FlatAddressMap[bitIndex] = startAddress + i;
bitIndex++;
}
}
}
}
}
+1
View File
@@ -154,6 +154,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ConstValue.cs" />
<Compile Include="IDbHelper.cs" />
<Compile Include="IocConfig.cs" />
<Compile Include="Service\BlankingDataService.cs" />
+25 -21
View File
@@ -376,34 +376,38 @@ namespace JY.DAL
}
break;
case 1:
strSql = @" SELECT [ID] ID
string preSql = @" SELECT [ID] ID
,[TD] 序号
,[WorkShift] 班次
,[TDGroup] 主道
,[ArrivalBarCode] 入站条码
,[DepartureBarCode] 出站条码
,[TMDB] 条码对比
,CONVERT(varchar, [OutTime], 120) 出站时间
,[CCD1] '正面(2D/3D)'
,[CCD2] '反面(2D/3D)'
,[CCD3] '左侧面(2D/3D)'
,[CCD4] '右侧面(2D/3D)'
,[CCD5] '顶面(2D/3D)'
,[CCD6] '底面(2D/3D)'
,[CCD7] 底WE1
,[CCD8] 底WE2
,[CCD9] 底WE3
,[CCD10] 底WE4
,[CCD11] 中ME1
,[CCD12] 中ME2
,[CCD13] 中ME3
,[CCD14] 中ME4
,[CCD15] '极柱(POS/NEG)'
,[CCD16] '防爆阀(PRO)'
,[Result] 综合结果
,[Remark] 备注
,[Flag] 状态
,CONVERT(varchar, [OutTime], 120) 出站时间 ";
StringBuilder sb = new StringBuilder();
foreach (var propName in ConstValue.CCD_SDict.Keys)
{
sb.Append($",[{propName}] '{ConstValue.CCD_SDict[propName]}'");
}
foreach (var propName in ConstValue.CCD_FDict.Keys)
{
sb.Append($",[{propName}] '{ConstValue.CCD_FDict[propName]}'");
}
foreach (var propName in ConstValue.CCD_IDict.Keys)
{
sb.Append($",[{propName}] '{ConstValue.CCD_IDict[propName]}'");
}
string formatSql = sb.ToString();
string nextSql = @",[Result] 综合结果
,[Remark] 备注
,[Flag] 状态
FROM [dbo].[BlankingData] where OutTime >= '" + strDate1 + "' and OutTime <= '" + strDate2 + "' ";
strSql = string.Concat(preSql, formatSql, nextSql);
if (strBarCode != "")
{
strSql += " and DepartureBarCode like '%" + strBarCode + "' ";
+4 -1
View File
@@ -1,5 +1,7 @@
using JY.DAL.Repository;
using JY.Model;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
namespace JY.DAL.Service
@@ -19,7 +21,8 @@ namespace JY.DAL.Service
public List<FeedingData> GetFeedingData(string barCode)
{
return _repository.GetList(x => x.BarCode == barCode);
return _repository.Db.Queryable<FeedingData>().Where(x => x.BarCode == barCode)
.OrderByDescending(x => x.CreateTime).ToList();
}
public int AddFeedingData(FeedingData data)
+3
View File
@@ -5,6 +5,9 @@ namespace JY.Inspection
{
internal class Log4Helper
{
// 通过名称获取专属的 PLC Logger
private static readonly ILog plcLog = LogManager.GetLogger("PlcDataLogger");
public static void WriteLog(Type t, Exception ex)
{
ILog log = LogManager.GetLogger(t);
+52 -2
View File
@@ -1,4 +1,7 @@
using JY.Inspection.Entity;
using JY.DAL;
using JY.Inspection.Entity;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -47,6 +50,53 @@ namespace JY.Inspection.Common
return listAlarmStatus;
}
/// <summary>
/// 欧姆龙NX系列Ethernet/IP通讯时将报警地址值转成报警List {直接读取标签地址/无需高低位互换}
/// </summary>
/// <param name="plcAddrSuffix">PLC地址值,如100</param>
/// <param name="byteData">PLC读取出来的值</param>
/// <param name="plcAddrPrefix">PLC地址类型,默认值R</param>
/// <returns></returns>
public static List<AlarmStatus> OmronEIPByte2Status(List<byte> byteData, char plcAddrPrefix = 'D')
{
var listAlarmStatus = new List<AlarmStatus>();
// byte[]转为二进制字符串表示
string strResult = "";
byte[] revBytes = SWAPbyte(byteData.ToArray()); //字节高低位互换
for (int i = 0; i < revBytes.Length; i++)
{
string strTemp = System.Convert.ToString(revBytes[i], 2);
strTemp = strTemp.PadLeft(8, '0').StrReverse();
strResult += strTemp;
}
int groupIndex = -1;
for (int i = 0; i < strResult.Length; i++)
{
var plcByte = i % 160;
//如果是16的倍数地址+1
if (groupIndex == -1 || (plcByte % 160 == 0 && i != 0))
{
groupIndex += 1;
}
int address = ConstValue.GetAddressByIndex(groupIndex);
//将地址和状态添加到结果集
listAlarmStatus.Add(new AlarmStatus()
{
PLCAdress = $"{plcAddrPrefix}{address}.{plcByte.ToString()}",
Status = strResult[i] == '1'
});
//if (strResult[i] == '1')
// Console.WriteLine($"{plcAddrPrefix}{plcAddrSuffix}.{plcByte.ToString("X")}:{strResult[i]}");
}
return listAlarmStatus;
}
/// <summary>
/// 欧姆龙NX系列Ethernet/IP通讯时将报警地址值转成报警List {直接读取标签地址/无需高低位互换}
@@ -55,7 +105,7 @@ namespace JY.Inspection.Common
/// <param name="byteData">PLC读取出来的值</param>
/// <param name="plcAddrPrefix">PLC地址类型,默认值R</param>
/// <returns></returns>
public static List<AlarmStatus> OmronEIPByte2Status(int plcAddrSuffix, List<byte> byteData, char plcAddrPrefix = 'W')
public static List<AlarmStatus> OmronEIPByte2Status(int plcAddrSuffix, List<byte> byteData, char plcAddrPrefix = 'D')
{
var listAlarmStatus = new List<AlarmStatus>();
// byte[]转为二进制字符串表示
+1
View File
@@ -44,6 +44,7 @@ StartNGFL=0
Grading=0
MesRequestTime=2
LoginTime=10
TaskInterval=1
[统计计数]
ProdAllQty=0
+1 -1
View File
@@ -31,7 +31,7 @@ Solt=0
2#IsRead=True
2#ReadAddr=W3010
2#ReadType=Byte
2#ReadLength=118
2#ReadLength=700
3#ThreadName=±¨¾¯
3#RecvAddr=W6000
Binary file not shown.
+5
View File
@@ -38,6 +38,8 @@ namespace JY.Inspection.Frm
tb_loginMes.DataBindings.Add(new Binding("Text", bindingSource1, "LoginMesUrl", true, DataSourceUpdateMode.OnPropertyChanged));
tb_euipAlarm.DataBindings.Add(new Binding("Text", bindingSource1, "EquipAlarmUrl", true, DataSourceUpdateMode.OnPropertyChanged));
tb_euipStatus.DataBindings.Add(new Binding("Text", bindingSource1, "EquipStatusUrl", true, DataSourceUpdateMode.OnPropertyChanged));
num_taskInterval.DataBindings.Add(new Binding("Value", bindingSource1, "TaskInterval", true,
DataSourceUpdateMode.OnPropertyChanged));
}
#endregion
@@ -62,6 +64,8 @@ namespace JY.Inspection.Frm
_viewModel.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl");
_viewModel.EquipAlarmUrl = IniFileHelper.ReadIniData("MES配置", "EquipAlarmUrl");
_viewModel.EquipStatusUrl = IniFileHelper.ReadIniData("MES配置", "EquipStatusUrl");
int.TryParse(IniFileHelper.ReadIniData("MES配置", "TaskInterval"), out int taskInterval);
_viewModel.TaskInterval = taskInterval;
LoginTime.Text = IniFileHelper.ReadIniData("MES配置", "LoginTime");
txtMesRequestTime.Text = IniFileHelper.ReadIniData("MES配置", "MesRequestTime");
@@ -90,6 +94,7 @@ namespace JY.Inspection.Frm
IniFileHelper.WriteIniData("MES配置", "LoginMesUrl", _viewModel.LoginMesUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "EquipAlarmUrl", _viewModel.EquipAlarmUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "EquipStatusUrl", _viewModel.EquipStatusUrl.Trim());
IniFileHelper.WriteIniData("MES配置", "TaskInterval", _viewModel.TaskInterval.ToString());
IniFileHelper.WriteIniData("MES配置", "LoginTime", LoginTime.Text.Trim());
LogManagerControl.AddLog($"用户[{Global.systemConfig.userName}]设置权限超时时间[{LoginTime.Text.Trim()}]", LogAddtype.local, Logtype.Warning);
+100 -38
View File
@@ -48,6 +48,8 @@ namespace JY.Inspection.Frm
this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.metroPanel_mid = new MetroFramework.Controls.MetroPanel();
this.tb_euipStatus = new MetroFramework.Controls.MetroTextBox();
this.metroLabel12 = new MetroFramework.Controls.MetroLabel();
this.tb_euipAlarm = new MetroFramework.Controls.MetroTextBox();
this.metroLabel11 = new MetroFramework.Controls.MetroLabel();
this.tb_loginMes = new MetroFramework.Controls.MetroTextBox();
@@ -69,8 +71,9 @@ namespace JY.Inspection.Frm
this.linkLabel_editCollectItemCfg = new System.Windows.Forms.LinkLabel();
this.chkIsMesUP = new System.Windows.Forms.CheckBox();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.metroLabel12 = new MetroFramework.Controls.MetroLabel();
this.tb_euipStatus = new MetroFramework.Controls.MetroTextBox();
this.metroLabel13 = new MetroFramework.Controls.MetroLabel();
this.num_taskInterval = new System.Windows.Forms.NumericUpDown();
this.metroLabel14 = new MetroFramework.Controls.MetroLabel();
this.groupBox1.SuspendLayout();
this.metroPanel_mid.SuspendLayout();
this.metroPanel_top.SuspendLayout();
@@ -78,6 +81,7 @@ namespace JY.Inspection.Frm
((System.ComponentModel.ISupportInitialize)(this.txtMesRequestTime)).BeginInit();
this.metroPanel_bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.num_taskInterval)).BeginInit();
this.SuspendLayout();
//
// btnExit
@@ -410,6 +414,48 @@ namespace JY.Inspection.Frm
this.metroPanel_mid.VerticalScrollbarHighlightOnWheel = false;
this.metroPanel_mid.VerticalScrollbarSize = 13;
//
// tb_euipStatus
//
//
//
//
this.tb_euipStatus.CustomButton.Image = null;
this.tb_euipStatus.CustomButton.Location = new System.Drawing.Point(671, 1);
this.tb_euipStatus.CustomButton.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.CustomButton.Name = "";
this.tb_euipStatus.CustomButton.Size = new System.Drawing.Size(27, 27);
this.tb_euipStatus.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.tb_euipStatus.CustomButton.TabIndex = 1;
this.tb_euipStatus.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.tb_euipStatus.CustomButton.UseSelectable = true;
this.tb_euipStatus.CustomButton.Visible = false;
this.tb_euipStatus.Lines = new string[0];
this.tb_euipStatus.Location = new System.Drawing.Point(235, 260);
this.tb_euipStatus.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.MaxLength = 32767;
this.tb_euipStatus.Name = "tb_euipStatus";
this.tb_euipStatus.PasswordChar = '\0';
this.tb_euipStatus.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tb_euipStatus.SelectedText = "";
this.tb_euipStatus.SelectionLength = 0;
this.tb_euipStatus.SelectionStart = 0;
this.tb_euipStatus.ShortcutsEnabled = true;
this.tb_euipStatus.Size = new System.Drawing.Size(699, 29);
this.tb_euipStatus.TabIndex = 45;
this.tb_euipStatus.UseSelectable = true;
this.tb_euipStatus.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.tb_euipStatus.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
//
// metroLabel12
//
this.metroLabel12.AutoSize = true;
this.metroLabel12.Location = new System.Drawing.Point(41, 269);
this.metroLabel12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel12.Name = "metroLabel12";
this.metroLabel12.Size = new System.Drawing.Size(144, 20);
this.metroLabel12.TabIndex = 44;
this.metroLabel12.Text = "设备状态接口地址:";
//
// tb_euipAlarm
//
//
@@ -580,6 +626,9 @@ namespace JY.Inspection.Frm
//
// metroPanel_top
//
this.metroPanel_top.Controls.Add(this.metroLabel14);
this.metroPanel_top.Controls.Add(this.num_taskInterval);
this.metroPanel_top.Controls.Add(this.metroLabel13);
this.metroPanel_top.Controls.Add(this.tb_productType);
this.metroPanel_top.Controls.Add(this.metroLabel18);
this.metroPanel_top.Controls.Add(this.metroLabel21);
@@ -786,47 +835,56 @@ namespace JY.Inspection.Frm
this.chkIsMesUP.Text = "开启MES模式";
this.chkIsMesUP.UseVisualStyleBackColor = true;
//
// metroLabel12
// metroLabel13
//
this.metroLabel12.AutoSize = true;
this.metroLabel12.Location = new System.Drawing.Point(41, 269);
this.metroLabel12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel12.Name = "metroLabel12";
this.metroLabel12.Size = new System.Drawing.Size(144, 20);
this.metroLabel12.TabIndex = 44;
this.metroLabel12.Text = "设备状态接口地址:";
this.metroLabel13.AutoSize = true;
this.metroLabel13.Location = new System.Drawing.Point(484, 110);
this.metroLabel13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel13.Name = "metroLabel13";
this.metroLabel13.Size = new System.Drawing.Size(114, 20);
this.metroLabel13.TabIndex = 185;
this.metroLabel13.Text = "定时任务间隔:";
//
// tb_euipStatus
// num_taskInterval
//
this.num_taskInterval.DecimalPlaces = 1;
this.num_taskInterval.Increment = new decimal(new int[] {
5,
0,
0,
65536});
this.num_taskInterval.Location = new System.Drawing.Point(655, 110);
this.num_taskInterval.Margin = new System.Windows.Forms.Padding(4);
this.num_taskInterval.Maximum = new decimal(new int[] {
1000,
0,
0,
0});
this.num_taskInterval.Minimum = new decimal(new int[] {
5,
0,
0,
65536});
this.num_taskInterval.Name = "num_taskInterval";
this.num_taskInterval.Size = new System.Drawing.Size(101, 25);
this.num_taskInterval.TabIndex = 186;
this.num_taskInterval.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.num_taskInterval.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// metroLabel14
//
//
this.tb_euipStatus.CustomButton.Image = null;
this.tb_euipStatus.CustomButton.Location = new System.Drawing.Point(671, 1);
this.tb_euipStatus.CustomButton.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.CustomButton.Name = "";
this.tb_euipStatus.CustomButton.Size = new System.Drawing.Size(27, 27);
this.tb_euipStatus.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
this.tb_euipStatus.CustomButton.TabIndex = 1;
this.tb_euipStatus.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
this.tb_euipStatus.CustomButton.UseSelectable = true;
this.tb_euipStatus.CustomButton.Visible = false;
this.tb_euipStatus.Lines = new string[0];
this.tb_euipStatus.Location = new System.Drawing.Point(235, 260);
this.tb_euipStatus.Margin = new System.Windows.Forms.Padding(4);
this.tb_euipStatus.MaxLength = 32767;
this.tb_euipStatus.Name = "tb_euipStatus";
this.tb_euipStatus.PasswordChar = '\0';
this.tb_euipStatus.ScrollBars = System.Windows.Forms.ScrollBars.None;
this.tb_euipStatus.SelectedText = "";
this.tb_euipStatus.SelectionLength = 0;
this.tb_euipStatus.SelectionStart = 0;
this.tb_euipStatus.ShortcutsEnabled = true;
this.tb_euipStatus.Size = new System.Drawing.Size(699, 29);
this.tb_euipStatus.TabIndex = 45;
this.tb_euipStatus.UseSelectable = true;
this.tb_euipStatus.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
this.tb_euipStatus.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
this.metroLabel14.AutoSize = true;
this.metroLabel14.Location = new System.Drawing.Point(764, 110);
this.metroLabel14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.metroLabel14.Name = "metroLabel14";
this.metroLabel14.Size = new System.Drawing.Size(32, 20);
this.metroLabel14.TabIndex = 187;
this.metroLabel14.Text = "min";
this.metroLabel14.Visible = false;
//
// FormMesDataSet
//
@@ -853,6 +911,7 @@ namespace JY.Inspection.Frm
this.metroPanel_bottom.ResumeLayout(false);
this.metroPanel_bottom.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.num_taskInterval)).EndInit();
this.ResumeLayout(false);
}
@@ -898,5 +957,8 @@ namespace JY.Inspection.Frm
private MetroFramework.Controls.MetroLabel metroLabel11;
private MetroFramework.Controls.MetroTextBox tb_euipStatus;
private MetroFramework.Controls.MetroLabel metroLabel12;
private System.Windows.Forms.NumericUpDown num_taskInterval;
private MetroFramework.Controls.MetroLabel metroLabel13;
private MetroFramework.Controls.MetroLabel metroLabel14;
}
}
+26
View File
@@ -32,6 +32,8 @@
this.btn_stationExit = new MetroFramework.Controls.MetroButton();
this.btn_stationArrival = new MetroFramework.Controls.MetroButton();
this.btn_sendMQTTClient = new MetroFramework.Controls.MetroButton();
this.btn_logPLCData = new MetroFramework.Controls.MetroButton();
this.btn_testAlarm = new MetroFramework.Controls.MetroButton();
this.SuspendLayout();
//
// btn_readCollectItemCfg
@@ -74,11 +76,33 @@
this.btn_sendMQTTClient.UseSelectable = true;
this.btn_sendMQTTClient.Click += new System.EventHandler(this.btn_sendMQTTClient_Click);
//
// btn_logPLCData
//
this.btn_logPLCData.Location = new System.Drawing.Point(263, 220);
this.btn_logPLCData.Name = "btn_logPLCData";
this.btn_logPLCData.Size = new System.Drawing.Size(125, 53);
this.btn_logPLCData.TabIndex = 4;
this.btn_logPLCData.Text = "记录PLC数据";
this.btn_logPLCData.UseSelectable = true;
this.btn_logPLCData.Click += new System.EventHandler(this.btn_logPLCData_Click);
//
// btn_testAlarm
//
this.btn_testAlarm.Location = new System.Drawing.Point(426, 229);
this.btn_testAlarm.Name = "btn_testAlarm";
this.btn_testAlarm.Size = new System.Drawing.Size(125, 53);
this.btn_testAlarm.TabIndex = 5;
this.btn_testAlarm.Text = "报警测试";
this.btn_testAlarm.UseSelectable = true;
this.btn_testAlarm.Click += new System.EventHandler(this.btn_testAlarm_Click);
//
// FrmTest
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(998, 586);
this.Controls.Add(this.btn_testAlarm);
this.Controls.Add(this.btn_logPLCData);
this.Controls.Add(this.btn_sendMQTTClient);
this.Controls.Add(this.btn_stationArrival);
this.Controls.Add(this.btn_stationExit);
@@ -95,5 +119,7 @@
private MetroFramework.Controls.MetroButton btn_stationExit;
private MetroFramework.Controls.MetroButton btn_stationArrival;
private MetroFramework.Controls.MetroButton btn_sendMQTTClient;
private MetroFramework.Controls.MetroButton btn_logPLCData;
private MetroFramework.Controls.MetroButton btn_testAlarm;
}
}
+45 -1
View File
@@ -1,11 +1,16 @@
using JY.Inspection.Common;
using HslCommunication;
using HslCommunication.Core;
using HslCommunication.Profinet.Omron;
using JY.Inspection.Common;
using JY.Model.Excel;
using JY.Utility;
using MetroFramework.Forms;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
@@ -65,5 +70,44 @@ namespace JY.Inspection.Frm
string payload = "测试数据";
await MqttSingleton.Instance.SendAsync(topic, payload);
}
private void btn_logPLCData_Click(object sender, EventArgs e)
{
byte[] bytes = new byte[] { 0x01, 0x02, 0x03, 0x04 };
LogHelper.LogPLCData("电池出站数据", bytes);
LogHelper.WriteErrorLine("错误日志");
}
private void btn_testAlarm_Click(object sender, EventArgs e)
{
string address = "192.168.2.50";
OmronFinsNet omronFinsNet = new OmronFinsNet();
omronFinsNet.IpAddress = address.ToString();
omronFinsNet.Port = 9600;
omronFinsNet.DA2 = 0;
omronFinsNet.ByteTransform.DataFormat = DataFormat.CDAB;
omronFinsNet.ByteTransform.IsStringReverseByteWord = true;
omronFinsNet.ConnectTimeOut = 2000;
omronFinsNet.ReceiveTimeOut = 2000;
var result = omronFinsNet.ConnectServer();
if (result != null && result.IsSuccess)
{
Debug.WriteLine("FinsTcp连接成功");
}
else
{
Debug.WriteLine("FinsTcp连接失败");
}
string addr = "D10010";
ushort length = 150;
byte[] byteResult = omronFinsNet.Read(addr, length).Content;
OperateResult barray = omronFinsNet.ReadBool(addr, length);
}
}
}
+108 -183
View File
@@ -150,7 +150,7 @@ namespace JY.Inspection
public CancellationTokenSource mCOMState = new CancellationTokenSource();
private ManualResetEvent resetEventRecv = new ManualResetEvent(true);
private ByteTransformBase TransformBase = new ByteTransformBase();
//private ByteTransformBase TransformBase = new ByteTransformBase();
/// <summary>
/// 用于电芯出站时向FMS上报出站及生产数据
@@ -173,14 +173,15 @@ namespace JY.Inspection
/// </summary>
List<ChartDataType> NGList = new List<ChartDataType>();
//private readonly object lockObject = new object();
/// <summary>
/// 报警原始数据
/// </summary>
List<byte> listAlamByte = new List<byte>();
//List<byte> listAlamByte = new List<byte>();
//报警表单数据
List<AlarmForm> listAlarmForm = null;
//PLC报警状态值
List<AlarmStatus> listAlarmStatus = null;
//List<AlarmStatus> listAlarmStatus = null;
/// <summary>
@@ -278,10 +279,13 @@ namespace JY.Inspection
this.ControlBox = true;
// 或设置窗口可调整大小
this.Resizable = true;
}
private void InitDgvBColumns()
{
List<DataGridViewColumn> colDefList = new List<DataGridViewColumn>();
DataGridViewTextBoxColumn Column6 = new DataGridViewTextBoxColumn();
Column6.DataPropertyName = "TD";
@@ -290,6 +294,7 @@ namespace JY.Inspection
Column6.Name = "Column6";
Column6.ReadOnly = true;
Column6.Width = 52;
colDefList.Add(Column6);
DataGridViewTextBoxColumn Column8 = new DataGridViewTextBoxColumn();
Column8.DataPropertyName = "WorkShift";
@@ -298,6 +303,7 @@ namespace JY.Inspection
Column8.Name = "Column8";
Column8.ReadOnly = true;
Column8.Width = 52;
colDefList.Add(Column8);
DataGridViewTextBoxColumn Column31 = new DataGridViewTextBoxColumn();
Column31 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -307,6 +313,7 @@ namespace JY.Inspection
Column31.Name = "Column31";
Column31.ReadOnly = true;
Column31.Width = 52;
colDefList.Add(Column31);
DataGridViewTextBoxColumn Column26 = new DataGridViewTextBoxColumn();
Column26.DataPropertyName = "ArrivalBarCode";
@@ -315,6 +322,7 @@ namespace JY.Inspection
Column26.Name = "Column26";
Column26.ReadOnly = true;
Column26.Width = 64;
colDefList.Add(Column26);
DataGridViewTextBoxColumn Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column7.DataPropertyName = "DepartureBarCode";
@@ -323,6 +331,7 @@ namespace JY.Inspection
Column7.Name = "Column7";
Column7.ReadOnly = true;
Column7.Width = 64;
colDefList.Add(Column7);
DataGridViewTextBoxColumn Column27 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column27.DataPropertyName = "TMDB";
@@ -331,6 +340,7 @@ namespace JY.Inspection
Column27.Name = "Column27";
Column27.ReadOnly = true;
Column27.Width = 64;
colDefList.Add(Column27);
DataGridViewTextBoxColumn Column25 = new DataGridViewTextBoxColumn();
Column25.DataPropertyName = "OutTime";
@@ -339,133 +349,46 @@ namespace JY.Inspection
Column25.Name = "Column25";
Column25.ReadOnly = true;
Column25.Width = 64;
colDefList.Add(Column25);
DataGridViewTextBoxColumn Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column9.DataPropertyName = "CCD1";
Column9.HeaderText = "正面(2D/3D)";
Column9.MinimumWidth = 6;
Column9.Name = "Column9";
Column9.ReadOnly = true;
Column9.Width = 86;
#region CCD结果
DataGridViewTextBoxColumn Column10= new System.Windows.Forms.DataGridViewTextBoxColumn();
Column10.DataPropertyName = "CCD2";
Column10.HeaderText = "反面(2D/3D)";
Column10.MinimumWidth = 6;
Column10.Name = "Column10";
Column10.ReadOnly = true;
Column10.Width = 86;
foreach (var propName in ConstValue.CCD_SDict.Keys)
{
DataGridViewColumn col = new DataGridViewTextBoxColumn();
col.DataPropertyName = propName;
col.HeaderText = ConstValue.CCD_SDict[propName];
col.MinimumWidth = 6;
col.Name = $"Col_ccd_{propName}";
col.ReadOnly = true;
DataGridViewTextBoxColumn Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column11.DataPropertyName = "CCD3";
Column11.HeaderText = "左侧面(2D/3D)";
Column11.MinimumWidth = 6;
Column11.Name = "Column11";
Column11.ReadOnly = true;
Column11.Width = 98;
colDefList.Add(col);
}
DataGridViewTextBoxColumn Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column12.DataPropertyName = "CCD4";
Column12.HeaderText = "右侧面(2D/3D)";
Column12.MinimumWidth = 6;
Column12.Name = "Column12";
Column12.ReadOnly = true;
Column12.Width = 98;
foreach (var propName in ConstValue.CCD_FDict.Keys)
{
DataGridViewColumn col = new DataGridViewTextBoxColumn();
col.DataPropertyName = propName;
col.HeaderText = ConstValue.CCD_FDict[propName];
col.MinimumWidth = 6;
col.Name = $"Col_ccd_{propName}";
col.ReadOnly = true;
DataGridViewTextBoxColumn Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column13.DataPropertyName = "CCD5";
Column13.HeaderText = "顶面(2D/3D)";
Column13.MinimumWidth = 6;
Column13.Name = "Column13";
Column13.ReadOnly = true;
Column13.Width = 86;
colDefList.Add(col);
}
DataGridViewTextBoxColumn Column14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column14.DataPropertyName = "CCD6";
Column14.HeaderText = "底面(2D/3D)";
Column14.MinimumWidth = 6;
Column14.Name = "Column14";
Column14.ReadOnly = true;
Column14.Width = 86;
foreach (var propName in ConstValue.CCD_IDict.Keys)
{
DataGridViewColumn col = new DataGridViewTextBoxColumn();
col.DataPropertyName = propName;
col.HeaderText = ConstValue.CCD_IDict[propName];
col.MinimumWidth = 6;
col.Name = $"Col_ccd_{propName}";
col.ReadOnly = true;
DataGridViewTextBoxColumn Column15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column15.DataPropertyName = "CCD7";
Column15.HeaderText = "底棱边WE1";
Column15.MinimumWidth = 6;
Column15.Name = "Column15";
Column15.ReadOnly = true;
Column15.Width = 85;
DataGridViewTextBoxColumn Column16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column16.DataPropertyName = "CCD8";
Column16.HeaderText = "底棱边WE2";
Column16.MinimumWidth = 6;
Column16.Name = "Column16";
Column16.ReadOnly = true;
Column16.Width = 85;
DataGridViewTextBoxColumn Column17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column17.DataPropertyName = "CCD9";
Column17.HeaderText = "底棱边WE3";
Column17.MinimumWidth = 6;
Column17.Name = "Column17";
Column17.ReadOnly = true;
Column17.Width = 85;
DataGridViewTextBoxColumn Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column18.DataPropertyName = "CCD10";
Column18.HeaderText = "底棱边WE4";
Column18.MinimumWidth = 6;
Column18.Name = "Column18";
Column18.ReadOnly = true;
Column18.Width = 85;
DataGridViewTextBoxColumn Column19 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column19.DataPropertyName = "CCD11";
Column19.HeaderText = "中棱边ME1";
Column19.MinimumWidth = 6;
Column19.Name = "Column19";
Column19.ReadOnly = true;
Column19.Width = 84;
DataGridViewTextBoxColumn Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column20.DataPropertyName = "CCD12";
Column20.HeaderText = "中棱边ME2";
Column20.MinimumWidth = 6;
Column20.Name = "Column20";
Column20.ReadOnly = true;
Column20.Width = 84;
DataGridViewTextBoxColumn Column21 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column21.DataPropertyName = "CCD13";
Column21.HeaderText = "中棱边ME3";
Column21.MinimumWidth = 6;
Column21.Name = "Column21";
Column21.ReadOnly = true;
Column21.Width = 84;
DataGridViewTextBoxColumn Column23 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column23.DataPropertyName = "CCD14";
Column23.HeaderText = "中棱边ME4";
Column23.MinimumWidth = 6;
Column23.Name = "Column23";
Column23.ReadOnly = true;
Column23.Width = 84;
DataGridViewTextBoxColumn Column28 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column28.DataPropertyName = "CCD15";
Column28.HeaderText = "极柱(POS/NEG)";
Column28.MinimumWidth = 8;
Column28.Name = "Column28";
Column28.ReadOnly = true;
DataGridViewTextBoxColumn Column29 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column29.DataPropertyName = "CCD16";
Column29.HeaderText = "防爆阀(PRO)";
Column29.MinimumWidth = 8;
Column29.Name = "Column29";
Column29.ReadOnly = true;
Column29.Width = 89;
colDefList.Add(col);
}
#endregion
DataGridViewTextBoxColumn Column22 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column22.DataPropertyName = "Result";
@@ -474,6 +397,7 @@ namespace JY.Inspection
Column22.Name = "Column22";
Column22.ReadOnly = true;
Column22.Width = 64;
colDefList.Add(Column22);
DataGridViewTextBoxColumn Column24 = new System.Windows.Forms.DataGridViewTextBoxColumn();
Column24.DataPropertyName = "Remark";
@@ -482,33 +406,9 @@ namespace JY.Inspection
Column24.Name = "Column24";
Column24.ReadOnly = true;
Column24.Width = 52;
colDefList.Add(Column24);
this.dgvDataShow_B.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
Column6,
Column8,
Column31,
Column26,
Column7,
Column27,
Column25,
Column9,
Column10,
Column11,
Column12,
Column13,
Column14,
Column15,
Column16,
Column17,
Column18,
Column19,
Column20,
Column21,
Column23,
Column28,
Column29,
Column22,
Column24});
this.dgvDataShow_B.Columns.AddRange(colDefList.ToArray());
}
@@ -663,6 +563,8 @@ namespace JY.Inspection
CheckClassShift();
InitOmronCom();
string strFileName = Environment.CurrentDirectory + "\\欧姆龙报警寄存器对应表.csv";
listAlarmForm = CSVHelper<AlarmForm>.ReadCSV(strFileName,",");
CancellationToken token1 = mctsA1.Token;
CancellationToken token2 = mctsA2.Token;
@@ -738,6 +640,9 @@ namespace JY.Inspection
Global.systemConfig.StationArrivalUrl = IniFileHelper.ReadIniData("MES配置", "StationArrivalUrl");
Global.systemConfig.StationExitUrl = IniFileHelper.ReadIniData("MES配置", "StationExitUrl");
Global.systemConfig.LoginMesUrl = IniFileHelper.ReadIniData("MES配置", "LoginMesUrl");
Global.systemConfig.EquipAlarmUrl = IniFileHelper.ReadIniData("MES配置", "EquipAlarmUrl");
Global.systemConfig.EquipStatusUrl = IniFileHelper.ReadIniData("MES配置", "EquipStatusUrl");
Global.systemConfig.TaskInterval = Convert.ToInt32(IniFileHelper.ReadIniData("MES配置", "TaskInterval"));
try
{
@@ -839,7 +744,7 @@ namespace JY.Inspection
IsStartNGFL = IniFileHelper.ReadIniData("MES配置", "StartNGFL") == "1" ? true : false;
chkStartNGFL.Checked = IsStartNGFL;
listAlamByte = GetListByte(200);
//listAlamByte = GetListByte(200);
Global.systemConfig.isUpMes = IniFileHelper.ReadIniData("SYSTEM_CONFIGURE", "IsMesUP") == "1" ? true : false;
@@ -2119,8 +2024,8 @@ namespace JY.Inspection
byte[] bytes = resByte.Content.ByteReverse();
//前面有\03\00 标识 占2个字节
int offset = 0;
listBar[0] = TransformBase.TransString(bytes, 0+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//1# 条码
listBar[1] = TransformBase.TransString(bytes, 40+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//2# 条码
listBar[0] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransString(bytes, 0+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//1# 条码
listBar[1] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransString(bytes, 40+ offset, 20*2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//2# 条码
// listBar[2] = TransformBase.TransString(bytes, 80+ offset, 20 * 2, System.Text.Encoding.ASCII).Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();//3# 条码
//新增 左右通道
var dtGroup = 0;
@@ -2158,7 +2063,7 @@ namespace JY.Inspection
#region 947 MES
if (Global.systemConfig.isUpMes)
{
// TODO 进站数据上传
// 进站数据上传
ReqArrivalStation req = new ReqArrivalStation()
{
SiteCode = Global.systemConfig.siteCode,
@@ -2364,17 +2269,17 @@ namespace JY.Inspection
{
CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count),
CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count),
CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count)
//CollectionUtil.GetListUShort(ConstValue.CCD_SDict.Count)
},
ListCCDFResult = new List<List<float>> {
CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count),
CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count),
CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count)
//CollectionUtil.GetListFloat(ConstValue.CCD_FDict.Count)
},
ListCCDIResult = new List<List<int>> {
CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count),
CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count),
CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count)
//CollectionUtil.GetListInt(ConstValue.CCD_IDict.Count)
},
ListResult = CollectionUtil.GetListUShort(2)
};
@@ -2386,11 +2291,16 @@ namespace JY.Inspection
private void ParsePlcOutgoingData(byte[] content, OutgoingContainers containers)
{
var bytes = content.ByteReverse();
JY.Utility.LogHelper.LogPLCData("电池出站数据", bytes);
byte[] sByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3400", 200)?.ByteReverse();
byte[] fByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3500", 400)?.ByteReverse();
byte[] iByteArr = omronPLCCom.lstMcUI[0].Readbyte("W3600", 200)?.ByteReverse();
for (int i = 0; i < 2; i++)
{
// 出站条码: 偏移0, 每通道40字节(20字符)
containers.ListBarOut[i] = TransformBase.TransString(
containers.ListBarOut[i] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransString(
bytes, 0 + (i * 40 * 2), 20 * 2, System.Text.Encoding.ASCII)
.Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
@@ -2399,26 +2309,26 @@ namespace JY.Inspection
// OK/NG结果: 3400-3415, 每通道偏移100字节/3450-3465
for (int j = 0; j < ConstValue.CCD_SDict.Count; j++)
{
int index = 390 * 2 + (i * 50 * 2) + j * 2;
lstBarResult[j] = (short)TransformBase.TransInt16(content, index);
int index = (i * 50 * 2) + j * 2;
lstBarResult[j] = (short)omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransInt16(sByteArr, index);
}
// 浮点型结果: 3500起/3550
for (int k = 0; k < ConstValue.CCD_FDict.Count; k++)
{
int index = 490 * 2 + (i * 50 * 2) + k * 2 * 2;
containers.ListCCDFResult[i][k] = TransformBase.TransSingle(content, index);
int index = (i * 50 * 2) + k * 2 * 2;
containers.ListCCDFResult[i][k] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransSingle(fByteArr, index);
}
// 整型结果: 3600起/3650
for (int k = 0; k < ConstValue.CCD_IDict.Count; k++)
{
int index = 590 * 2 + (i * 50 * 2) + k * 2;
containers.ListCCDIResult[i][k] = TransformBase.TransInt16(content, index);
int index = (i * 50 * 2) + k * 2;
containers.ListCCDIResult[i][k] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransInt16(iByteArr, index);
}
// 进站条码: 偏移280(140*2), 每通道40字节
containers.ListBarIn[i] = TransformBase.TransString(
containers.ListBarIn[i] = omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransString(
bytes, 140 * 2 + (i * 20 * 2), 20 * 2, System.Text.Encoding.ASCII)
.Replace('\0', ' ').Replace('\r', ' ').Replace(" ", "").Trim();
}
@@ -2449,7 +2359,7 @@ namespace JY.Inspection
var lstError = new List<short>();
containers.ListResult[index] = GetResult(m, ref strErr, ref lstError);
m.Result = containers.ListResult[index] == 1 ? "OK" : "NG";
m.Result = containers.ListResult[index] == 1 ? ConstValue.CCD_OK : ConstValue.CCD_NG;
m.Remark = strErr;
// 4. 判断扫码NG与CCD NG
@@ -2504,6 +2414,8 @@ namespace JY.Inspection
if (listEntity.Count() > 0)
{
m.TDGroup = listEntity.First().TDGroup;
m.InTime = listEntity.First().CreateTime;
m.IsRepeat = listEntity.Count > 1;
}
// 处理空条码
@@ -2546,7 +2458,7 @@ namespace JY.Inspection
}
}
foreach (var propName in ConstValue.CCD_SDict.Keys)
foreach (var propName in ConstValue.CCD_IDict.Keys)
{
if (BlankingDataProps.TryGetValue(propName, out var prop))
{
@@ -2816,7 +2728,7 @@ namespace JY.Inspection
AssembleLineList = new List<AssembleLine>() {
new AssembleLine() {
Identification = m.ArrivalBarCode,
QualityStatus = m.Result,
QualityStatus = m.Result == ConstValue.CCD_OK ? ConstValue.CCD_OK : ConstValue.CCD_NG,
// TODO NG编码
QrCode = string.Empty,
NgCode = new string[] { string.Empty },
@@ -3216,30 +3128,43 @@ namespace JY.Inspection
if (!mt.IsCancellationRequested)
{
sw.Restart();
byte[] res = new byte[2];
for (int i = 0; i < 30; i++)
//byte[] res = new byte[2];
//for (int i = 0; i < 30; i++)
//{
// res = omronPLCCom.lstMcUI[0].Readbyte("W6100[" + i + "].Word区", 1);
// if (res != null)
// {
// for (int j = i; j < res.Length + i; j++)
// {
// listAlamByte[i + j] = res[j - i];
// }
// }
//}
byte[] res = null;
List<byte> listAlamByte = new List<byte>();
foreach (var address in ConstValue.AlarmAddressDic.Keys)
{
res = omronPLCCom.lstMcUI[0].Readbyte("W6100[" + i + "].Word区", 1);
if (res != null)
ushort byteLen = (ushort)(ConstValue.AlarmAddressDic[address] * 10);
res = omronPLCCom.lstMcUI[0].ReadByteFins($"D{address}", byteLen);
if (res == null)
{
for (int j = i; j < res.Length + i; j++)
{
listAlamByte[i + j] = res[j - i];
}
continue;
}
listAlamByte.AddRange(res);
}
//AddLog(0, "读取报警耗时:" + sw.ElapsedMilliseconds + "ms");
if (listAlamByte == null) { return; }
string strFileName = Environment.CurrentDirectory + "\\欧姆龙报警寄存器对应表.csv";
listAlarmForm = CSVHelper<AlarmForm>.ReadCSV(strFileName);
if (listAlamByte == null || listAlamByte.Count == 0) { return; }
//string strFileName = Environment.CurrentDirectory + "\\欧姆龙报警寄存器对应表.csv";
//listAlarmForm = CSVHelper<AlarmForm>.ReadCSV(strFileName);
//如果未配置报警地址信息返回 TODO
if (listAlarmForm == null) { return; }
int startPlcAddr = 0;//TODO 读取起始地址
//3.公用方法解析byte[]数据 => List<AlarmStatus>
if (listAlamByte == null) { return; } //如果未配置报警地址信息返回
//TODO 切换三菱和欧姆龙
listAlarmStatus = PLCAlarmParse.OmronEIPByte2Status(startPlcAddr, listAlamByte);
List<AlarmStatus> listAlarmStatus = PLCAlarmParse.OmronEIPByte2Status(listAlamByte);
//4.判定有不良后,关联AlarmStatus 和AlarmForm
if (listAlarmStatus == null) { return; } //状态信息为空返回
@@ -3477,7 +3402,7 @@ namespace JY.Inspection
try
{
sw.Restart();
string code = Convert.ToString(TransformBase.TransInt16(resByte.Content, 0));//读取工位编码,W7010
string code = Convert.ToString(omronPLCCom.lstMcUI[0].omronCipNet.ByteTransform.TransInt16(resByte.Content, 0));//读取工位编码,W7010
omronPLCCom.lstMcUI[0].WriteDReg(omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.ResultAddr, 1);//结果返回PLC,W7100
omronPLCCom.lstMcUI[0].ClearReg(omronPLCCom.lstMcUI[0].lstTrgUI[3].TrgParams.TriggerAddr, VarType.Short);//复位PLC信号,W7000
sw.Stop();
+135 -135
View File
File diff suppressed because it is too large Load Diff
+1 -76
View File
@@ -331,7 +331,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAE
CgAAAk1TRnQBSQFMAgEBAwEAAaABCAGgAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CgAAAk1TRnQBSQFMAgEBAwEAASgBCQEoAQkBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -382,81 +382,6 @@
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column31.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column26.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column27.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column12.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column13.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column14.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column15.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column16.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column23.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column28.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+49 -3
View File
@@ -1,4 +1,5 @@
using JY.Model;
using JY.Inspection.Mes;
using JY.Model;
using JY.Model.Common;
using NPOI.SS.Formula.Functions;
using System;
@@ -21,8 +22,53 @@ namespace JY.Inspection
}
scheduler.AddTask(state => {
Debug.WriteLine("Hello");
}, interval: 1000 * 60);
//Debug.WriteLine("Hello");
List<string> data = this.Invoke(new Func<List<string>>(() => {
List<string> list = new List<string>();
#region 添加电表数据
//相电压UA
list.Add(txtPhaseVolUA.Text);
//相电压UB
list.Add(txtPhaseVolUB.Text);
//相电压UC
list.Add(txtPhaseVolUC.Text);
//线电压UAB
list.Add(txtLineVolUAB.Text);
//线电压UBC
list.Add(txtLineVolUBC.Text);
//线电压UAC
list.Add(txtLineVolUAC.Text);
//电流IA
list.Add(txtIA.Text);
//电流IB
list.Add(txtIB.Text);
//电流IC
list.Add(txtIC.Text);
//A相有功功率
list.Add(txtPowerA.Text);
//B相有功功率
list.Add(txtPowerB.Text);
//C相有功功率
list.Add(txtPowerC.Text);
//总有功功率
list.Add(txtTotalPower.Text);
#endregion
return list;
})) as List<string>;
if (data == null || data.Count == 0)
{
return;
}
Debug.WriteLine($"定时任务执行中, 时间: {DateTime.Now}");
new MESDataCombin().UpEnergyDataMqtt(data);
}, interval: 1000 * 60 * Global.systemConfig.TaskInterval);
}
#endregion
}
+1 -2
View File
@@ -21,7 +21,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\JY.Inspection\</OutputPath>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -194,7 +194,6 @@
<Compile Include="Common\ConnectionClient.cs" />
<Compile Include="Common\DGShowMsg.cs" />
<Compile Include="Common\DateTimeSynchronization.cs" />
<Compile Include="ConstValue.cs" />
<Compile Include="Entity\AlarmStatus.cs" />
<Compile Include="Frm\FormMesGradingSet.cs">
<SubType>Form</SubType>
Binary file not shown.
+19
View File
@@ -13,11 +13,30 @@
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<!-- 2. PLC 数据专属 Appender(只记录 PLC 数据,按天生成) -->
<appender name="PlcDataAppender" type="log4net.Appender.RollingFileAppender">
<file value="Logs/" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd'_PlcData.log'" />
<staticLogFileName value="false" />
<lockingModel type="log4net.Appender.FileAppender+MinimalLock" />
<layout type="log4net.Layout.PatternLayout">
<!-- PLC 日志通常不需要复杂的线程或级别信息,保持简洁即可 -->
<conversionPattern value="%date{yyyy-MM-dd HH:mm:ss.fff} | %message%newline" />
</layout>
</appender>
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<!-- 3. 定义专属的 PLC Logger -->
<!-- additivity="false" 是关键:防止 PLC 日志同时被写入到 root 的系统日志文件中 -->
<logger name="PlcDataLogger">
<level value="INFO" />
<appender-ref ref="PlcDataAppender" />
</logger>
<logger name="Test">
<level value="ALL" />
<appender-ref ref="RollingFileAppender" />
+36 -38
View File
@@ -59,7 +59,7 @@ namespace JY.Inspection.Mes
MesCallResult<RespAlarm> UpAlarmData(ReqAlarm req);
// TODO 能耗
void UpEnergyDataMqtt(List<double> dataList);
void UpEnergyDataMqtt(List<string> dataList);
// TODO 设备打标
}
@@ -196,7 +196,7 @@ namespace JY.Inspection.Mes
{
tdvls.Add(new TagDataVOListItem() {
tagCode = item.MesItemCode,
tagValue = prop.GetValue(m).ToString(),
tagValue = prop.GetValue(m)?.ToString(),
tagTime = m.OutTime,
tagCalculateResult = "Y",
tagRemark = item.MesItemName
@@ -204,43 +204,41 @@ namespace JY.Inspection.Mes
}
}
//tag1 = new TagDataVOListItem() { tagCode = "WGJA001", tagValue = m.ArrivalBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "入站条码" }; tdvls.Add(tag1);
//tag1 = new TagDataVOListItem() { tagCode = "WGJA002", tagValue = m.DepartureBarCode, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站条码" }; tdvls.Add(tag1);
//tag1 = new TagDataVOListItem() { tagCode = "WGJA003", tagValue = m.WorkShift, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "班次" }; tdvls.Add(tag1);
//tag1 = new TagDataVOListItem() { tagCode = "WGJA004", tagValue = m.OutTime, tagTime = m.OutTime, tagCalculateResult = "Y", tagRemark = "出站时间" }; tdvls.Add(tag1);
#region 手动赋值
tdvls.Add(new TagDataVOListItem()
{
tagCode = "VIM_OPERATION_PROCESS",
tagValue = "外观检",
tagTime = m.OutTime,
tagCalculateResult = "Y",
tagRemark = "工艺流程"
});
//foreach (var item in m.PLCValDic)
//{
// // TODO 获取采集项配置
// var cfgItem = Global.systemConfig.CollectItemCfgList
// .Where(it => it.IsEnable && it.PLCRelAddress == item.Key)
// .FirstOrDefault();
tdvls.Add(new TagDataVOListItem() {
tagCode = "VIM_MODEL",
tagValue = Global.systemConfig.productType,
tagTime = m.OutTime,
tagCalculateResult = "Y",
tagRemark = "型号"
});
// if (cfgItem == null)
// {
// continue;
// }
tdvls.Add(new TagDataVOListItem() {
tagCode = "VIM_RETEST_MARK",
tagValue = m.IsRepeat ? "1" : "0",
tagTime = m.OutTime,
tagCalculateResult = "Y",
tagRemark = "复测标记"
});
// // 生成TagDataVoListItem
// tdvls.Add(new TagDataVOListItem()
// {
// tagCode = cfgItem.MesItemCode,
// tagValue = item.Value,
// tagTime = m.OutTime,
// tagCalculateResult = "Y",
// tagRemark = cfgItem.MesItemName
// });
//}
//tdvls.Add(new TagDataVOListItem()
//{
// tagCode = "WGJA021",
// tagValue = m.Result,
// tagTime = m.OutTime,
// tagCalculateResult = "Y",
// tagRemark = "电池总结果"
//});
//多个
tdvls.Add(new TagDataVOListItem()
{
tagCode = "VIM_RETEST_TIME",
tagValue = m.OutTime,
tagTime = m.OutTime,
tagCalculateResult = "Y",
tagRemark = "复测时间"
});
#endregion
pl.tagDataVOList = tdvls;
prp.payload = JsonHelper.Serialize(pl);
@@ -387,7 +385,7 @@ namespace JY.Inspection.Mes
}
// TODO 能耗定时上传
public void UpEnergyDataMqtt(List<double> dataList)
public void UpEnergyDataMqtt(List<string> dataList)
{
if (dataList == null || dataList.Count == 0)
{
@@ -418,7 +416,7 @@ namespace JY.Inspection.Mes
cmd.Taglist.Add(new CollectionItem() {
Equipment_Code = Global.systemConfig.equipCode,
EMeter_Name = dataNameArr[i],
EMeter_Value = dataList[i].ToString()
EMeter_Value = dataList[i]
});
}
@@ -89,5 +89,14 @@ namespace JY.Inspection.ViewModel
get { return productType; }
set { productType = value; OnPropertyChanged(); }
}
private int taskInterval;
public int TaskInterval
{
get { return taskInterval; }
set { taskInterval = value; OnPropertyChanged(); }
}
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ namespace JY.MES.MES
/// <summary>
/// 采集数组
/// </summary>
public List<CollectionItem> Taglist { get; set; }
public List<CollectionItem> Taglist { get; set; } = new List<CollectionItem>();
}
public class CollectionItem
File diff suppressed because one or more lines are too long
+15 -3
View File
@@ -52,6 +52,12 @@ namespace JY.Model
[Name("条码对比")]
public string TMDB { get; set; }
/// <summary>
/// 进站时间
/// </summary>
[SugarColumn(ColumnName = "InTime")]
public string InTime { set; get; }
/// <summary>
/// 出站时间
/// </summary>
@@ -59,6 +65,12 @@ namespace JY.Model
[Name("出站时间")]
public string OutTime { set; get; }
/// <summary>
/// 是否复投
/// </summary>
[SugarColumn(ColumnName = "IsRepeat")]
public bool IsRepeat { get; set; }
/// <summary>
/// 正面(2W/3W)
/// </summary>
@@ -176,11 +188,11 @@ namespace JY.Model
public int CCDI3 { get; set; }
public string CCDI4 { get; set; }
public int CCDI4 { get; set; }
public string CCDI5 { get; set; }
public int CCDI5 { get; set; }
public string CCDI6 { get; set; }
public int CCDI6 { get; set; }
#endregion
/// <summary>
+4 -9
View File
@@ -112,14 +112,9 @@ namespace JY.Model
/// </summary>
public string userName = "";
/// <summary>
/// 定时任务间隔时间
/// </summary>
public int TaskInterval { get; set; } = 1;
}
}
+2 -2
View File
@@ -9,8 +9,8 @@ namespace JY.Model.Excel
{
public class CollectItemCfg
{
[Description("PLC相对地址")]
public int? PLCRelAddress { get; set; }
//[Description("PLC相对地址")]
//public int? PLCRelAddress { get; set; }
[Description("PLC采集数据含义")]
public string PLCItemName { get; set; }
+15
View File
@@ -18,6 +18,8 @@ namespace JY.Utility
{
private static readonly ILog log;
private static readonly ILog plcLog;
/// <summary>
/// </summary>
public static bool DebugMode = false;
@@ -46,6 +48,8 @@ namespace JY.Utility
Console.WriteLine("Log4net.config 文件未找到,日志将无法正常写入");
}
log = LogManager.GetLogger(repository.Name, "Test");
plcLog = LogManager.GetLogger(repository.Name, "PlcDataLogger");
RunClearJob();
}
@@ -372,6 +376,17 @@ namespace JY.Utility
#endregion
public static void LogPLCData(string name, byte[] data)
{
if (data == null || data.Length == 0)
{
return;
}
string hexString = BitConverter.ToString(data).Replace("-", " ");
plcLog.Info($"{name} : {hexString}");
}
/// <summary>
/// 错误日志带异常
+47 -2
View File
@@ -1,4 +1,5 @@
using HslCommunication;
using HslCommunication.Core;
using HslCommunication.Profinet.Omron;
using System;
using System.Collections.Generic;
@@ -64,6 +65,8 @@ namespace PLCCommunication
/// 欧姆龙Fins协议
/// </summary>
public HslCommunication.Profinet.Omron.OmronCipNet omronCipNet = null;
public HslCommunication.Profinet.Omron.OmronFinsNet omronFinsNet = null;
/// <summary>
/// 是否链接PLC
/// </summary>
@@ -198,6 +201,10 @@ namespace PLCCommunication
InitializeComponent();
omronCipNet = new OmronCipNet();
omronCipNet.ConnectTimeOut = 2000;
omronFinsNet = new OmronFinsNet();
omronFinsNet.ConnectTimeOut = 2000;
PanelTest.Enabled = false;
}
@@ -336,6 +343,16 @@ namespace PLCCommunication
omronCipNet.Port = port;
omronCipNet.Slot = solt;
omronCipNet.ConnectClose();
omronFinsNet.IpAddress = address.ToString();
omronFinsNet.Port = 9600;
omronFinsNet.DA2 = 0;
omronFinsNet.ByteTransform.DataFormat = DataFormat.CDAB;
omronFinsNet.ByteTransform.IsStringReverseByteWord = true;
omronFinsNet.ConnectTimeOut = 2000;
omronFinsNet.ReceiveTimeOut = 2000;
omronFinsNet.ConnectClose();
try
{
omronCipNet.ConnectTimeOut = 2000;
@@ -347,6 +364,10 @@ namespace PLCCommunication
BtnConnect.Enabled = false;
str = StringResources.Language.ConnectedSuccess;
AddLog(lstRecv, 0, StringResources.Language.ConnectedSuccess);
omronFinsNet.ConnectTimeOut = 2000;
OperateResult connectFins = omronFinsNet.ConnectServer();
return true;
}
else
@@ -355,7 +376,6 @@ namespace PLCCommunication
str = StringResources.Language.ConnectedFailed;
AddLog(lstRecv,1, StringResources.Language.ConnectedFailed);
}
}
catch (Exception ex)
{
@@ -928,7 +948,32 @@ namespace PLCCommunication
if (IsConnected)
{
result = omronCipNet.Read(iAddr, lenght).Content;
AddLog(lstResWrite, 0, $"{iAddr} --> {result.ToString()}");
AddLog(lstResWrite, 0, $"{iAddr} --> {result?.ToString()}");
}
}
catch (Exception ex)
{
AddLog(lstResWrite, 2, $"{iAddr} --> {ex.Message}");
}
return result;
}
public byte[] ReadByteFins(string iAddr, ushort length)
{
byte[] result = null;
try
{
//string type = iAddr.Substring(0, 1);
//if (type != "D" && type != "R")
//{
// AddLog(lstSend, 2, "暂只支持D,R存储区");
//}
if (IsConnected)
{
result = omronFinsNet.Read(iAddr, length).Content;
OperateResult barray = omronFinsNet.ReadBool(iAddr, length);
AddLog(lstResWrite, 0, $"{iAddr} --> {result?.ToString()}");
}
}
catch (Exception ex)
+13
View File
@@ -0,0 +1,13 @@
ALTER TABLE S1270.dbo.BlankingData ADD CCDF1 float NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDF2 float NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDF3 float NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI1 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI2 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI3 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI4 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI5 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD CCDI6 int NULL;
ALTER TABLE S1270.dbo.BlankingData ADD InTime datetime NULL;
ALTER TABLE S1270.dbo.BlankingData ADD IsRepeat int NULL;
Binary file not shown.
File diff suppressed because it is too large Load Diff