From b09f326df4bb621107904aa26e70d50f0673cdb8 Mon Sep 17 00:00:00 2001 From: xiaoguo Date: Mon, 15 May 2023 23:08:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=AA=E6=B4=B2=E9=95=BF=E6=B1=9F=E7=A1=AC?= =?UTF-8?q?=E8=B4=A8=E5=90=88=E9=87=91=E5=B7=A5=E5=85=B7=E6=9C=89=E9=99=90?= =?UTF-8?q?=E5=85=AC=E5=8F=B8=20=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLCCommunication/Common/ModelTools.cs | 69 + PLCCommunication/Common/PLCResult.cs | 77 + PLCCommunication/IPLCCommunicationService.cs | 261 ++++ .../Impl/DeltaCommunicationService.cs | 487 ++++++ .../Impl/SiemensCommunicationService.cs | 489 ++++++ PLCCommunication/PLCCommunication.csproj | 56 + PLCCommunication/PLCCommunicationFactory.cs | 27 + PLCCommunication/Properties/AssemblyInfo.cs | 36 + ZWGXPICK_SYS.sln | 6 + ZWGXPICK_SYS/AndroidPLCChannel.cs | 95 ++ ZWGXPICK_SYS/Android_IO_Form.Designer.cs | 1382 +++++++++-------- ZWGXPICK_SYS/Android_IO_Form.cs | 32 +- ZWGXPICK_SYS/Dash_Change_Form.Designer.cs | 115 +- ZWGXPICK_SYS/Point_Data_Form.Designer.cs | 70 +- ZWGXPICK_SYS/Point_Data_Form.cs | 2 +- ZWGXPICK_SYS/ZWGXPICK_SYS.csproj | 6 + ZWGXPICK_SYS/frmMain.Designer.cs | 499 +++--- ZWGXPICK_SYS/frmMain.cs | 30 + ZWGXPICK_SYS/frmMain.resx | 6 +- 19 files changed, 2820 insertions(+), 925 deletions(-) create mode 100644 PLCCommunication/Common/ModelTools.cs create mode 100644 PLCCommunication/Common/PLCResult.cs create mode 100644 PLCCommunication/IPLCCommunicationService.cs create mode 100644 PLCCommunication/Impl/DeltaCommunicationService.cs create mode 100644 PLCCommunication/Impl/SiemensCommunicationService.cs create mode 100644 PLCCommunication/PLCCommunication.csproj create mode 100644 PLCCommunication/PLCCommunicationFactory.cs create mode 100644 PLCCommunication/Properties/AssemblyInfo.cs create mode 100644 ZWGXPICK_SYS/AndroidPLCChannel.cs diff --git a/PLCCommunication/Common/ModelTools.cs b/PLCCommunication/Common/ModelTools.cs new file mode 100644 index 0000000..49f01bb --- /dev/null +++ b/PLCCommunication/Common/ModelTools.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication.Common +{ + public class ModelTools + { + public static class PubClone + { + private static readonly Func cache = GetFunc(); + + private static Func GetFunc() + { + ParameterExpression parameterExpression = Expression.Parameter(typeof(TEntity), "p"); + List memberBindingList = new List(); + + foreach (var item in typeof(TResult).GetProperties()) + { + if (!item.CanWrite) + { + continue; + } + + var _Property = typeof(TEntity).GetProperty(item.Name); + if (_Property == null) + { + continue; + } + if (item.PropertyType.FullName != _Property.PropertyType.FullName) + { + continue; + } + + MemberExpression property = Expression.Property(parameterExpression, typeof(TEntity).GetProperty(item.Name)); + MemberBinding memberBinding = Expression.Bind(item, property); + memberBindingList.Add(memberBinding); + } + + MemberInitExpression memberInitExpression = Expression.MemberInit(Expression.New(typeof(TResult)), memberBindingList.ToArray()); + Expression> lambda = Expression.Lambda>(memberInitExpression, new ParameterExpression[] { parameterExpression }); + + return lambda.Compile(); + } + + public static TResult Trans(TEntity tIn) + { + if (tIn == null) + { + return default(TResult); + } + return cache(tIn); + } + + public static List TransList(List list) + { + List result = new List(); + foreach (var item in list) + { + result.Add(Trans(item)); + } + return result; + } + } + } +} diff --git a/PLCCommunication/Common/PLCResult.cs b/PLCCommunication/Common/PLCResult.cs new file mode 100644 index 0000000..a903132 --- /dev/null +++ b/PLCCommunication/Common/PLCResult.cs @@ -0,0 +1,77 @@ +using HslCommunication; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication.Common +{ + public class PLCResult + { + // + // 摘要: + // 指示本次操作是否成功。 + // Indicates whether this operation was successful. + public bool IsSuccess { get; set; } + + // + // 摘要: + // 具体的错误描述。 + // Specific error description. + public string Message { get; set; } + + + public int ErrorCode { get; set; } + + // + // 摘要: + // 实例化一个默认的结果对象 + public PLCResult() + { + } + + // + // 摘要: + // 使用指定的消息实例化一个默认的结果对象 + // + // 参数: + // msg: + // 错误消息 + public PLCResult(string msg) + { + Message = msg; + } + + // + // 摘要: + // 使用错误代码,消息文本来实例化对象 + // + // 参数: + // err: + // 错误代码 + // + // msg: + // 错误消息 + public PLCResult(int err, string msg) + { + ErrorCode = err; + Message = msg; + } + } + + public class PLCResult : PLCResult + { + public T Content { get; set; } + + public PLCResult() + { + + } + + public PLCResult(T content) + { + Content = content; + } + } +} diff --git a/PLCCommunication/IPLCCommunicationService.cs b/PLCCommunication/IPLCCommunicationService.cs new file mode 100644 index 0000000..9955faf --- /dev/null +++ b/PLCCommunication/IPLCCommunicationService.cs @@ -0,0 +1,261 @@ +using HslCommunication.Core.Address; +using HslCommunication; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using HslCommunication.Profinet.Siemens; +using PLCCommunication.Common; + +namespace PLCCommunication +{ + /// + /// PLC通信接口 + /// + public interface IPLCCommunicationService + { + /// + /// 是否已连接 + /// + bool isConnected { get; } + + #region 同步 + /// + /// 连接PLC(长连接) + /// + /// + /// + PLCResult Connection(string address, int port = 0); + + + /// + /// 关闭连接PLC(长连接) + /// + PLCResult ColseConnection(); + + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + PLCResult ReadBytes(string address, ushort length); + + /// + /// 读取指定地址的bool值 + /// + /// + /// + PLCResult ReadBool(string address); + + /// + /// 读取指定地址的byte值 + /// + /// + /// + PLCResult ReadByte(string address); + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + PLCResult ReadInt16(string address); + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + PLCResult ReadInt32(string address); + + /// + /// 读取指定地址的long值 + /// + /// + /// + PLCResult ReadLong(string address); + + /// + /// 读取指定地址的Float值 + /// + /// + PLCResult ReadFloat(string address); + + /// + /// 读取指定地址的double值 + /// + /// + PLCResult ReadDouble(string address); + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + PLCResult Write(string address, bool value); + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + PLCResult Write(string address, byte value); + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + PLCResult Write(string address, Int16 value); + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + PLCResult Write(string address, Int32 value); + + /// + /// 写入float值 + /// + /// 写入地址 + /// + PLCResult Write(string address, float value); + + /// + /// 写入double值 + /// + /// 写入地址 + /// + PLCResult Write(string address, double value); + + /// + /// 写入long值 + /// + /// 写入地址 + /// + PLCResult Write(string address, long value); + + #endregion + + #region 异步 + /// + /// 连接PLC(长连接) + /// + /// + /// + Task ConnectionAsync(string address, int port = 0); + + /// + /// 关闭连接PLC(长连接) + /// + Task ColseConnectionAsyn(); + + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + Task> ReadBytesAsync(string address, ushort length); + + /// + /// 读取指定地址的bool值 + /// + /// + /// + Task> ReadBoolAsync(string address); + + /// + /// 读取指定地址的byte值 + /// + /// + /// + Task> ReadByteAsync(string address); + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + Task> ReadInt16Async(string address); + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + Task> ReadInt32Async(string address); + + /// + /// 读取指定地址的long值 + /// + /// + /// + Task> ReadLongAsync(string address); + + /// + /// 读取指定地址的Float值 + /// + /// + Task> ReadFloatAsync(string address); + + /// + /// 读取指定地址的double值 + /// + /// + Task> ReadDoubleAsync(string address); + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, bool value); + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, byte value); + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, Int16 value); + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, Int32 value); + + /// + /// 写入float值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, float value); + + /// + /// 写入double值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, double value); + + /// + /// 写入long值 + /// + /// 写入地址 + /// + Task WriteAsync(string address, long value); + + #endregion + } +} diff --git a/PLCCommunication/Impl/DeltaCommunicationService.cs b/PLCCommunication/Impl/DeltaCommunicationService.cs new file mode 100644 index 0000000..866e4cd --- /dev/null +++ b/PLCCommunication/Impl/DeltaCommunicationService.cs @@ -0,0 +1,487 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using PLCCommunication; +using HslCommunication.Profinet.Siemens; +using HslCommunication; +using PLCCommunication.Common; +using HslCommunication.Profinet.Delta; + +namespace PLCCommunication.Impl +{ + /// + /// PLC通信服务 SiemensS7 smart200 实现 + /// + internal class DeltaCommunicationService : IPLCCommunicationService + { + private DeltaTcpNet deltaTcpNet = null; + + /// + /// 是否已连接 + /// + public bool isConnected { get; private set; } + + public DeltaCommunicationService() + { + deltaTcpNet = new DeltaTcpNet(); + deltaTcpNet.Series = DeltaSeries.AS; + deltaTcpNet.ConnectTimeOut = 3000; + } + + #region 同步 + /// + /// 连接PLC(长连接) + /// + /// + /// + public PLCResult Connection(string address, int port = 0) + { + deltaTcpNet.IpAddress = address; + if (port > 0) + { + deltaTcpNet.Port = port; + } + var operateResult = deltaTcpNet.ConnectServer(); + var result = ConvertResult(operateResult); + if (result.IsSuccess) + { + isConnected = true; + } + return result; + } + + /// + /// 关闭连接PLC(长连接) + /// + public PLCResult ColseConnection() + { + var operateResult = deltaTcpNet.ConnectClose(); + var result = ConvertResult(operateResult); + if (result.IsSuccess) + { + isConnected = false; + } + return result; + } + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + public PLCResult ReadBytes(string address, ushort length) + { + var operateResult = deltaTcpNet.Read(address, length); + var result = ConvertResult(operateResult); + return result; + } + /// + /// 读取指定地址的bool值 + /// + /// + /// + public PLCResult ReadBool(string address) + { + var operateResult = deltaTcpNet.ReadBool(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的byte值 + /// + /// + /// + public PLCResult ReadByte(string address) + { + throw new NotImplementedException(); + } + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + public PLCResult ReadInt16(string address) + { + var operateResult = deltaTcpNet.ReadInt16(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + public PLCResult ReadInt32(string address) + { + var operateResult = deltaTcpNet.ReadInt32(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的long值 + /// + /// + /// + public PLCResult ReadLong(string address) + { + var operateResult = deltaTcpNet.ReadInt64(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Float值 + /// + /// + public PLCResult ReadFloat(string address) + { + var operateResult = deltaTcpNet.ReadFloat(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的double值 + /// + /// + public PLCResult ReadDouble(string address) + { + var operateResult = deltaTcpNet.ReadDouble(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, bool value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, byte value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + + } + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, Int16 value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, Int32 value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入float值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, float value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入double值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, double value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入long值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, long value) + { + var operateResult = deltaTcpNet.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + #endregion + + #region 异步 + /// + /// 连接PLC(长连接) + /// + /// + /// + public async Task ConnectionAsync(string address, int port = 0) + { + deltaTcpNet.IpAddress = address; + if (port > 0) + { + deltaTcpNet.Port = port; + } + var operateResult = await deltaTcpNet.ConnectServerAsync(); + var result = ConvertResult(operateResult); + if (operateResult.IsSuccess) + { + isConnected = true; + } + return result; + } + + /// + /// 关闭连接PLC(长连接) + /// + public async Task ColseConnectionAsyn() + { + var operateResult = await deltaTcpNet.ConnectCloseAsync(); + var result = ConvertResult(operateResult); + if (operateResult.IsSuccess) + { + isConnected = false; + } + return result; + } + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + public async Task> ReadBytesAsync(string address, ushort length) + { + var operateResult = await deltaTcpNet.ReadAsync(address, length); + var result = ConvertResult(operateResult); + return result; + } + /// + /// 读取指定地址的bool值 + /// + /// + /// + public async Task> ReadBoolAsync(string address) + { + var operateResult = await deltaTcpNet.ReadBoolAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的byte值 + /// + /// + /// + public async Task> ReadByteAsync(string address) + { + throw new NotImplementedException(); + } + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + public async Task> ReadInt16Async(string address) + { + var operateResult = await deltaTcpNet.ReadInt16Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + public async Task> ReadInt32Async(string address) + { + var operateResult = await deltaTcpNet.ReadInt32Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的long值 + /// + /// + /// + public async Task> ReadLongAsync(string address) + { + var operateResult = await deltaTcpNet.ReadInt64Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Float值 + /// + /// + public async Task> ReadFloatAsync(string address) + { + var operateResult = await deltaTcpNet.ReadFloatAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的double值 + /// + /// + public async Task> ReadDoubleAsync(string address) + { + var operateResult = await deltaTcpNet.ReadDoubleAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, bool value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, byte value) + { + + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, Int16 value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, Int32 value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入float值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, float value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入double值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, double value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入long值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, long value) + { + var operateResult = await deltaTcpNet.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + #endregion + + + /// + /// 转换 result (将框架结果结构转换成当前程序结果结构) + /// + /// + /// + + private PLCResult ConvertResult(OperateResult result) + { + var retResult = ModelTools.PubClone.Trans(result); + return retResult; + } + + /// + /// 转换 result (将框架结果结构转换成当前程序结果结构) + /// + /// + /// + + private PLCResult ConvertResult(OperateResult result) + { + var retResult = ModelTools.PubClone, PLCResult>.Trans(result); + retResult.Content = result.Content; + return retResult; + } + } +} diff --git a/PLCCommunication/Impl/SiemensCommunicationService.cs b/PLCCommunication/Impl/SiemensCommunicationService.cs new file mode 100644 index 0000000..27c9cb0 --- /dev/null +++ b/PLCCommunication/Impl/SiemensCommunicationService.cs @@ -0,0 +1,489 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using PLCCommunication; +using HslCommunication.Profinet.Siemens; +using HslCommunication; +using PLCCommunication.Common; + +namespace PLCCommunication.Impl +{ + /// + /// PLC通信服务 SiemensS7 smart200 实现 + /// + internal class SiemensCommunicationService : IPLCCommunicationService + { + private SiemensS7Net siemensS7Net = null; + + /// + /// 是否已连接 + /// + public bool isConnected { get; private set; } + + public SiemensCommunicationService() + { + siemensS7Net = new SiemensS7Net(SiemensPLCS.S200Smart); + siemensS7Net.ConnectTimeOut = 3000; + } + + #region 同步 + /// + /// 连接PLC(长连接) + /// + /// + /// + public PLCResult Connection(string address, int port = 0) + { + siemensS7Net.IpAddress = address; + if (port > 0) + { + siemensS7Net.Port = port; + } + var operateResult = siemensS7Net.ConnectServer(); + var result = ConvertResult(operateResult); + if (result.IsSuccess) + { + isConnected = true; + } + return result; + } + + /// + /// 关闭连接PLC(长连接) + /// + public PLCResult ColseConnection() + { + var operateResult = siemensS7Net.ConnectClose(); + var result = ConvertResult(operateResult); + if (result.IsSuccess) + { + isConnected = false; + } + return result; + } + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + public PLCResult ReadBytes(string address, ushort length) + { + var operateResult = siemensS7Net.Read(address, length); + var result = ConvertResult(operateResult); + return result; + } + /// + /// 读取指定地址的bool值 + /// + /// + /// + public PLCResult ReadBool(string address) + { + var operateResult = siemensS7Net.ReadBool(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的byte值 + /// + /// + /// + public PLCResult ReadByte(string address) + { + var operateResult = siemensS7Net.ReadByte(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + public PLCResult ReadInt16(string address) + { + var operateResult = siemensS7Net.ReadInt16(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + public PLCResult ReadInt32(string address) + { + var operateResult = siemensS7Net.ReadInt32(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的long值 + /// + /// + /// + public PLCResult ReadLong(string address) + { + var operateResult = siemensS7Net.ReadInt64(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Float值 + /// + /// + public PLCResult ReadFloat(string address) + { + var operateResult = siemensS7Net.ReadFloat(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的double值 + /// + /// + public PLCResult ReadDouble(string address) + { + var operateResult = siemensS7Net.ReadDouble(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, bool value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, byte value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + + } + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, Int16 value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, Int32 value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入float值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, float value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入double值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, double value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入long值 + /// + /// 写入地址 + /// + public PLCResult Write(string address, long value) + { + var operateResult = siemensS7Net.Write(address, value); + var result = ConvertResult(operateResult); + return result; + } + + #endregion + + #region 异步 + /// + /// 连接PLC(长连接) + /// + /// + /// + public async Task ConnectionAsync(string address, int port = 0) + { + siemensS7Net.IpAddress = address; + if (port > 0) + { + siemensS7Net.Port = port; + } + var operateResult = await siemensS7Net.ConnectServerAsync(); + var result = ConvertResult(operateResult); + if (operateResult.IsSuccess) + { + isConnected = true; + } + return result; + } + + /// + /// 关闭连接PLC(长连接) + /// + public async Task ColseConnectionAsyn() + { + var operateResult = await siemensS7Net.ConnectCloseAsync(); + var result = ConvertResult(operateResult); + if (operateResult.IsSuccess) + { + isConnected = false; + } + return result; + } + /// + /// 读取指定地址的byte[]值 + /// + /// + /// + public async Task> ReadBytesAsync(string address, ushort length) + { + var operateResult = await siemensS7Net.ReadAsync(address, length); + var result = ConvertResult(operateResult); + return result; + } + /// + /// 读取指定地址的bool值 + /// + /// + /// + public async Task> ReadBoolAsync(string address) + { + var operateResult = await siemensS7Net.ReadBoolAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的byte值 + /// + /// + /// + public async Task> ReadByteAsync(string address) + { + var operateResult = await siemensS7Net.ReadByteAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int16值 + /// + /// + /// + public async Task> ReadInt16Async(string address) + { + var operateResult = await siemensS7Net.ReadInt16Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Int32值 + /// + /// + /// + public async Task> ReadInt32Async(string address) + { + var operateResult = await siemensS7Net.ReadInt32Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的long值 + /// + /// + /// + public async Task> ReadLongAsync(string address) + { + var operateResult = await siemensS7Net.ReadInt64Async(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的Float值 + /// + /// + public async Task> ReadFloatAsync(string address) + { + var operateResult = await siemensS7Net.ReadFloatAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 读取指定地址的double值 + /// + /// + public async Task> ReadDoubleAsync(string address) + { + var operateResult = await siemensS7Net.ReadDoubleAsync(address); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入bool值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, bool value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入byte值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, byte value) + { + + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int16值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, Int16 value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入Int32值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, Int32 value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入float值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, float value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入double值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, double value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + /// + /// 写入long值 + /// + /// 写入地址 + /// + public async Task WriteAsync(string address, long value) + { + var operateResult = await siemensS7Net.WriteAsync(address, value); + var result = ConvertResult(operateResult); + return result; + } + + #endregion + + + /// + /// 转换 result (将框架结果结构转换成当前程序结果结构) + /// + /// + /// + + private PLCResult ConvertResult(OperateResult result) + { + var retResult = ModelTools.PubClone.Trans(result); + return retResult; + } + + /// + /// 转换 result (将框架结果结构转换成当前程序结果结构) + /// + /// + /// + + private PLCResult ConvertResult(OperateResult result) + { + var retResult = ModelTools.PubClone, PLCResult>.Trans(result); + retResult.Content = result.Content; + return retResult; + } + } +} diff --git a/PLCCommunication/PLCCommunication.csproj b/PLCCommunication/PLCCommunication.csproj new file mode 100644 index 0000000..b46ec10 --- /dev/null +++ b/PLCCommunication/PLCCommunication.csproj @@ -0,0 +1,56 @@ + + + + + Debug + AnyCPU + {0A7F9893-61CC-4188-8285-1E6C0B916B1A} + Library + Properties + PLCCommunication + PLCCommunication + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\HslCommunication.11.0.6.0\HslCommunication.dll + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PLCCommunication/PLCCommunicationFactory.cs b/PLCCommunication/PLCCommunicationFactory.cs new file mode 100644 index 0000000..acc5590 --- /dev/null +++ b/PLCCommunication/PLCCommunicationFactory.cs @@ -0,0 +1,27 @@ +using PLCCommunication.Impl; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PLCCommunication +{ + public static class PLCCommunicationFactory + { + public static IPLCCommunicationService pLCCommunicationService = null; + public static IPLCCommunicationService Instance + { + get + { + if (pLCCommunicationService == null) + { + pLCCommunicationService = new DeltaCommunicationService(); + pLCCommunicationService.Connection("192.168.0.50",502); + } + return pLCCommunicationService; + } + } + } +} diff --git a/PLCCommunication/Properties/AssemblyInfo.cs b/PLCCommunication/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6f8b9c3 --- /dev/null +++ b/PLCCommunication/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("PLCCommunication")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PLCCommunication")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("0a7f9893-61cc-4188-8285-1e6c0b916b1a")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ZWGXPICK_SYS.sln b/ZWGXPICK_SYS.sln index a0f715d..27dec2e 100644 --- a/ZWGXPICK_SYS.sln +++ b/ZWGXPICK_SYS.sln @@ -19,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZWGXPICK_SYS.SerialPort", " EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test_serialPort", "test_serialPort\test_serialPort.csproj", "{F3D367EA-BA7F-44C9-91CD-409AA53C024B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLCCommunication", "PLCCommunication\PLCCommunication.csproj", "{0A7F9893-61CC-4188-8285-1E6C0B916B1A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,6 +59,10 @@ Global {F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Debug|Any CPU.Build.0 = Debug|Any CPU {F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Release|Any CPU.ActiveCfg = Release|Any CPU {F3D367EA-BA7F-44C9-91CD-409AA53C024B}.Release|Any CPU.Build.0 = Release|Any CPU + {0A7F9893-61CC-4188-8285-1E6C0B916B1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A7F9893-61CC-4188-8285-1E6C0B916B1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A7F9893-61CC-4188-8285-1E6C0B916B1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A7F9893-61CC-4188-8285-1E6C0B916B1A}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ZWGXPICK_SYS/AndroidPLCChannel.cs b/ZWGXPICK_SYS/AndroidPLCChannel.cs new file mode 100644 index 0000000..988439b --- /dev/null +++ b/ZWGXPICK_SYS/AndroidPLCChannel.cs @@ -0,0 +1,95 @@ +//using EPSON_SOCKET; + +//using PLCCommunication; + +//using System; +//using System.Collections.Generic; +//using System.Linq; +//using System.Text; +//using System.Threading.Tasks; + +//namespace ZWGXPICK_SYS +//{ +// internal static class AndroidPLCChannel +// { +// private static List> pointPapping; + +// static AndroidPLCChannel() +// { +// pointPapping = new List> +// { +// new KeyValuePair("RO589", "M5589"), +// new KeyValuePair("RO590", "M590"), +// new KeyValuePair("RO591", "M591"), +// new KeyValuePair("RO592", "M592"), +// new KeyValuePair("RO593", "M593"), +// new KeyValuePair("RO594", "M594"), +// new KeyValuePair("RO595", "M595"), +// new KeyValuePair("RO596", "M596"), +// new KeyValuePair("RO597", "M597"), +// new KeyValuePair("RO598", "M598"), +// new KeyValuePair("RO599", "M599"), +// new KeyValuePair("RO600", "M600"), +// new KeyValuePair("RO601", "M601"), +// new KeyValuePair("RO602", "M602"), +// new KeyValuePair("RO603", "M603"), +// new KeyValuePair("RO604", "M604"), +// new KeyValuePair("RO605", "M605"), +// new KeyValuePair("RO606", "M606"), +// new KeyValuePair("RO607", "M607"), +// new KeyValuePair("RO608", "M608"), +// new KeyValuePair("RO609", "M609"), +// new KeyValuePair("RO610", "M610"), +// new KeyValuePair("RO611", "M611"), +// new KeyValuePair("RO612", "M612") +// }; +// } + +// public static List> PointPapping +// { +// get +// { +// return pointPapping; +// } +// } + +// // 接收到数据的响应函数. +// public static void EpsonSocketReceiveData(object sender, EventArgs e) +// { +// EventArgsCmd cmd = (EventArgsCmd)e; +// if (cmd == null) return; +// String str = cmd.Str; +// String[] result = str.Split(','); +// switch (cmd.Cmd) +// { +// case "execute": +// { +// if (str.IndexOf("execute,ro") >= 0) +// { +// var code = result[1].Split('='); +// if (code.Length >= 2) +// { +// SendPLC(code[0], code[1]); +// } +// } +// } +// break; +// default: +// break; +// } +// } + +// public static void SendPLC(string point,string value) +// { +// ////获取映射的点位 +// //var pointMapper = pointPapping.Where(f => f.Key == point.ToUpper()).FirstOrDefault(); +// ////获取值 +// //int val = 0; +// //int.TryParse(value, out val); +// //if (!string.IsNullOrEmpty(pointMapper.Value)) +// //{ +// // var result = PLCCommunicationFactory.Instance.Write(pointMapper.Value, val == 0 ? false : true); +// //} +// } +// } +//} diff --git a/ZWGXPICK_SYS/Android_IO_Form.Designer.cs b/ZWGXPICK_SYS/Android_IO_Form.Designer.cs index 9fb9462..e75d424 100644 --- a/ZWGXPICK_SYS/Android_IO_Form.Designer.cs +++ b/ZWGXPICK_SYS/Android_IO_Form.Designer.cs @@ -72,30 +72,30 @@ this.panel1 = new System.Windows.Forms.Panel(); this.label3 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); - this.RI23 = new System.Windows.Forms.Label(); - this.RI22 = new System.Windows.Forms.Label(); - this.RI20 = new System.Windows.Forms.Label(); - this.RI21 = new System.Windows.Forms.Label(); - this.RI19 = new System.Windows.Forms.Label(); - this.RI18 = new System.Windows.Forms.Label(); - this.RI17 = new System.Windows.Forms.Label(); - this.RI11 = new System.Windows.Forms.Label(); - this.RI5 = new System.Windows.Forms.Label(); - this.RI16 = new System.Windows.Forms.Label(); - this.RI10 = new System.Windows.Forms.Label(); - this.RI4 = new System.Windows.Forms.Label(); - this.RI14 = new System.Windows.Forms.Label(); - this.RI8 = new System.Windows.Forms.Label(); - this.RI15 = new System.Windows.Forms.Label(); - this.RI2 = new System.Windows.Forms.Label(); - this.RI9 = new System.Windows.Forms.Label(); - this.RI13 = new System.Windows.Forms.Label(); - this.RI3 = new System.Windows.Forms.Label(); - this.RI12 = new System.Windows.Forms.Label(); - this.RI7 = new System.Windows.Forms.Label(); - this.RI6 = new System.Windows.Forms.Label(); - this.RI1 = new System.Windows.Forms.Label(); - this.RI0 = new System.Windows.Forms.Label(); + this.RI582 = new System.Windows.Forms.Label(); + this.RI581 = new System.Windows.Forms.Label(); + this.RI579 = new System.Windows.Forms.Label(); + this.RI580 = new System.Windows.Forms.Label(); + this.RI578 = new System.Windows.Forms.Label(); + this.RI577 = new System.Windows.Forms.Label(); + this.RI576 = new System.Windows.Forms.Label(); + this.RI570 = new System.Windows.Forms.Label(); + this.RI564 = new System.Windows.Forms.Label(); + this.RI575 = new System.Windows.Forms.Label(); + this.RI569 = new System.Windows.Forms.Label(); + this.RI563 = new System.Windows.Forms.Label(); + this.RI573 = new System.Windows.Forms.Label(); + this.RI567 = new System.Windows.Forms.Label(); + this.RI574 = new System.Windows.Forms.Label(); + this.RI561 = new System.Windows.Forms.Label(); + this.RI568 = new System.Windows.Forms.Label(); + this.RI572 = new System.Windows.Forms.Label(); + this.RI562 = new System.Windows.Forms.Label(); + this.RI571 = new System.Windows.Forms.Label(); + this.RI566 = new System.Windows.Forms.Label(); + this.RI565 = new System.Windows.Forms.Label(); + this.RI560 = new System.Windows.Forms.Label(); + this.RI559 = new System.Windows.Forms.Label(); this.标签54 = new PCHMI.标签(this.components); this.标签55 = new PCHMI.标签(this.components); this.标签56 = new PCHMI.标签(this.components); @@ -106,25 +106,33 @@ this.标签64 = new PCHMI.标签(this.components); this.label1 = new System.Windows.Forms.Label(); this.panel3 = new System.Windows.Forms.Panel(); - this.RO15 = new System.Windows.Forms.CheckBox(); - this.RO11 = new System.Windows.Forms.CheckBox(); - this.RO7 = new System.Windows.Forms.CheckBox(); - this.RO3 = new System.Windows.Forms.CheckBox(); - this.RO14 = new System.Windows.Forms.CheckBox(); - this.RO13 = new System.Windows.Forms.CheckBox(); - this.RO10 = new System.Windows.Forms.CheckBox(); - this.RO9 = new System.Windows.Forms.CheckBox(); - this.RO6 = new System.Windows.Forms.CheckBox(); - this.RO12 = new System.Windows.Forms.CheckBox(); - this.RO5 = new System.Windows.Forms.CheckBox(); - this.RO8 = new System.Windows.Forms.CheckBox(); - this.RO2 = new System.Windows.Forms.CheckBox(); - this.RO4 = new System.Windows.Forms.CheckBox(); - this.RO1 = new System.Windows.Forms.CheckBox(); - this.RO0 = new System.Windows.Forms.CheckBox(); + this.RO604 = new System.Windows.Forms.CheckBox(); + this.RO600 = new System.Windows.Forms.CheckBox(); + this.RO596 = new System.Windows.Forms.CheckBox(); + this.RO592 = new System.Windows.Forms.CheckBox(); + this.RO603 = new System.Windows.Forms.CheckBox(); + this.RO602 = new System.Windows.Forms.CheckBox(); + this.RO599 = new System.Windows.Forms.CheckBox(); + this.RO598 = new System.Windows.Forms.CheckBox(); + this.RO595 = new System.Windows.Forms.CheckBox(); + this.RO601 = new System.Windows.Forms.CheckBox(); + this.RO594 = new System.Windows.Forms.CheckBox(); + this.RO597 = new System.Windows.Forms.CheckBox(); + this.RO591 = new System.Windows.Forms.CheckBox(); + this.RO593 = new System.Windows.Forms.CheckBox(); + this.RO590 = new System.Windows.Forms.CheckBox(); + this.RO589 = new System.Windows.Forms.CheckBox(); this.label2 = new System.Windows.Forms.Label(); this.btnrefresh = new System.Windows.Forms.Button(); this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.RO606 = new System.Windows.Forms.CheckBox(); + this.RO605 = new System.Windows.Forms.CheckBox(); + this.RO612 = new System.Windows.Forms.CheckBox(); + this.RO611 = new System.Windows.Forms.CheckBox(); + this.RO610 = new System.Windows.Forms.CheckBox(); + this.RO609 = new System.Windows.Forms.CheckBox(); + this.RO608 = new System.Windows.Forms.CheckBox(); + this.RO607 = new System.Windows.Forms.CheckBox(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); @@ -152,30 +160,30 @@ // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.panel2.Controls.Add(this.RI23); - this.panel2.Controls.Add(this.RI22); - this.panel2.Controls.Add(this.RI20); - this.panel2.Controls.Add(this.RI21); - this.panel2.Controls.Add(this.RI19); - this.panel2.Controls.Add(this.RI18); - this.panel2.Controls.Add(this.RI17); - this.panel2.Controls.Add(this.RI11); - this.panel2.Controls.Add(this.RI5); - this.panel2.Controls.Add(this.RI16); - this.panel2.Controls.Add(this.RI10); - this.panel2.Controls.Add(this.RI4); - this.panel2.Controls.Add(this.RI14); - this.panel2.Controls.Add(this.RI8); - this.panel2.Controls.Add(this.RI15); - this.panel2.Controls.Add(this.RI2); - this.panel2.Controls.Add(this.RI9); - this.panel2.Controls.Add(this.RI13); - this.panel2.Controls.Add(this.RI3); - this.panel2.Controls.Add(this.RI12); - this.panel2.Controls.Add(this.RI7); - this.panel2.Controls.Add(this.RI6); - this.panel2.Controls.Add(this.RI1); - this.panel2.Controls.Add(this.RI0); + this.panel2.Controls.Add(this.RI582); + this.panel2.Controls.Add(this.RI581); + this.panel2.Controls.Add(this.RI579); + this.panel2.Controls.Add(this.RI580); + this.panel2.Controls.Add(this.RI578); + this.panel2.Controls.Add(this.RI577); + this.panel2.Controls.Add(this.RI576); + this.panel2.Controls.Add(this.RI570); + this.panel2.Controls.Add(this.RI564); + this.panel2.Controls.Add(this.RI575); + this.panel2.Controls.Add(this.RI569); + this.panel2.Controls.Add(this.RI563); + this.panel2.Controls.Add(this.RI573); + this.panel2.Controls.Add(this.RI567); + this.panel2.Controls.Add(this.RI574); + this.panel2.Controls.Add(this.RI561); + this.panel2.Controls.Add(this.RI568); + this.panel2.Controls.Add(this.RI572); + this.panel2.Controls.Add(this.RI562); + this.panel2.Controls.Add(this.RI571); + this.panel2.Controls.Add(this.RI566); + this.panel2.Controls.Add(this.RI565); + this.panel2.Controls.Add(this.RI560); + this.panel2.Controls.Add(this.RI559); this.panel2.Controls.Add(this.标签54); this.panel2.Controls.Add(this.标签55); this.panel2.Controls.Add(this.标签56); @@ -190,270 +198,270 @@ this.panel2.Size = new System.Drawing.Size(831, 179); this.panel2.TabIndex = 194; // - // RI23 - // - this.RI23.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI23.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI23.Location = new System.Drawing.Point(695, 134); - this.RI23.Name = "RI23"; - this.RI23.Size = new System.Drawing.Size(125, 27); - this.RI23.TabIndex = 191; - this.RI23.Text = "RI23"; - this.RI23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI22 - // - this.RI22.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI22.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI22.Location = new System.Drawing.Point(557, 134); - this.RI22.Name = "RI22"; - this.RI22.Size = new System.Drawing.Size(125, 27); - this.RI22.TabIndex = 192; - this.RI22.Text = "RI22"; - this.RI22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI20 - // - this.RI20.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI20.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI20.Location = new System.Drawing.Point(281, 134); - this.RI20.Name = "RI20"; - this.RI20.Size = new System.Drawing.Size(125, 27); - this.RI20.TabIndex = 193; - this.RI20.Text = "RI20"; - this.RI20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI21 - // - this.RI21.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI21.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI21.Location = new System.Drawing.Point(419, 134); - this.RI21.Name = "RI21"; - this.RI21.Size = new System.Drawing.Size(125, 27); - this.RI21.TabIndex = 194; - this.RI21.Text = "RI21"; - this.RI21.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI19 - // - this.RI19.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI19.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI19.Location = new System.Drawing.Point(143, 134); - this.RI19.Name = "RI19"; - this.RI19.Size = new System.Drawing.Size(125, 27); - this.RI19.TabIndex = 195; - this.RI19.Text = "RI19停止"; - this.RI19.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI18 - // - this.RI18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI18.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI18.Location = new System.Drawing.Point(5, 134); - this.RI18.Name = "RI18"; - this.RI18.Size = new System.Drawing.Size(125, 27); - this.RI18.TabIndex = 196; - this.RI18.Text = "RI18PLC报警"; - this.RI18.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI17 - // - this.RI17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI17.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI17.Location = new System.Drawing.Point(695, 103); - this.RI17.Name = "RI17"; - this.RI17.Size = new System.Drawing.Size(125, 27); - this.RI17.TabIndex = 190; - this.RI17.Text = "RI17坯件旋转到位"; - this.RI17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI11 - // - this.RI11.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI11.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI11.Location = new System.Drawing.Point(695, 74); - this.RI11.Name = "RI11"; - this.RI11.Size = new System.Drawing.Size(125, 27); - this.RI11.TabIndex = 190; - this.RI11.Text = "RI11摆舟就绪"; - this.RI11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI5 - // - this.RI5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI5.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI5.Location = new System.Drawing.Point(695, 44); - this.RI5.Name = "RI5"; - this.RI5.Size = new System.Drawing.Size(125, 27); - this.RI5.TabIndex = 190; - this.RI5.Text = "RI5"; - this.RI5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI16 - // - this.RI16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI16.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI16.Location = new System.Drawing.Point(557, 103); - this.RI16.Name = "RI16"; - this.RI16.Size = new System.Drawing.Size(125, 27); - this.RI16.TabIndex = 190; - this.RI16.Text = "RI16坯件旋转原位"; - this.RI16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI10 - // - this.RI10.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI10.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI10.Location = new System.Drawing.Point(557, 74); - this.RI10.Name = "RI10"; - this.RI10.Size = new System.Drawing.Size(125, 27); - this.RI10.TabIndex = 190; - this.RI10.Text = "RI10允许取件"; - this.RI10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI4 - // - this.RI4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI4.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI4.Location = new System.Drawing.Point(557, 44); - this.RI4.Name = "RI4"; - this.RI4.Size = new System.Drawing.Size(125, 27); - this.RI4.TabIndex = 190; - this.RI4.Text = "RI4"; - this.RI4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI14 - // - this.RI14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI14.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI14.Location = new System.Drawing.Point(281, 103); - this.RI14.Name = "RI14"; - this.RI14.Size = new System.Drawing.Size(125, 27); - this.RI14.TabIndex = 190; - this.RI14.Text = "RI14夹具旋转原位"; - this.RI14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI8 - // - this.RI8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI8.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI8.Location = new System.Drawing.Point(281, 74); - this.RI8.Name = "RI8"; - this.RI8.Size = new System.Drawing.Size(125, 27); - this.RI8.TabIndex = 190; - this.RI8.Text = "RI8压机联机"; - this.RI8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI15 - // - this.RI15.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI15.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI15.Location = new System.Drawing.Point(419, 103); - this.RI15.Name = "RI15"; - this.RI15.Size = new System.Drawing.Size(125, 27); - this.RI15.TabIndex = 190; - this.RI15.Text = "RI15夹具旋转到位"; - this.RI15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI2 - // - this.RI2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI2.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI2.Location = new System.Drawing.Point(281, 44); - this.RI2.Name = "RI2"; - this.RI2.Size = new System.Drawing.Size(125, 27); - this.RI2.TabIndex = 190; - this.RI2.Text = "RI2"; - this.RI2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI9 - // - this.RI9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI9.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI9.Location = new System.Drawing.Point(419, 74); - this.RI9.Name = "RI9"; - this.RI9.Size = new System.Drawing.Size(125, 27); - this.RI9.TabIndex = 190; - this.RI9.Text = "RI9荷重NG"; - this.RI9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI13 - // - this.RI13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI13.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI13.Location = new System.Drawing.Point(143, 103); - this.RI13.Name = "RI13"; - this.RI13.Size = new System.Drawing.Size(125, 27); - this.RI13.TabIndex = 190; - this.RI13.Text = "RI13坯件检测"; - this.RI13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI3 - // - this.RI3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI3.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI3.Location = new System.Drawing.Point(419, 44); - this.RI3.Name = "RI3"; - this.RI3.Size = new System.Drawing.Size(125, 27); - this.RI3.TabIndex = 190; - this.RI3.Text = "RI3"; - this.RI3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI12 - // - this.RI12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI12.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI12.Location = new System.Drawing.Point(5, 103); - this.RI12.Name = "RI12"; - this.RI12.Size = new System.Drawing.Size(125, 27); - this.RI12.TabIndex = 190; - this.RI12.Text = "RI12真空检测"; - this.RI12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI7 - // - this.RI7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI7.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI7.Location = new System.Drawing.Point(143, 74); - this.RI7.Name = "RI7"; - this.RI7.Size = new System.Drawing.Size(125, 27); - this.RI7.TabIndex = 190; - this.RI7.Text = "RI7"; - this.RI7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI6 - // - this.RI6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI6.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI6.Location = new System.Drawing.Point(5, 74); - this.RI6.Name = "RI6"; - this.RI6.Size = new System.Drawing.Size(125, 27); - this.RI6.TabIndex = 190; - this.RI6.Text = "RI6"; - this.RI6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI1 - // - this.RI1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI1.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI1.Location = new System.Drawing.Point(143, 44); - this.RI1.Name = "RI1"; - this.RI1.Size = new System.Drawing.Size(125, 27); - this.RI1.TabIndex = 190; - this.RI1.Text = "RI1"; - this.RI1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // RI0 - // - this.RI0.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); - this.RI0.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.RI0.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RI0.Location = new System.Drawing.Point(5, 44); - this.RI0.Name = "RI0"; - this.RI0.Size = new System.Drawing.Size(125, 27); - this.RI0.TabIndex = 190; - this.RI0.Text = "RI0"; - this.RI0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // RI582 + // + this.RI582.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI582.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI582.Location = new System.Drawing.Point(695, 134); + this.RI582.Name = "RI582"; + this.RI582.Size = new System.Drawing.Size(125, 27); + this.RI582.TabIndex = 191; + this.RI582.Text = "RI582"; + this.RI582.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI581 + // + this.RI581.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI581.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI581.Location = new System.Drawing.Point(557, 134); + this.RI581.Name = "RI581"; + this.RI581.Size = new System.Drawing.Size(125, 27); + this.RI581.TabIndex = 192; + this.RI581.Text = "RI581"; + this.RI581.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI579 + // + this.RI579.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI579.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI579.Location = new System.Drawing.Point(281, 134); + this.RI579.Name = "RI579"; + this.RI579.Size = new System.Drawing.Size(125, 27); + this.RI579.TabIndex = 193; + this.RI579.Text = "RI579"; + this.RI579.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI580 + // + this.RI580.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI580.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI580.Location = new System.Drawing.Point(419, 134); + this.RI580.Name = "RI580"; + this.RI580.Size = new System.Drawing.Size(125, 27); + this.RI580.TabIndex = 194; + this.RI580.Text = "RI580"; + this.RI580.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI578 + // + this.RI578.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI578.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI578.Location = new System.Drawing.Point(143, 134); + this.RI578.Name = "RI578"; + this.RI578.Size = new System.Drawing.Size(125, 27); + this.RI578.TabIndex = 195; + this.RI578.Text = "RI578"; + this.RI578.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI577 + // + this.RI577.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI577.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI577.Location = new System.Drawing.Point(5, 134); + this.RI577.Name = "RI577"; + this.RI577.Size = new System.Drawing.Size(125, 27); + this.RI577.TabIndex = 196; + this.RI577.Text = "RI577"; + this.RI577.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI576 + // + this.RI576.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI576.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI576.Location = new System.Drawing.Point(695, 103); + this.RI576.Name = "RI576"; + this.RI576.Size = new System.Drawing.Size(125, 27); + this.RI576.TabIndex = 190; + this.RI576.Text = "RI576"; + this.RI576.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI570 + // + this.RI570.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI570.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI570.Location = new System.Drawing.Point(695, 74); + this.RI570.Name = "RI570"; + this.RI570.Size = new System.Drawing.Size(125, 27); + this.RI570.TabIndex = 190; + this.RI570.Text = "真空度检测"; + this.RI570.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI564 + // + this.RI564.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI564.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI564.Location = new System.Drawing.Point(695, 44); + this.RI564.Name = "RI564"; + this.RI564.Size = new System.Drawing.Size(125, 27); + this.RI564.TabIndex = 190; + this.RI564.Text = "SetPowerHigh"; + this.RI564.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI575 + // + this.RI575.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI575.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI575.Location = new System.Drawing.Point(557, 103); + this.RI575.Name = "RI575"; + this.RI575.Size = new System.Drawing.Size(125, 27); + this.RI575.TabIndex = 190; + this.RI575.Text = "RI575"; + this.RI575.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI569 + // + this.RI569.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI569.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI569.Location = new System.Drawing.Point(557, 74); + this.RI569.Name = "RI569"; + this.RI569.Size = new System.Drawing.Size(125, 27); + this.RI569.TabIndex = 190; + this.RI569.Text = "压机产品不合格"; + this.RI569.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI563 + // + this.RI563.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI563.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI563.Location = new System.Drawing.Point(557, 44); + this.RI563.Name = "RI563"; + this.RI563.Size = new System.Drawing.Size(125, 27); + this.RI563.TabIndex = 190; + this.RI563.Text = "Reset"; + this.RI563.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI573 + // + this.RI573.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI573.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI573.Location = new System.Drawing.Point(281, 103); + this.RI573.Name = "RI573"; + this.RI573.Size = new System.Drawing.Size(125, 27); + this.RI573.TabIndex = 190; + this.RI573.Text = "机械手停止"; + this.RI573.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI567 + // + this.RI567.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI567.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI567.Location = new System.Drawing.Point(281, 74); + this.RI567.Name = "RI567"; + this.RI567.Size = new System.Drawing.Size(125, 27); + this.RI567.TabIndex = 190; + this.RI567.Text = "允许取件"; + this.RI567.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI574 + // + this.RI574.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI574.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI574.Location = new System.Drawing.Point(419, 103); + this.RI574.Name = "RI574"; + this.RI574.Size = new System.Drawing.Size(125, 27); + this.RI574.TabIndex = 190; + this.RI574.Text = "RI574"; + this.RI574.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI561 + // + this.RI561.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI561.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI561.Location = new System.Drawing.Point(281, 44); + this.RI561.Name = "RI561"; + this.RI561.Size = new System.Drawing.Size(125, 27); + this.RI561.TabIndex = 190; + this.RI561.Text = "Pause"; + this.RI561.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI568 + // + this.RI568.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI568.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI568.Location = new System.Drawing.Point(419, 74); + this.RI568.Name = "RI568"; + this.RI568.Size = new System.Drawing.Size(125, 27); + this.RI568.TabIndex = 190; + this.RI568.Text = "压机联机"; + this.RI568.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI572 + // + this.RI572.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI572.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI572.Location = new System.Drawing.Point(143, 103); + this.RI572.Name = "RI572"; + this.RI572.Size = new System.Drawing.Size(125, 27); + this.RI572.TabIndex = 190; + this.RI572.Text = "库位满"; + this.RI572.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI562 + // + this.RI562.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI562.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI562.Location = new System.Drawing.Point(419, 44); + this.RI562.Name = "RI562"; + this.RI562.Size = new System.Drawing.Size(125, 27); + this.RI562.TabIndex = 190; + this.RI562.Text = "Continue"; + this.RI562.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI571 + // + this.RI571.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI571.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI571.Location = new System.Drawing.Point(5, 103); + this.RI571.Name = "RI571"; + this.RI571.Size = new System.Drawing.Size(125, 27); + this.RI571.TabIndex = 190; + this.RI571.Text = "坯件检测"; + this.RI571.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI566 + // + this.RI566.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI566.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI566.Location = new System.Drawing.Point(143, 74); + this.RI566.Name = "RI566"; + this.RI566.Size = new System.Drawing.Size(125, 27); + this.RI566.TabIndex = 190; + this.RI566.Text = "摆舟就绪"; + this.RI566.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI565 + // + this.RI565.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI565.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI565.Location = new System.Drawing.Point(5, 74); + this.RI565.Name = "RI565"; + this.RI565.Size = new System.Drawing.Size(125, 27); + this.RI565.TabIndex = 190; + this.RI565.Text = "SetPowerLow"; + this.RI565.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI560 + // + this.RI560.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI560.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI560.Location = new System.Drawing.Point(143, 44); + this.RI560.Name = "RI560"; + this.RI560.Size = new System.Drawing.Size(125, 27); + this.RI560.TabIndex = 190; + this.RI560.Text = "Stop"; + this.RI560.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // RI559 + // + this.RI559.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); + this.RI559.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.RI559.Font = new System.Drawing.Font("微软雅黑", 10F); + this.RI559.Location = new System.Drawing.Point(5, 44); + this.RI559.Name = "RI559"; + this.RI559.Size = new System.Drawing.Size(125, 27); + this.RI559.TabIndex = 190; + this.RI559.Text = "Start"; + this.RI559.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // 标签54 // @@ -1302,267 +1310,275 @@ // panel3 // this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel3.Controls.Add(this.RO15); - this.panel3.Controls.Add(this.RO11); - this.panel3.Controls.Add(this.RO7); - this.panel3.Controls.Add(this.RO3); - this.panel3.Controls.Add(this.RO14); - this.panel3.Controls.Add(this.RO13); - this.panel3.Controls.Add(this.RO10); - this.panel3.Controls.Add(this.RO9); - this.panel3.Controls.Add(this.RO6); - this.panel3.Controls.Add(this.RO12); - this.panel3.Controls.Add(this.RO5); - this.panel3.Controls.Add(this.RO8); - this.panel3.Controls.Add(this.RO2); - this.panel3.Controls.Add(this.RO4); - this.panel3.Controls.Add(this.RO1); - this.panel3.Controls.Add(this.RO0); + this.panel3.Controls.Add(this.RO612); + this.panel3.Controls.Add(this.RO611); + this.panel3.Controls.Add(this.RO610); + this.panel3.Controls.Add(this.RO609); + this.panel3.Controls.Add(this.RO608); + this.panel3.Controls.Add(this.RO607); + this.panel3.Controls.Add(this.RO606); + this.panel3.Controls.Add(this.RO605); + this.panel3.Controls.Add(this.RO604); + this.panel3.Controls.Add(this.RO600); + this.panel3.Controls.Add(this.RO596); + this.panel3.Controls.Add(this.RO592); + this.panel3.Controls.Add(this.RO603); + this.panel3.Controls.Add(this.RO602); + this.panel3.Controls.Add(this.RO599); + this.panel3.Controls.Add(this.RO598); + this.panel3.Controls.Add(this.RO595); + this.panel3.Controls.Add(this.RO601); + this.panel3.Controls.Add(this.RO594); + this.panel3.Controls.Add(this.RO597); + this.panel3.Controls.Add(this.RO591); + this.panel3.Controls.Add(this.RO593); + this.panel3.Controls.Add(this.RO590); + this.panel3.Controls.Add(this.RO589); this.panel3.Controls.Add(this.label2); this.panel3.Location = new System.Drawing.Point(1, 235); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(831, 201); this.panel3.TabIndex = 195; // - // RO15 - // - this.RO15.Appearance = System.Windows.Forms.Appearance.Button; - this.RO15.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO15.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO15.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO15.Location = new System.Drawing.Point(674, 157); - this.RO15.Name = "RO15"; - this.RO15.Size = new System.Drawing.Size(125, 27); - this.RO15.TabIndex = 193; - this.RO15.Text = "RO15取件中"; - this.RO15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO15.UseVisualStyleBackColor = true; - this.RO15.Click += new System.EventHandler(this.RO0_Click); - // - // RO11 - // - this.RO11.Appearance = System.Windows.Forms.Appearance.Button; - this.RO11.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO11.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO11.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO11.Location = new System.Drawing.Point(674, 121); - this.RO11.Name = "RO11"; - this.RO11.Size = new System.Drawing.Size(125, 27); - this.RO11.TabIndex = 193; - this.RO11.Text = "RO11吹气"; - this.RO11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO11.UseVisualStyleBackColor = true; - this.RO11.Click += new System.EventHandler(this.RO0_Click); - // - // RO7 - // - this.RO7.Appearance = System.Windows.Forms.Appearance.Button; - this.RO7.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO7.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO7.Location = new System.Drawing.Point(674, 85); - this.RO7.Name = "RO7"; - this.RO7.Size = new System.Drawing.Size(125, 27); - this.RO7.TabIndex = 193; - this.RO7.Text = "RO7快换"; - this.RO7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO7.UseVisualStyleBackColor = true; - this.RO7.Click += new System.EventHandler(this.RO0_Click); - // - // RO3 - // - this.RO3.Appearance = System.Windows.Forms.Appearance.Button; - this.RO3.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO3.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO3.Location = new System.Drawing.Point(674, 49); - this.RO3.Name = "RO3"; - this.RO3.Size = new System.Drawing.Size(125, 27); - this.RO3.TabIndex = 193; - this.RO3.Text = "RO3压机启动"; - this.RO3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO3.UseVisualStyleBackColor = true; - this.RO3.Click += new System.EventHandler(this.RO0_Click); - // - // RO14 - // - this.RO14.Appearance = System.Windows.Forms.Appearance.Button; - this.RO14.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO14.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO14.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO14.Location = new System.Drawing.Point(451, 157); - this.RO14.Name = "RO14"; - this.RO14.Size = new System.Drawing.Size(125, 27); - this.RO14.TabIndex = 193; - this.RO14.Text = "RO14报警"; - this.RO14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO14.UseVisualStyleBackColor = true; - this.RO14.Click += new System.EventHandler(this.RO0_Click); - // - // RO13 - // - this.RO13.Appearance = System.Windows.Forms.Appearance.Button; - this.RO13.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO13.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO13.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO13.Location = new System.Drawing.Point(228, 157); - this.RO13.Name = "RO13"; - this.RO13.Size = new System.Drawing.Size(125, 27); - this.RO13.TabIndex = 193; - this.RO13.Text = "RO13单重减"; - this.RO13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO13.UseVisualStyleBackColor = true; - this.RO13.Click += new System.EventHandler(this.RO0_Click); - // - // RO10 - // - this.RO10.Appearance = System.Windows.Forms.Appearance.Button; - this.RO10.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO10.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO10.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO10.Location = new System.Drawing.Point(451, 121); - this.RO10.Name = "RO10"; - this.RO10.Size = new System.Drawing.Size(125, 27); - this.RO10.TabIndex = 193; - this.RO10.Text = "RO10去毛刺"; - this.RO10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO10.UseVisualStyleBackColor = true; - this.RO10.Click += new System.EventHandler(this.RO0_Click); - // - // RO9 - // - this.RO9.Appearance = System.Windows.Forms.Appearance.Button; - this.RO9.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO9.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO9.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO9.Location = new System.Drawing.Point(228, 121); - this.RO9.Name = "RO9"; - this.RO9.Size = new System.Drawing.Size(125, 27); - this.RO9.TabIndex = 193; - this.RO9.Text = "RO9坯件旋转"; - this.RO9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO9.UseVisualStyleBackColor = true; - this.RO9.Click += new System.EventHandler(this.RO0_Click); - // - // RO6 - // - this.RO6.Appearance = System.Windows.Forms.Appearance.Button; - this.RO6.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO6.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO6.Location = new System.Drawing.Point(451, 85); - this.RO6.Name = "RO6"; - this.RO6.Size = new System.Drawing.Size(125, 27); - this.RO6.TabIndex = 193; - this.RO6.Text = "RO6气爪"; - this.RO6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO6.UseVisualStyleBackColor = true; - this.RO6.Click += new System.EventHandler(this.RO0_Click); - // - // RO12 - // - this.RO12.Appearance = System.Windows.Forms.Appearance.Button; - this.RO12.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO12.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO12.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO12.Location = new System.Drawing.Point(5, 157); - this.RO12.Name = "RO12"; - this.RO12.Size = new System.Drawing.Size(125, 27); - this.RO12.TabIndex = 193; - this.RO12.Text = "RO12单重增"; - this.RO12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO12.UseVisualStyleBackColor = true; - this.RO12.Click += new System.EventHandler(this.RO0_Click); - // - // RO5 - // - this.RO5.Appearance = System.Windows.Forms.Appearance.Button; - this.RO5.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO5.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO5.Location = new System.Drawing.Point(228, 85); - this.RO5.Name = "RO5"; - this.RO5.Size = new System.Drawing.Size(125, 27); - this.RO5.TabIndex = 193; - this.RO5.Text = "RO5真空"; - this.RO5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO5.UseVisualStyleBackColor = true; - this.RO5.Click += new System.EventHandler(this.RO0_Click); - // - // RO8 - // - this.RO8.Appearance = System.Windows.Forms.Appearance.Button; - this.RO8.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO8.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO8.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO8.Location = new System.Drawing.Point(5, 121); - this.RO8.Name = "RO8"; - this.RO8.Size = new System.Drawing.Size(125, 27); - this.RO8.TabIndex = 193; - this.RO8.Text = "RO8夹具旋转"; - this.RO8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO8.UseVisualStyleBackColor = true; - this.RO8.Click += new System.EventHandler(this.RO0_Click); - // - // RO2 - // - this.RO2.Appearance = System.Windows.Forms.Appearance.Button; - this.RO2.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO2.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO2.Location = new System.Drawing.Point(451, 49); - this.RO2.Name = "RO2"; - this.RO2.Size = new System.Drawing.Size(125, 27); - this.RO2.TabIndex = 193; - this.RO2.Text = "RO2急停"; - this.RO2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO2.UseVisualStyleBackColor = true; - this.RO2.Click += new System.EventHandler(this.RO0_Click); - // - // RO4 - // - this.RO4.Appearance = System.Windows.Forms.Appearance.Button; - this.RO4.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO4.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO4.Location = new System.Drawing.Point(5, 85); - this.RO4.Name = "RO4"; - this.RO4.Size = new System.Drawing.Size(125, 27); - this.RO4.TabIndex = 193; - this.RO4.Text = "RO4摆满换舟"; - this.RO4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO4.UseVisualStyleBackColor = true; - this.RO4.Click += new System.EventHandler(this.RO0_Click); - // - // RO1 - // - this.RO1.Appearance = System.Windows.Forms.Appearance.Button; - this.RO1.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO1.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO1.Location = new System.Drawing.Point(228, 49); - this.RO1.Name = "RO1"; - this.RO1.Size = new System.Drawing.Size(125, 27); - this.RO1.TabIndex = 193; - this.RO1.Text = "RO1错误"; - this.RO1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO1.UseVisualStyleBackColor = true; - this.RO1.Click += new System.EventHandler(this.RO0_Click); - // - // RO0 - // - this.RO0.Appearance = System.Windows.Forms.Appearance.Button; - this.RO0.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO0.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO0.Font = new System.Drawing.Font("微软雅黑", 10F); - this.RO0.Location = new System.Drawing.Point(5, 49); - this.RO0.Name = "RO0"; - this.RO0.Size = new System.Drawing.Size(125, 27); - this.RO0.TabIndex = 193; - this.RO0.Text = "RO0运行"; - this.RO0.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO0.UseVisualStyleBackColor = true; - this.RO0.Click += new System.EventHandler(this.RO0_Click); + // RO604 + // + this.RO604.Appearance = System.Windows.Forms.Appearance.Button; + this.RO604.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO604.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO604.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO604.Location = new System.Drawing.Point(424, 115); + this.RO604.Name = "RO604"; + this.RO604.Size = new System.Drawing.Size(125, 27); + this.RO604.TabIndex = 193; + this.RO604.Text = "机械手备用气爪控制"; + this.RO604.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO604.UseVisualStyleBackColor = true; + this.RO604.Click += new System.EventHandler(this.RO0_Click); + // + // RO600 + // + this.RO600.Appearance = System.Windows.Forms.Appearance.Button; + this.RO600.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO600.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO600.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO600.Location = new System.Drawing.Point(701, 82); + this.RO600.Name = "RO600"; + this.RO600.Size = new System.Drawing.Size(125, 27); + this.RO600.TabIndex = 193; + this.RO600.Text = "机械手取件完成"; + this.RO600.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO600.UseVisualStyleBackColor = true; + this.RO600.Click += new System.EventHandler(this.RO0_Click); + // + // RO596 + // + this.RO596.Appearance = System.Windows.Forms.Appearance.Button; + this.RO596.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO596.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO596.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO596.Location = new System.Drawing.Point(144, 82); + this.RO596.Name = "RO596"; + this.RO596.Size = new System.Drawing.Size(125, 27); + this.RO596.TabIndex = 193; + this.RO596.Text = "机械手报警"; + this.RO596.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO596.UseVisualStyleBackColor = true; + this.RO596.Click += new System.EventHandler(this.RO0_Click); + // + // RO592 + // + this.RO592.Appearance = System.Windows.Forms.Appearance.Button; + this.RO592.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO592.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO592.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO592.Location = new System.Drawing.Point(424, 49); + this.RO592.Name = "RO592"; + this.RO592.Size = new System.Drawing.Size(125, 27); + this.RO592.TabIndex = 193; + this.RO592.Text = "Error"; + this.RO592.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO592.UseVisualStyleBackColor = true; + this.RO592.Click += new System.EventHandler(this.RO0_Click); + // + // RO603 + // + this.RO603.Appearance = System.Windows.Forms.Appearance.Button; + this.RO603.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO603.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO603.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO603.Location = new System.Drawing.Point(284, 115); + this.RO603.Name = "RO603"; + this.RO603.Size = new System.Drawing.Size(125, 27); + this.RO603.TabIndex = 193; + this.RO603.Text = "机械手吹气控制"; + this.RO603.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO603.UseVisualStyleBackColor = true; + this.RO603.Click += new System.EventHandler(this.RO0_Click); + // + // RO602 + // + this.RO602.Appearance = System.Windows.Forms.Appearance.Button; + this.RO602.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO602.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO602.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO602.Location = new System.Drawing.Point(144, 115); + this.RO602.Name = "RO602"; + this.RO602.Size = new System.Drawing.Size(125, 27); + this.RO602.TabIndex = 193; + this.RO602.Text = "机械手夹具旋转"; + this.RO602.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO602.UseVisualStyleBackColor = true; + this.RO602.Click += new System.EventHandler(this.RO0_Click); + // + // RO599 + // + this.RO599.Appearance = System.Windows.Forms.Appearance.Button; + this.RO599.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO599.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO599.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO599.Location = new System.Drawing.Point(561, 82); + this.RO599.Name = "RO599"; + this.RO599.Size = new System.Drawing.Size(125, 27); + this.RO599.TabIndex = 193; + this.RO599.Text = "称重偏轻"; + this.RO599.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO599.UseVisualStyleBackColor = true; + this.RO599.Click += new System.EventHandler(this.RO0_Click); + // + // RO598 + // + this.RO598.Appearance = System.Windows.Forms.Appearance.Button; + this.RO598.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO598.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO598.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO598.Location = new System.Drawing.Point(424, 82); + this.RO598.Name = "RO598"; + this.RO598.Size = new System.Drawing.Size(125, 27); + this.RO598.TabIndex = 193; + this.RO598.Text = "称重偏重"; + this.RO598.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO598.UseVisualStyleBackColor = true; + this.RO598.Click += new System.EventHandler(this.RO0_Click); + // + // RO595 + // + this.RO595.Appearance = System.Windows.Forms.Appearance.Button; + this.RO595.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO595.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO595.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO595.Location = new System.Drawing.Point(4, 82); + this.RO595.Name = "RO595"; + this.RO595.Size = new System.Drawing.Size(125, 27); + this.RO595.TabIndex = 193; + this.RO595.Text = "备用"; + this.RO595.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO595.UseVisualStyleBackColor = true; + this.RO595.Click += new System.EventHandler(this.RO0_Click); + // + // RO601 + // + this.RO601.Appearance = System.Windows.Forms.Appearance.Button; + this.RO601.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO601.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO601.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO601.Location = new System.Drawing.Point(4, 115); + this.RO601.Name = "RO601"; + this.RO601.Size = new System.Drawing.Size(125, 27); + this.RO601.TabIndex = 193; + this.RO601.Text = "机械手摆满换舟"; + this.RO601.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO601.UseVisualStyleBackColor = true; + this.RO601.Click += new System.EventHandler(this.RO0_Click); + // + // RO594 + // + this.RO594.Appearance = System.Windows.Forms.Appearance.Button; + this.RO594.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO594.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO594.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO594.Location = new System.Drawing.Point(701, 49); + this.RO594.Name = "RO594"; + this.RO594.Size = new System.Drawing.Size(125, 27); + this.RO594.TabIndex = 193; + this.RO594.Text = "SafeguardOn"; + this.RO594.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO594.UseVisualStyleBackColor = true; + this.RO594.Click += new System.EventHandler(this.RO0_Click); + // + // RO597 + // + this.RO597.Appearance = System.Windows.Forms.Appearance.Button; + this.RO597.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO597.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO597.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO597.Location = new System.Drawing.Point(284, 82); + this.RO597.Name = "RO597"; + this.RO597.Size = new System.Drawing.Size(125, 27); + this.RO597.TabIndex = 193; + this.RO597.Text = "心跳"; + this.RO597.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO597.UseVisualStyleBackColor = true; + this.RO597.Click += new System.EventHandler(this.RO0_Click); + // + // RO591 + // + this.RO591.Appearance = System.Windows.Forms.Appearance.Button; + this.RO591.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO591.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO591.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO591.Location = new System.Drawing.Point(284, 49); + this.RO591.Name = "RO591"; + this.RO591.Size = new System.Drawing.Size(125, 27); + this.RO591.TabIndex = 193; + this.RO591.Text = "Paused"; + this.RO591.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO591.UseVisualStyleBackColor = true; + this.RO591.Click += new System.EventHandler(this.RO0_Click); + // + // RO593 + // + this.RO593.Appearance = System.Windows.Forms.Appearance.Button; + this.RO593.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO593.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO593.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO593.Location = new System.Drawing.Point(561, 49); + this.RO593.Name = "RO593"; + this.RO593.Size = new System.Drawing.Size(125, 27); + this.RO593.TabIndex = 193; + this.RO593.Text = "EstopOn"; + this.RO593.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO593.UseVisualStyleBackColor = true; + this.RO593.Click += new System.EventHandler(this.RO0_Click); + // + // RO590 + // + this.RO590.Appearance = System.Windows.Forms.Appearance.Button; + this.RO590.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO590.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO590.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO590.Location = new System.Drawing.Point(144, 49); + this.RO590.Name = "RO590"; + this.RO590.Size = new System.Drawing.Size(125, 27); + this.RO590.TabIndex = 193; + this.RO590.Text = "Running"; + this.RO590.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO590.UseVisualStyleBackColor = true; + this.RO590.Click += new System.EventHandler(this.RO0_Click); + // + // RO589 + // + this.RO589.Appearance = System.Windows.Forms.Appearance.Button; + this.RO589.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO589.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO589.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO589.Location = new System.Drawing.Point(4, 49); + this.RO589.Name = "RO589"; + this.RO589.Size = new System.Drawing.Size(125, 27); + this.RO589.TabIndex = 193; + this.RO589.Text = "Ready"; + this.RO589.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO589.UseVisualStyleBackColor = true; + this.RO589.Click += new System.EventHandler(this.RO0_Click); // // label2 // @@ -1592,6 +1608,118 @@ this.progressBar1.Size = new System.Drawing.Size(577, 36); this.progressBar1.TabIndex = 197; // + // RO606 + // + this.RO606.Appearance = System.Windows.Forms.Appearance.Button; + this.RO606.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO606.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO606.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO606.Location = new System.Drawing.Point(701, 115); + this.RO606.Name = "RO606"; + this.RO606.Size = new System.Drawing.Size(125, 27); + this.RO606.TabIndex = 194; + this.RO606.Text = "机械手气爪控制"; + this.RO606.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO606.UseVisualStyleBackColor = true; + // + // RO605 + // + this.RO605.Appearance = System.Windows.Forms.Appearance.Button; + this.RO605.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO605.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO605.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO605.Location = new System.Drawing.Point(561, 115); + this.RO605.Name = "RO605"; + this.RO605.Size = new System.Drawing.Size(125, 27); + this.RO605.TabIndex = 195; + this.RO605.Text = "机械手真空阀控制"; + this.RO605.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO605.UseVisualStyleBackColor = true; + // + // RO612 + // + this.RO612.Appearance = System.Windows.Forms.Appearance.Button; + this.RO612.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO612.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO612.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO612.Location = new System.Drawing.Point(701, 148); + this.RO612.Name = "RO612"; + this.RO612.Size = new System.Drawing.Size(125, 27); + this.RO612.TabIndex = 200; + this.RO612.Text = "RO612"; + this.RO612.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO612.UseVisualStyleBackColor = true; + // + // RO611 + // + this.RO611.Appearance = System.Windows.Forms.Appearance.Button; + this.RO611.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO611.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO611.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO611.Location = new System.Drawing.Point(561, 148); + this.RO611.Name = "RO611"; + this.RO611.Size = new System.Drawing.Size(125, 27); + this.RO611.TabIndex = 201; + this.RO611.Text = "RO611"; + this.RO611.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO611.UseVisualStyleBackColor = true; + // + // RO610 + // + this.RO610.Appearance = System.Windows.Forms.Appearance.Button; + this.RO610.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO610.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO610.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO610.Location = new System.Drawing.Point(424, 148); + this.RO610.Name = "RO610"; + this.RO610.Size = new System.Drawing.Size(125, 27); + this.RO610.TabIndex = 196; + this.RO610.Text = "RO610"; + this.RO610.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO610.UseVisualStyleBackColor = true; + // + // RO609 + // + this.RO609.Appearance = System.Windows.Forms.Appearance.Button; + this.RO609.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO609.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO609.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO609.Location = new System.Drawing.Point(284, 148); + this.RO609.Name = "RO609"; + this.RO609.Size = new System.Drawing.Size(125, 27); + this.RO609.TabIndex = 197; + this.RO609.Text = "RO609"; + this.RO609.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO609.UseVisualStyleBackColor = true; + // + // RO608 + // + this.RO608.Appearance = System.Windows.Forms.Appearance.Button; + this.RO608.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO608.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO608.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO608.Location = new System.Drawing.Point(144, 148); + this.RO608.Name = "RO608"; + this.RO608.Size = new System.Drawing.Size(125, 27); + this.RO608.TabIndex = 198; + this.RO608.Text = "RO608"; + this.RO608.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO608.UseVisualStyleBackColor = true; + // + // RO607 + // + this.RO607.Appearance = System.Windows.Forms.Appearance.Button; + this.RO607.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO607.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO607.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO607.Location = new System.Drawing.Point(4, 148); + this.RO607.Name = "RO607"; + this.RO607.Size = new System.Drawing.Size(125, 27); + this.RO607.TabIndex = 199; + this.RO607.Text = "机械手翻转控制"; + this.RO607.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO607.UseVisualStyleBackColor = true; + // // Android_IO_Form // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); @@ -1633,47 +1761,55 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label RI0; - private System.Windows.Forms.Label RI5; - private System.Windows.Forms.Label RI4; - private System.Windows.Forms.Label RI2; - private System.Windows.Forms.Label RI3; - private System.Windows.Forms.Label RI1; - private System.Windows.Forms.Label RI11; - private System.Windows.Forms.Label RI10; - private System.Windows.Forms.Label RI8; - private System.Windows.Forms.Label RI9; - private System.Windows.Forms.Label RI7; - private System.Windows.Forms.Label RI6; - private System.Windows.Forms.Label RI17; - private System.Windows.Forms.Label RI16; - private System.Windows.Forms.Label RI14; - private System.Windows.Forms.Label RI15; - private System.Windows.Forms.Label RI13; - private System.Windows.Forms.Label RI12; - private System.Windows.Forms.Label RI23; - private System.Windows.Forms.Label RI22; - private System.Windows.Forms.Label RI20; - private System.Windows.Forms.Label RI21; - private System.Windows.Forms.Label RI19; - private System.Windows.Forms.Label RI18; - private System.Windows.Forms.CheckBox RO0; - private System.Windows.Forms.CheckBox RO3; - private System.Windows.Forms.CheckBox RO2; - private System.Windows.Forms.CheckBox RO1; - private System.Windows.Forms.CheckBox RO15; - private System.Windows.Forms.CheckBox RO11; - private System.Windows.Forms.CheckBox RO7; - private System.Windows.Forms.CheckBox RO14; - private System.Windows.Forms.CheckBox RO13; - private System.Windows.Forms.CheckBox RO10; - private System.Windows.Forms.CheckBox RO9; - private System.Windows.Forms.CheckBox RO6; - private System.Windows.Forms.CheckBox RO12; - private System.Windows.Forms.CheckBox RO5; - private System.Windows.Forms.CheckBox RO8; - private System.Windows.Forms.CheckBox RO4; + private System.Windows.Forms.Label RI559; + private System.Windows.Forms.Label RI564; + private System.Windows.Forms.Label RI563; + private System.Windows.Forms.Label RI561; + private System.Windows.Forms.Label RI562; + private System.Windows.Forms.Label RI560; + private System.Windows.Forms.Label RI570; + private System.Windows.Forms.Label RI569; + private System.Windows.Forms.Label RI567; + private System.Windows.Forms.Label RI568; + private System.Windows.Forms.Label RI566; + private System.Windows.Forms.Label RI565; + private System.Windows.Forms.Label RI576; + private System.Windows.Forms.Label RI575; + private System.Windows.Forms.Label RI573; + private System.Windows.Forms.Label RI574; + private System.Windows.Forms.Label RI572; + private System.Windows.Forms.Label RI571; + private System.Windows.Forms.Label RI582; + private System.Windows.Forms.Label RI581; + private System.Windows.Forms.Label RI579; + private System.Windows.Forms.Label RI580; + private System.Windows.Forms.Label RI578; + private System.Windows.Forms.Label RI577; + private System.Windows.Forms.CheckBox RO589; + private System.Windows.Forms.CheckBox RO592; + private System.Windows.Forms.CheckBox RO591; + private System.Windows.Forms.CheckBox RO590; + private System.Windows.Forms.CheckBox RO604; + private System.Windows.Forms.CheckBox RO600; + private System.Windows.Forms.CheckBox RO596; + private System.Windows.Forms.CheckBox RO603; + private System.Windows.Forms.CheckBox RO602; + private System.Windows.Forms.CheckBox RO599; + private System.Windows.Forms.CheckBox RO598; + private System.Windows.Forms.CheckBox RO595; + private System.Windows.Forms.CheckBox RO601; + private System.Windows.Forms.CheckBox RO594; + private System.Windows.Forms.CheckBox RO597; + private System.Windows.Forms.CheckBox RO593; private System.Windows.Forms.Button btnrefresh; private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.CheckBox RO612; + private System.Windows.Forms.CheckBox RO611; + private System.Windows.Forms.CheckBox RO610; + private System.Windows.Forms.CheckBox RO609; + private System.Windows.Forms.CheckBox RO608; + private System.Windows.Forms.CheckBox RO607; + private System.Windows.Forms.CheckBox RO606; + private System.Windows.Forms.CheckBox RO605; } } \ No newline at end of file diff --git a/ZWGXPICK_SYS/Android_IO_Form.cs b/ZWGXPICK_SYS/Android_IO_Form.cs index cb4fc9c..41d7203 100644 --- a/ZWGXPICK_SYS/Android_IO_Form.cs +++ b/ZWGXPICK_SYS/Android_IO_Form.cs @@ -36,12 +36,12 @@ namespace ZWGXPICK_SYS private void btnrefresh_Click(object sender, EventArgs e) { - this.progressBar1.Maximum = 24 + 16; + this.progressBar1.Maximum = 24 + 24; this.progressBar1.Value = 0; this.progressBar1.Show(); this.curIndex = 0; // 发送所有输入查询指令. - string cmd = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"", 0); + string cmd = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"",559); if (this.epsonSocket1.IsConnection) this.epsonSocket1.tcp_send(cmd); @@ -98,16 +98,20 @@ namespace ZWGXPICK_SYS { if (str.IndexOf("execute,ri") >= 0) { + System.Diagnostics.Debug.WriteLine( "RI:" + str); String[] code = result[1].Split('='); - if (code.Length >= 2) updateRIStatus(code[0], code[1]); + if (code.Length >= 2) + { + updateRIStatus(code[0], code[1]); + } - String temp = code[1].Replace("RI", ""); - int nIndex = 0; int.TryParse(temp, out nIndex); + //String temp = code[1].Replace("RI", ""); + //int nIndex = 0; int.TryParse(temp, out nIndex); this.curIndex++; this.progressBar1.Value++; if (this.curIndex < 24) { - string send = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"", this.curIndex); + string send = String.Format("$execute,\"print \"ri{0}=\", sw({0})\"", this.curIndex + 559); if (this.epsonSocket1.IsConnection) this.epsonSocket1.tcp_send(send); } @@ -115,7 +119,7 @@ namespace ZWGXPICK_SYS { // 发送指令2 this.curIndex = 0; - string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex); + string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex + 589); if (this.epsonSocket1.IsConnection) this.epsonSocket1.tcp_send(send); @@ -124,17 +128,21 @@ namespace ZWGXPICK_SYS } else if (str.IndexOf("execute,ro") >= 0) { + System.Diagnostics.Debug.WriteLine("RO:" + str); String[] code = result[1].Split('='); - if (code.Length >= 2) updateROStatus(code[0], code[1]); - String temp = code[1].Replace("RO", ""); - int nIndex = 0; int.TryParse(temp, out nIndex); + if (code.Length >= 2) + { + updateROStatus(code[0], code[1]); + } + //String temp = code[1].Replace("RO", ""); + //int nIndex = 0; int.TryParse(temp, out nIndex); this.curIndex++; this.progressBar1.Value++; - if (this.curIndex < 16) + if (this.curIndex < 24) { // 发送指令2 - string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex); + string send = String.Format("$execute,\"print \"ro{0}=\", oport({0})\"", this.curIndex + 589); if (this.epsonSocket1.IsConnection) this.epsonSocket1.tcp_send(send); } diff --git a/ZWGXPICK_SYS/Dash_Change_Form.Designer.cs b/ZWGXPICK_SYS/Dash_Change_Form.Designer.cs index c2427e0..25851b5 100644 --- a/ZWGXPICK_SYS/Dash_Change_Form.Designer.cs +++ b/ZWGXPICK_SYS/Dash_Change_Form.Designer.cs @@ -97,11 +97,12 @@ // this.轴1升点动.Font = new System.Drawing.Font("微软雅黑", 15F); this.轴1升点动.HDADDR = ""; - this.轴1升点动.Location = new System.Drawing.Point(9, 212); + this.轴1升点动.Location = new System.Drawing.Point(12, 265); this.轴1升点动.LockValue = ((uint)(0u)); + this.轴1升点动.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.轴1升点动.Name = "轴1升点动"; this.轴1升点动.PLC = ((uint)(0u)); - this.轴1升点动.Size = new System.Drawing.Size(169, 45); + this.轴1升点动.Size = new System.Drawing.Size(225, 56); this.轴1升点动.TabIndex = 0; this.轴1升点动.Text = "轴1升点动"; this.轴1升点动.UseVisualStyleBackColor = true; @@ -148,11 +149,12 @@ // this.轴1降点动.Font = new System.Drawing.Font("微软雅黑", 15F); this.轴1降点动.HDADDR = ""; - this.轴1降点动.Location = new System.Drawing.Point(218, 211); + this.轴1降点动.Location = new System.Drawing.Point(291, 264); this.轴1降点动.LockValue = ((uint)(0u)); + this.轴1降点动.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.轴1降点动.Name = "轴1降点动"; this.轴1降点动.PLC = ((uint)(0u)); - this.轴1降点动.Size = new System.Drawing.Size(169, 45); + this.轴1降点动.Size = new System.Drawing.Size(225, 56); this.轴1降点动.TabIndex = 1; this.轴1降点动.Text = "轴1降点动"; this.轴1降点动.UseVisualStyleBackColor = true; @@ -199,10 +201,11 @@ // this.数据显示器1.Font = new System.Drawing.Font("微软雅黑", 15F); this.数据显示器1.HDADDR = "D4"; - this.数据显示器1.Location = new System.Drawing.Point(150, 25); + this.数据显示器1.Location = new System.Drawing.Point(200, 31); + this.数据显示器1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器1.Name = "数据显示器1"; this.数据显示器1.PLC = ((uint)(0u)); - this.数据显示器1.Size = new System.Drawing.Size(136, 34); + this.数据显示器1.Size = new System.Drawing.Size(180, 42); this.数据显示器1.TabIndex = 2; this.数据显示器1.Text = "0.0000"; this.数据显示器1.Value = ((ulong)(0ul)); @@ -234,11 +237,12 @@ // this.一号库位点位示教.Font = new System.Drawing.Font("微软雅黑", 15F); this.一号库位点位示教.HDADDR = ""; - this.一号库位点位示教.Location = new System.Drawing.Point(8, 263); + this.一号库位点位示教.Location = new System.Drawing.Point(11, 329); this.一号库位点位示教.LockValue = ((uint)(0u)); + this.一号库位点位示教.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.一号库位点位示教.Name = "一号库位点位示教"; this.一号库位点位示教.PLC = ((uint)(0u)); - this.一号库位点位示教.Size = new System.Drawing.Size(183, 45); + this.一号库位点位示教.Size = new System.Drawing.Size(244, 56); this.一号库位点位示教.TabIndex = 4; this.一号库位点位示教.Text = "一号库位点位示教"; this.一号库位点位示教.UseVisualStyleBackColor = true; @@ -285,11 +289,12 @@ // this.报警复位.Font = new System.Drawing.Font("微软雅黑", 15F); this.报警复位.HDADDR = ""; - this.报警复位.Location = new System.Drawing.Point(428, 263); + this.报警复位.Location = new System.Drawing.Point(571, 329); this.报警复位.LockValue = ((uint)(0u)); + this.报警复位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.报警复位.Name = "报警复位"; this.报警复位.PLC = ((uint)(0u)); - this.报警复位.Size = new System.Drawing.Size(169, 45); + this.报警复位.Size = new System.Drawing.Size(225, 56); this.报警复位.TabIndex = 6; this.报警复位.Text = "报警复位"; this.报警复位.UseVisualStyleBackColor = true; @@ -336,11 +341,12 @@ // this.库号清零.Font = new System.Drawing.Font("微软雅黑", 15F); this.库号清零.HDADDR = ""; - this.库号清零.Location = new System.Drawing.Point(218, 263); + this.库号清零.Location = new System.Drawing.Point(291, 329); this.库号清零.LockValue = ((uint)(0u)); + this.库号清零.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.库号清零.Name = "库号清零"; this.库号清零.PLC = ((uint)(0u)); - this.库号清零.Size = new System.Drawing.Size(169, 45); + this.库号清零.Size = new System.Drawing.Size(225, 56); this.库号清零.TabIndex = 7; this.库号清零.Text = "库号清零"; this.库号清零.UseVisualStyleBackColor = true; @@ -387,11 +393,12 @@ // this.手动换舟.Font = new System.Drawing.Font("微软雅黑", 15F); this.手动换舟.HDADDR = ""; - this.手动换舟.Location = new System.Drawing.Point(638, 263); + this.手动换舟.Location = new System.Drawing.Point(851, 329); this.手动换舟.LockValue = ((uint)(0u)); + this.手动换舟.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.手动换舟.Name = "手动换舟"; this.手动换舟.PLC = ((uint)(0u)); - this.手动换舟.Size = new System.Drawing.Size(169, 45); + this.手动换舟.Size = new System.Drawing.Size(225, 56); this.手动换舟.TabIndex = 8; this.手动换舟.Text = "手动换舟"; this.手动换舟.UseVisualStyleBackColor = true; @@ -440,10 +447,11 @@ this.标签1.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签1.HDADDR = ""; this.标签1.Image = null; - this.标签1.Location = new System.Drawing.Point(10, 25); + this.标签1.Location = new System.Drawing.Point(13, 31); + this.标签1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签1.Name = "标签1"; this.标签1.PLC = ((uint)(0u)); - this.标签1.Size = new System.Drawing.Size(124, 27); + this.标签1.Size = new System.Drawing.Size(154, 32); this.标签1.TabIndex = 3; this.标签1.Text = "轴1当前位置"; this.标签1.Value = ((ulong)(0ul)); @@ -511,10 +519,11 @@ this.标签2.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签2.HDADDR = ""; this.标签2.Image = null; - this.标签2.Location = new System.Drawing.Point(290, 25); + this.标签2.Location = new System.Drawing.Point(387, 31); + this.标签2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签2.Name = "标签2"; this.标签2.PLC = ((uint)(0u)); - this.标签2.Size = new System.Drawing.Size(50, 27); + this.标签2.Size = new System.Drawing.Size(60, 32); this.标签2.TabIndex = 9; this.标签2.Text = "mm"; this.标签2.Value = ((ulong)(0ul)); @@ -582,10 +591,11 @@ this.标签3.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签3.HDADDR = ""; this.标签3.Image = null; - this.标签3.Location = new System.Drawing.Point(734, 25); + this.标签3.Location = new System.Drawing.Point(979, 31); + this.标签3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签3.Name = "标签3"; this.标签3.PLC = ((uint)(0u)); - this.标签3.Size = new System.Drawing.Size(50, 27); + this.标签3.Size = new System.Drawing.Size(60, 32); this.标签3.TabIndex = 12; this.标签3.Text = "mm"; this.标签3.Value = ((ulong)(0ul)); @@ -653,10 +663,11 @@ this.标签4.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签4.HDADDR = ""; this.标签4.Image = null; - this.标签4.Location = new System.Drawing.Point(471, 25); + this.标签4.Location = new System.Drawing.Point(628, 31); + this.标签4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签4.Name = "标签4"; this.标签4.PLC = ((uint)(0u)); - this.标签4.Size = new System.Drawing.Size(117, 27); + this.标签4.Size = new System.Drawing.Size(145, 32); this.标签4.TabIndex = 11; this.标签4.Text = "1#库位位置"; this.标签4.Value = ((ulong)(0ul)); @@ -722,10 +733,11 @@ // this.数据显示器2.Font = new System.Drawing.Font("微软雅黑", 15F); this.数据显示器2.HDADDR = "D206"; - this.数据显示器2.Location = new System.Drawing.Point(594, 25); + this.数据显示器2.Location = new System.Drawing.Point(792, 31); + this.数据显示器2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器2.Name = "数据显示器2"; this.数据显示器2.PLC = ((uint)(0u)); - this.数据显示器2.Size = new System.Drawing.Size(136, 34); + this.数据显示器2.Size = new System.Drawing.Size(180, 42); this.数据显示器2.TabIndex = 10; this.数据显示器2.Text = "0.0000"; this.数据显示器2.Value = ((ulong)(0ul)); @@ -759,10 +771,11 @@ this.标签5.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签5.HDADDR = ""; this.标签5.Image = null; - this.标签5.Location = new System.Drawing.Point(734, 84); + this.标签5.Location = new System.Drawing.Point(979, 105); + this.标签5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签5.Name = "标签5"; this.标签5.PLC = ((uint)(0u)); - this.标签5.Size = new System.Drawing.Size(68, 27); + this.标签5.Size = new System.Drawing.Size(83, 32); this.标签5.TabIndex = 15; this.标签5.Text = "mm/s"; this.标签5.Value = ((ulong)(0ul)); @@ -830,10 +843,11 @@ this.标签6.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签6.HDADDR = ""; this.标签6.Image = null; - this.标签6.Location = new System.Drawing.Point(471, 84); + this.标签6.Location = new System.Drawing.Point(628, 105); + this.标签6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签6.Name = "标签6"; this.标签6.PLC = ((uint)(0u)); - this.标签6.Size = new System.Drawing.Size(124, 27); + this.标签6.Size = new System.Drawing.Size(154, 32); this.标签6.TabIndex = 14; this.标签6.Text = "轴1运行速度"; this.标签6.Value = ((ulong)(0ul)); @@ -899,10 +913,11 @@ // this.数据显示器3.Font = new System.Drawing.Font("微软雅黑", 15F); this.数据显示器3.HDADDR = "D200"; - this.数据显示器3.Location = new System.Drawing.Point(594, 84); + this.数据显示器3.Location = new System.Drawing.Point(792, 105); + this.数据显示器3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器3.Name = "数据显示器3"; this.数据显示器3.PLC = ((uint)(0u)); - this.数据显示器3.Size = new System.Drawing.Size(136, 34); + this.数据显示器3.Size = new System.Drawing.Size(180, 42); this.数据显示器3.TabIndex = 13; this.数据显示器3.Text = "0.0000"; this.数据显示器3.Value = ((ulong)(0ul)); @@ -936,10 +951,11 @@ this.标签8.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签8.HDADDR = ""; this.标签8.Image = null; - this.标签8.Location = new System.Drawing.Point(10, 84); + this.标签8.Location = new System.Drawing.Point(13, 105); + this.标签8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签8.Name = "标签8"; this.标签8.PLC = ((uint)(0u)); - this.标签8.Size = new System.Drawing.Size(92, 27); + this.标签8.Size = new System.Drawing.Size(114, 32); this.标签8.TabIndex = 17; this.标签8.Text = "当前库号"; this.标签8.Value = ((ulong)(0ul)); @@ -1005,10 +1021,11 @@ // this.数据显示器4.Font = new System.Drawing.Font("微软雅黑", 15F); this.数据显示器4.HDADDR = "D208"; - this.数据显示器4.Location = new System.Drawing.Point(150, 84); + this.数据显示器4.Location = new System.Drawing.Point(200, 105); + this.数据显示器4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器4.Name = "数据显示器4"; this.数据显示器4.PLC = ((uint)(0u)); - this.数据显示器4.Size = new System.Drawing.Size(136, 34); + this.数据显示器4.Size = new System.Drawing.Size(180, 42); this.数据显示器4.TabIndex = 16; this.数据显示器4.Text = "0"; this.数据显示器4.Value = ((ulong)(0ul)); @@ -1040,11 +1057,12 @@ // this.一键到达1号库位.Font = new System.Drawing.Font("微软雅黑", 15F); this.一键到达1号库位.HDADDR = ""; - this.一键到达1号库位.Location = new System.Drawing.Point(427, 212); + this.一键到达1号库位.Location = new System.Drawing.Point(569, 265); this.一键到达1号库位.LockValue = ((uint)(0u)); + this.一键到达1号库位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.一键到达1号库位.Name = "一键到达1号库位"; this.一键到达1号库位.PLC = ((uint)(0u)); - this.一键到达1号库位.Size = new System.Drawing.Size(181, 45); + this.一键到达1号库位.Size = new System.Drawing.Size(241, 56); this.一键到达1号库位.TabIndex = 18; this.一键到达1号库位.Text = "一键到达一号库位"; this.一键到达1号库位.UseVisualStyleBackColor = true; @@ -1093,10 +1111,11 @@ this.标签9.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签9.HDADDR = ""; this.标签9.Image = null; - this.标签9.Location = new System.Drawing.Point(10, 143); + this.标签9.Location = new System.Drawing.Point(13, 179); + this.标签9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签9.Name = "标签9"; this.标签9.PLC = ((uint)(0u)); - this.标签9.Size = new System.Drawing.Size(92, 27); + this.标签9.Size = new System.Drawing.Size(114, 32); this.标签9.TabIndex = 20; this.标签9.Text = "库位间隔"; this.标签9.Value = ((ulong)(0ul)); @@ -1162,10 +1181,11 @@ // this.数据显示器5.Font = new System.Drawing.Font("微软雅黑", 15F); this.数据显示器5.HDADDR = "D210"; - this.数据显示器5.Location = new System.Drawing.Point(150, 143); + this.数据显示器5.Location = new System.Drawing.Point(200, 179); + this.数据显示器5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器5.Name = "数据显示器5"; this.数据显示器5.PLC = ((uint)(0u)); - this.数据显示器5.Size = new System.Drawing.Size(136, 34); + this.数据显示器5.Size = new System.Drawing.Size(180, 42); this.数据显示器5.TabIndex = 21; this.数据显示器5.Text = "0.0000"; this.数据显示器5.Value = ((ulong)(0ul)); @@ -1199,10 +1219,11 @@ this.标签7.Font = new System.Drawing.Font("微软雅黑", 15F); this.标签7.HDADDR = ""; this.标签7.Image = null; - this.标签7.Location = new System.Drawing.Point(290, 143); + this.标签7.Location = new System.Drawing.Point(387, 179); + this.标签7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签7.Name = "标签7"; this.标签7.PLC = ((uint)(0u)); - this.标签7.Size = new System.Drawing.Size(50, 27); + this.标签7.Size = new System.Drawing.Size(60, 32); this.标签7.TabIndex = 22; this.标签7.Text = "mm"; this.标签7.Value = ((ulong)(0ul)); @@ -1268,11 +1289,12 @@ // this.气缸复位.Font = new System.Drawing.Font("微软雅黑", 15F); this.气缸复位.HDADDR = ""; - this.气缸复位.Location = new System.Drawing.Point(636, 212); + this.气缸复位.Location = new System.Drawing.Point(848, 265); this.气缸复位.LockValue = ((uint)(0u)); + this.气缸复位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.气缸复位.Name = "气缸复位"; this.气缸复位.PLC = ((uint)(0u)); - this.气缸复位.Size = new System.Drawing.Size(169, 45); + this.气缸复位.Size = new System.Drawing.Size(225, 56); this.气缸复位.TabIndex = 23; this.气缸复位.Text = "气缸复位"; this.气缸复位.UseVisualStyleBackColor = true; @@ -1317,10 +1339,10 @@ // // Dash_Change_Form // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); - this.ClientSize = new System.Drawing.Size(825, 320); + this.ClientSize = new System.Drawing.Size(1100, 400); this.Controls.Add(this.气缸复位); this.Controls.Add(this.标签7); this.Controls.Add(this.数据显示器5); @@ -1343,6 +1365,7 @@ this.Controls.Add(this.数据显示器1); this.Controls.Add(this.轴1降点动); this.Controls.Add(this.轴1升点动); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "Dash_Change_Form"; this.Text = "换舟参数"; this.Load += new System.EventHandler(this.Dash_ChangeParam_Form_Load); diff --git a/ZWGXPICK_SYS/Point_Data_Form.Designer.cs b/ZWGXPICK_SYS/Point_Data_Form.Designer.cs index 038415e..3e09bff 100644 --- a/ZWGXPICK_SYS/Point_Data_Form.Designer.cs +++ b/ZWGXPICK_SYS/Point_Data_Form.Designer.cs @@ -38,8 +38,8 @@ this.btnYsub = new System.Windows.Forms.Button(); this.btnYplus = new System.Windows.Forms.Button(); this.panel3 = new System.Windows.Forms.Panel(); - this.RO6 = new System.Windows.Forms.CheckBox(); - this.RO5 = new System.Windows.Forms.CheckBox(); + this.RO606 = new System.Windows.Forms.CheckBox(); + this.RO605 = new System.Windows.Forms.CheckBox(); this.btnMotoOff = new System.Windows.Forms.Button(); this.btnMotoOn = new System.Windows.Forms.Button(); this.btnSetSpeed = new System.Windows.Forms.Button(); @@ -215,8 +215,8 @@ // panel3 // this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel3.Controls.Add(this.RO6); - this.panel3.Controls.Add(this.RO5); + this.panel3.Controls.Add(this.RO606); + this.panel3.Controls.Add(this.RO605); this.panel3.Controls.Add(this.btnMotoOff); this.panel3.Controls.Add(this.btnMotoOn); this.panel3.Controls.Add(this.btnSetSpeed); @@ -225,35 +225,35 @@ this.panel3.Size = new System.Drawing.Size(199, 308); this.panel3.TabIndex = 233; // - // RO6 - // - this.RO6.Appearance = System.Windows.Forms.Appearance.Button; - this.RO6.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.RO6.Location = new System.Drawing.Point(3, 228); - this.RO6.Name = "RO6"; - this.RO6.Size = new System.Drawing.Size(191, 52); - this.RO6.TabIndex = 240; - this.RO6.Text = "RO6气爪"; - this.RO6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO6.UseVisualStyleBackColor = true; - this.RO6.Click += new System.EventHandler(this.RO0_Click); - // - // RO5 - // - this.RO5.Appearance = System.Windows.Forms.Appearance.Button; - this.RO5.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; - this.RO5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.RO5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.RO5.Location = new System.Drawing.Point(3, 171); - this.RO5.Name = "RO5"; - this.RO5.Size = new System.Drawing.Size(191, 52); - this.RO5.TabIndex = 241; - this.RO5.Text = "RO5真空"; - this.RO5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.RO5.UseVisualStyleBackColor = true; - this.RO5.Click += new System.EventHandler(this.RO0_Click); + // RO606 + // + this.RO606.Appearance = System.Windows.Forms.Appearance.Button; + this.RO606.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO606.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO606.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO606.Location = new System.Drawing.Point(3, 228); + this.RO606.Name = "RO606"; + this.RO606.Size = new System.Drawing.Size(191, 52); + this.RO606.TabIndex = 240; + this.RO606.Text = "RO606气爪"; + this.RO606.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO606.UseVisualStyleBackColor = true; + this.RO606.Click += new System.EventHandler(this.RO0_Click); + // + // RO605 + // + this.RO605.Appearance = System.Windows.Forms.Appearance.Button; + this.RO605.FlatAppearance.CheckedBackColor = System.Drawing.Color.Red; + this.RO605.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.RO605.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RO605.Location = new System.Drawing.Point(3, 171); + this.RO605.Name = "RO605"; + this.RO605.Size = new System.Drawing.Size(191, 52); + this.RO605.TabIndex = 241; + this.RO605.Text = "RO605真空"; + this.RO605.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RO605.UseVisualStyleBackColor = true; + this.RO605.Click += new System.EventHandler(this.RO0_Click); // // btnMotoOff // @@ -714,7 +714,7 @@ private System.Windows.Forms.Button btnUplus; private System.Windows.Forms.Button btnSetSpeed; private System.Windows.Forms.Button btnRealtimePoint; - private System.Windows.Forms.CheckBox RO6; - private System.Windows.Forms.CheckBox RO5; + private System.Windows.Forms.CheckBox RO606; + private System.Windows.Forms.CheckBox RO605; } } \ No newline at end of file diff --git a/ZWGXPICK_SYS/Point_Data_Form.cs b/ZWGXPICK_SYS/Point_Data_Form.cs index 4d65645..5615d3f 100644 --- a/ZWGXPICK_SYS/Point_Data_Form.cs +++ b/ZWGXPICK_SYS/Point_Data_Form.cs @@ -95,7 +95,7 @@ namespace ZWGXPICK_SYS X = this.Width; Y = this.Height; - String[] cnNames = { "等待位", "取件低位", "取件高位", "去毛刺低位", "去毛刺高位", "天平低位", "天平高位", "废品位", "取样低位", "取样高位", "摆件低件", "摆件高位", "安全位", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; + String[] cnNames = { "等待位", "取件低位", "取件高位", "去毛刺低位", "去毛刺高位", "天平放件点", "天平高位", "废品位", "取样低位", "取样高位", "摆件低件", "摆件高位", "安全位", "天平取件点", "", "", "", "", "", "", "", "", "", "", "", "", "" }; // initialize the combo box item. for (int i = 0; i <= 20; i++) { diff --git a/ZWGXPICK_SYS/ZWGXPICK_SYS.csproj b/ZWGXPICK_SYS/ZWGXPICK_SYS.csproj index 682a587..c70ea07 100644 --- a/ZWGXPICK_SYS/ZWGXPICK_SYS.csproj +++ b/ZWGXPICK_SYS/ZWGXPICK_SYS.csproj @@ -61,6 +61,7 @@ Alarm_Log_Form.cs + Form @@ -139,6 +140,7 @@ frmMain.cs + Designer PLC_IO_Form.cs @@ -189,6 +191,10 @@ {50011230-779e-484e-9fed-1cf3086fa14e} EPSON_SOCKET + + {0A7F9893-61CC-4188-8285-1E6C0B916B1A} + PLCCommunication + {7357684A-0246-4A72-8189-4724BDFFA5D1} ZWGXPICK_SYS.DAL diff --git a/ZWGXPICK_SYS/frmMain.Designer.cs b/ZWGXPICK_SYS/frmMain.Designer.cs index bfde58f..2cfcdbd 100644 --- a/ZWGXPICK_SYS/frmMain.Designer.cs +++ b/ZWGXPICK_SYS/frmMain.Designer.cs @@ -29,9 +29,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - PCHMI.STARTGIF startgif1 = new PCHMI.STARTGIF(); - PCHMI.KEYBEEP keybeep1 = new PCHMI.KEYBEEP(); - PCHMI.limits limits1 = new PCHMI.limits(); PCHMI.InterLock interLock1 = new PCHMI.InterLock(); PCHMI.InterLock interLock2 = new PCHMI.InterLock(); PCHMI.DrawStyle drawStyle1 = new PCHMI.DrawStyle(); @@ -57,8 +54,10 @@ PCHMI.InterLock interLock9 = new PCHMI.InterLock(); PCHMI.InterLock interLock10 = new PCHMI.InterLock(); PCHMI.InterLock interLock11 = new PCHMI.InterLock(); + PCHMI.STARTGIF startgif1 = new PCHMI.STARTGIF(); + PCHMI.KEYBEEP keybeep1 = new PCHMI.KEYBEEP(); + PCHMI.limits limits1 = new PCHMI.limits(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.PLC_Communication = new PCHMI.CONFIG(); this.panel3 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel(); this.btnlogin = new PCHMI.按钮(this.components); @@ -148,6 +147,7 @@ this.Timer_Getstatus = new System.Windows.Forms.Timer(this.components); this.Timer_EnumationProduct = new System.Windows.Forms.Timer(this.components); this.Timer_PLCTick = new System.Windows.Forms.Timer(this.components); + this.PLC_Communication = new PCHMI.CONFIG(); this.panel3.SuspendLayout(); this.panel6.SuspendLayout(); this.panel1.SuspendLayout(); @@ -160,43 +160,14 @@ this.panel10.SuspendLayout(); this.SuspendLayout(); // - // PLC_Communication - // - this.PLC_Communication.MAIN_HMI_IP = ""; - this.PLC_Communication.MODBUS服务器配置 = null; - this.PLC_Communication.PC时间保存地址 = null; - this.PLC_Communication.允许同时运行多个程序 = false; - startgif1.动画图片 = null; - startgif1.动画时间 = 1000; - startgif1.登录界面 = ""; - this.PLC_Communication.开机界面 = startgif1; - this.PLC_Communication.快速登录注销时间 = ((uint)(300u)); - keybeep1.WAV文件路径 = ""; - keybeep1.启用 = true; - keybeep1.时长 = 120; - keybeep1.频率 = 2000; - this.PLC_Communication.按键音 = keybeep1; - this.PLC_Communication.数据库连接 = null; - this.PLC_Communication.数据路径 = "D:\\"; - this.PLC_Communication.画面 = null; - this.PLC_Communication.登录方式 = PCHMI.CONFIG.LOGType.快速登录; - this.PLC_Communication.等比缩放 = false; - limits1.PLC = ((uint)(0u)); - limits1.地址 = ""; - limits1.限制类型 = PCHMI.limits.LType.无效; - this.PLC_Communication.运行限制 = limits1; - this.PLC_Communication.通讯配置 = new string[] { - "DELTA_AS_MODBUS_TCP;IP=192.168.0.50;PORT=502;JumpBit="}; - this.PLC_Communication.通讯配置文件名 = ""; - this.PLC_Communication.随机数保存地址 = null; - // // panel3 // this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel3.Controls.Add(this.panel6); - this.panel3.Location = new System.Drawing.Point(1, 3); + this.panel3.Location = new System.Drawing.Point(1, 4); + this.panel3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(1001, 476); + this.panel3.Size = new System.Drawing.Size(1334, 594); this.panel3.TabIndex = 40; // // panel6 @@ -210,20 +181,22 @@ this.panel6.Controls.Add(this.btnPoint); this.panel6.Controls.Add(this.btnPLC); this.panel6.Controls.Add(this.btnProduct); - this.panel6.Location = new System.Drawing.Point(873, 2); + this.panel6.Location = new System.Drawing.Point(1164, 2); + this.panel6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel6.Name = "panel6"; - this.panel6.Size = new System.Drawing.Size(123, 473); + this.panel6.Size = new System.Drawing.Size(164, 591); this.panel6.TabIndex = 44; // // btnlogin // this.btnlogin.Font = new System.Drawing.Font("微软雅黑", 12F); this.btnlogin.HDADDR = ""; - this.btnlogin.Location = new System.Drawing.Point(4, 366); + this.btnlogin.Location = new System.Drawing.Point(5, 458); this.btnlogin.LockValue = ((uint)(0u)); + this.btnlogin.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnlogin.Name = "btnlogin"; this.btnlogin.PLC = ((uint)(0u)); - this.btnlogin.Size = new System.Drawing.Size(117, 49); + this.btnlogin.Size = new System.Drawing.Size(156, 61); this.btnlogin.TabIndex = 40; this.btnlogin.Text = "管理员登录"; this.btnlogin.UseVisualStyleBackColor = true; @@ -269,9 +242,10 @@ // btnChangeDashParam // this.btnChangeDashParam.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnChangeDashParam.Location = new System.Drawing.Point(3, 111); + this.btnChangeDashParam.Location = new System.Drawing.Point(4, 139); + this.btnChangeDashParam.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnChangeDashParam.Name = "btnChangeDashParam"; - this.btnChangeDashParam.Size = new System.Drawing.Size(117, 49); + this.btnChangeDashParam.Size = new System.Drawing.Size(156, 61); this.btnChangeDashParam.TabIndex = 15; this.btnChangeDashParam.Text = "换舟参数"; this.btnChangeDashParam.UseVisualStyleBackColor = true; @@ -280,9 +254,10 @@ // btnExit // this.btnExit.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnExit.Location = new System.Drawing.Point(4, 417); + this.btnExit.Location = new System.Drawing.Point(5, 521); + this.btnExit.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnExit.Name = "btnExit"; - this.btnExit.Size = new System.Drawing.Size(117, 49); + this.btnExit.Size = new System.Drawing.Size(156, 61); this.btnExit.TabIndex = 13; this.btnExit.Text = "退出程序"; this.btnExit.UseVisualStyleBackColor = true; @@ -291,9 +266,10 @@ // btnWarning // this.btnWarning.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnWarning.Location = new System.Drawing.Point(3, 315); + this.btnWarning.Location = new System.Drawing.Point(4, 394); + this.btnWarning.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnWarning.Name = "btnWarning"; - this.btnWarning.Size = new System.Drawing.Size(117, 49); + this.btnWarning.Size = new System.Drawing.Size(156, 61); this.btnWarning.TabIndex = 14; this.btnWarning.Text = "报警查询"; this.btnWarning.UseVisualStyleBackColor = true; @@ -302,9 +278,10 @@ // button1 // this.button1.Font = new System.Drawing.Font("微软雅黑", 12F); - this.button1.Location = new System.Drawing.Point(3, 213); + this.button1.Location = new System.Drawing.Point(4, 266); + this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(117, 49); + this.button1.Size = new System.Drawing.Size(156, 61); this.button1.TabIndex = 12; this.button1.Text = "称重查询"; this.button1.UseVisualStyleBackColor = true; @@ -313,9 +290,10 @@ // btnAndroidIO // this.btnAndroidIO.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAndroidIO.Location = new System.Drawing.Point(3, 264); + this.btnAndroidIO.Location = new System.Drawing.Point(4, 330); + this.btnAndroidIO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnAndroidIO.Name = "btnAndroidIO"; - this.btnAndroidIO.Size = new System.Drawing.Size(117, 49); + this.btnAndroidIO.Size = new System.Drawing.Size(156, 61); this.btnAndroidIO.TabIndex = 12; this.btnAndroidIO.Text = "机器人IO监控"; this.btnAndroidIO.UseVisualStyleBackColor = true; @@ -324,9 +302,10 @@ // btnPoint // this.btnPoint.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnPoint.Location = new System.Drawing.Point(3, 60); + this.btnPoint.Location = new System.Drawing.Point(4, 75); + this.btnPoint.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnPoint.Name = "btnPoint"; - this.btnPoint.Size = new System.Drawing.Size(117, 49); + this.btnPoint.Size = new System.Drawing.Size(156, 61); this.btnPoint.TabIndex = 11; this.btnPoint.Text = "点位参数"; this.btnPoint.UseVisualStyleBackColor = true; @@ -335,9 +314,10 @@ // btnPLC // this.btnPLC.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnPLC.Location = new System.Drawing.Point(3, 162); + this.btnPLC.Location = new System.Drawing.Point(4, 202); + this.btnPLC.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnPLC.Name = "btnPLC"; - this.btnPLC.Size = new System.Drawing.Size(117, 49); + this.btnPLC.Size = new System.Drawing.Size(156, 61); this.btnPLC.TabIndex = 10; this.btnPLC.Text = "PLC IO监控"; this.btnPLC.UseVisualStyleBackColor = true; @@ -346,9 +326,10 @@ // btnProduct // this.btnProduct.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnProduct.Location = new System.Drawing.Point(3, 9); + this.btnProduct.Location = new System.Drawing.Point(4, 11); + this.btnProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnProduct.Name = "btnProduct"; - this.btnProduct.Size = new System.Drawing.Size(117, 49); + this.btnProduct.Size = new System.Drawing.Size(156, 61); this.btnProduct.TabIndex = 9; this.btnProduct.Text = "产品参数"; this.btnProduct.UseVisualStyleBackColor = true; @@ -362,10 +343,11 @@ this.标签2.ForeColor = System.Drawing.Color.Black; this.标签2.HDADDR = "M408"; this.标签2.Image = null; - this.标签2.Location = new System.Drawing.Point(190, 7); + this.标签2.Location = new System.Drawing.Point(253, 9); + this.标签2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签2.Name = "标签2"; this.标签2.PLC = ((uint)(0u)); - this.标签2.Size = new System.Drawing.Size(102, 27); + this.标签2.Size = new System.Drawing.Size(119, 32); this.标签2.TabIndex = 39; this.标签2.Text = " "; this.标签2.Value = ((ulong)(0ul)); @@ -491,17 +473,19 @@ this.panel1.Controls.Add(this.label3); this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label1); - this.panel1.Location = new System.Drawing.Point(514, 0); + this.panel1.Location = new System.Drawing.Point(685, 0); + this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(353, 444); + this.panel1.Size = new System.Drawing.Size(470, 554); this.panel1.TabIndex = 43; // // btnSelectProduct // this.btnSelectProduct.Font = new System.Drawing.Font("微软雅黑", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnSelectProduct.Location = new System.Drawing.Point(251, 1); + this.btnSelectProduct.Location = new System.Drawing.Point(335, 1); + this.btnSelectProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnSelectProduct.Name = "btnSelectProduct"; - this.btnSelectProduct.Size = new System.Drawing.Size(97, 29); + this.btnSelectProduct.Size = new System.Drawing.Size(129, 36); this.btnSelectProduct.TabIndex = 49; this.btnSelectProduct.Text = "选择产品"; this.btnSelectProduct.UseVisualStyleBackColor = true; @@ -511,11 +495,12 @@ // this.按钮6.Font = new System.Drawing.Font("微软雅黑", 12F); this.按钮6.HDADDR = ""; - this.按钮6.Location = new System.Drawing.Point(236, 409); + this.按钮6.Location = new System.Drawing.Point(315, 511); this.按钮6.LockValue = ((uint)(0u)); + this.按钮6.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.按钮6.Name = "按钮6"; this.按钮6.PLC = ((uint)(0u)); - this.按钮6.Size = new System.Drawing.Size(107, 30); + this.按钮6.Size = new System.Drawing.Size(143, 38); this.按钮6.TabIndex = 268; this.按钮6.Text = "库号+1"; this.按钮6.UseVisualStyleBackColor = true; @@ -562,10 +547,11 @@ // this.数据显示器1.Font = new System.Drawing.Font("微软雅黑", 12F); this.数据显示器1.HDADDR = "D208"; - this.数据显示器1.Location = new System.Drawing.Point(161, 410); + this.数据显示器1.Location = new System.Drawing.Point(215, 512); + this.数据显示器1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.数据显示器1.Name = "数据显示器1"; this.数据显示器1.PLC = ((uint)(0u)); - this.数据显示器1.Size = new System.Drawing.Size(69, 29); + this.数据显示器1.Size = new System.Drawing.Size(91, 35); this.数据显示器1.TabIndex = 267; this.数据显示器1.Text = "0"; this.数据显示器1.Value = ((ulong)(0ul)); @@ -597,9 +583,10 @@ // this.label9.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(4, 411); + this.label9.Location = new System.Drawing.Point(5, 514); + this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(155, 27); + this.label9.Size = new System.Drawing.Size(207, 34); this.label9.TabIndex = 266; this.label9.Text = "当位库号:"; // @@ -607,9 +594,10 @@ // this.txt_plan_placed_num.BackColor = System.Drawing.SystemColors.InactiveBorder; this.txt_plan_placed_num.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_plan_placed_num.Location = new System.Drawing.Point(161, 379); + this.txt_plan_placed_num.Location = new System.Drawing.Point(215, 474); + this.txt_plan_placed_num.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_plan_placed_num.Name = "txt_plan_placed_num"; - this.txt_plan_placed_num.Size = new System.Drawing.Size(69, 29); + this.txt_plan_placed_num.Size = new System.Drawing.Size(91, 34); this.txt_plan_placed_num.TabIndex = 265; this.txt_plan_placed_num.TextChanged += new System.EventHandler(this.txt_last_placed_times_TextChanged); // @@ -617,9 +605,10 @@ // this.txt_single_weight_allow_error.BackColor = System.Drawing.SystemColors.InactiveBorder; this.txt_single_weight_allow_error.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_single_weight_allow_error.Location = new System.Drawing.Point(160, 347); + this.txt_single_weight_allow_error.Location = new System.Drawing.Point(213, 434); + this.txt_single_weight_allow_error.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_single_weight_allow_error.Name = "txt_single_weight_allow_error"; - this.txt_single_weight_allow_error.Size = new System.Drawing.Size(188, 29); + this.txt_single_weight_allow_error.Size = new System.Drawing.Size(249, 34); this.txt_single_weight_allow_error.TabIndex = 265; this.txt_single_weight_allow_error.TextChanged += new System.EventHandler(this.txt_single_weight_allow_error_TextChanged); // @@ -627,9 +616,10 @@ // this.label18.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label18.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label18.Location = new System.Drawing.Point(3, 379); + this.label18.Location = new System.Drawing.Point(4, 474); + this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(155, 27); + this.label18.Size = new System.Drawing.Size(207, 34); this.label18.TabIndex = 264; this.label18.Text = "下一摆放位置:"; // @@ -637,9 +627,10 @@ // this.label17.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label17.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label17.Location = new System.Drawing.Point(3, 347); + this.label17.Location = new System.Drawing.Point(4, 434); + this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(155, 27); + this.label17.Size = new System.Drawing.Size(207, 34); this.label17.TabIndex = 264; this.label17.Text = "合格允许极差:"; // @@ -647,9 +638,10 @@ // this.txt_qualified_allow_error.BackColor = System.Drawing.SystemColors.Window; this.txt_qualified_allow_error.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_qualified_allow_error.Location = new System.Drawing.Point(160, 315); + this.txt_qualified_allow_error.Location = new System.Drawing.Point(213, 394); + this.txt_qualified_allow_error.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_qualified_allow_error.Name = "txt_qualified_allow_error"; - this.txt_qualified_allow_error.Size = new System.Drawing.Size(188, 29); + this.txt_qualified_allow_error.Size = new System.Drawing.Size(249, 34); this.txt_qualified_allow_error.TabIndex = 263; this.txt_qualified_allow_error.TextChanged += new System.EventHandler(this.txt_qualified_allow_error_TextChanged); // @@ -657,18 +649,20 @@ // this.label16.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label16.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(3, 315); + this.label16.Location = new System.Drawing.Point(4, 394); + this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(155, 27); + this.label16.Size = new System.Drawing.Size(207, 34); this.label16.TabIndex = 262; this.label16.Text = "合格允许公差:"; // // btn_resetPlaceTimes // this.btn_resetPlaceTimes.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btn_resetPlaceTimes.Location = new System.Drawing.Point(236, 378); + this.btn_resetPlaceTimes.Location = new System.Drawing.Point(315, 472); + this.btn_resetPlaceTimes.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btn_resetPlaceTimes.Name = "btn_resetPlaceTimes"; - this.btn_resetPlaceTimes.Size = new System.Drawing.Size(106, 29); + this.btn_resetPlaceTimes.Size = new System.Drawing.Size(141, 36); this.btn_resetPlaceTimes.TabIndex = 31; this.btn_resetPlaceTimes.Text = "重置"; this.btn_resetPlaceTimes.UseVisualStyleBackColor = true; @@ -678,9 +672,10 @@ // this.txt_standard_weight.BackColor = System.Drawing.SystemColors.InactiveBorder; this.txt_standard_weight.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_standard_weight.Location = new System.Drawing.Point(160, 282); + this.txt_standard_weight.Location = new System.Drawing.Point(213, 352); + this.txt_standard_weight.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_standard_weight.Name = "txt_standard_weight"; - this.txt_standard_weight.Size = new System.Drawing.Size(188, 29); + this.txt_standard_weight.Size = new System.Drawing.Size(249, 34); this.txt_standard_weight.TabIndex = 250; this.txt_standard_weight.TextChanged += new System.EventHandler(this.txt_standard_weight_TextChanged); // @@ -688,9 +683,10 @@ // this.label12.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label12.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(3, 282); + this.label12.Location = new System.Drawing.Point(4, 352); + this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(155, 27); + this.label12.Size = new System.Drawing.Size(207, 34); this.label12.TabIndex = 249; this.label12.Text = "标准重量:"; // @@ -701,9 +697,10 @@ this.cb_flush_wild.Items.AddRange(new object[] { "关闭", "开启"}); - this.cb_flush_wild.Location = new System.Drawing.Point(160, 95); + this.cb_flush_wild.Location = new System.Drawing.Point(213, 119); + this.cb_flush_wild.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_flush_wild.Name = "cb_flush_wild"; - this.cb_flush_wild.Size = new System.Drawing.Size(188, 29); + this.cb_flush_wild.Size = new System.Drawing.Size(249, 35); this.cb_flush_wild.TabIndex = 48; this.cb_flush_wild.Text = "开启"; this.cb_flush_wild.SelectedIndexChanged += new System.EventHandler(this.cb_flush_wild_SelectedIndexChanged); @@ -712,18 +709,20 @@ // this.label14.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label14.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label14.Location = new System.Drawing.Point(3, 95); + this.label14.Location = new System.Drawing.Point(4, 119); + this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(155, 27); + this.label14.Size = new System.Drawing.Size(207, 34); this.label14.TabIndex = 47; this.label14.Text = "吹气"; // // txt_continuity_unqualified // this.txt_continuity_unqualified.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_continuity_unqualified.Location = new System.Drawing.Point(160, 250); + this.txt_continuity_unqualified.Location = new System.Drawing.Point(213, 312); + this.txt_continuity_unqualified.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_continuity_unqualified.Name = "txt_continuity_unqualified"; - this.txt_continuity_unqualified.Size = new System.Drawing.Size(188, 29); + this.txt_continuity_unqualified.Size = new System.Drawing.Size(249, 34); this.txt_continuity_unqualified.TabIndex = 46; this.txt_continuity_unqualified.TextChanged += new System.EventHandler(this.txt_continuity_unqualified_TextChanged); this.txt_continuity_unqualified.Leave += new System.EventHandler(this.txt_continuity_unqualified_Leave); @@ -732,9 +731,10 @@ // this.label13.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label13.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label13.Location = new System.Drawing.Point(3, 250); + this.label13.Location = new System.Drawing.Point(4, 312); + this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(155, 27); + this.label13.Size = new System.Drawing.Size(207, 34); this.label13.TabIndex = 45; this.label13.Text = "称重连续不合格:"; // @@ -742,27 +742,30 @@ // this.txt_product_name.BackColor = System.Drawing.Color.White; this.txt_product_name.Font = new System.Drawing.Font("微软雅黑", 10F); - this.txt_product_name.Location = new System.Drawing.Point(96, 2); + this.txt_product_name.Location = new System.Drawing.Point(128, 2); + this.txt_product_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_product_name.Name = "txt_product_name"; - this.txt_product_name.Size = new System.Drawing.Size(154, 25); + this.txt_product_name.Size = new System.Drawing.Size(204, 29); this.txt_product_name.TabIndex = 44; // // label8 // this.label8.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label8.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label8.Location = new System.Drawing.Point(3, 2); + this.label8.Location = new System.Drawing.Point(4, 2); + this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(87, 27); + this.label8.Size = new System.Drawing.Size(116, 34); this.label8.TabIndex = 43; this.label8.Text = "产品型号: "; // // txt_cleanmode_interval // this.txt_cleanmode_interval.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_cleanmode_interval.Location = new System.Drawing.Point(160, 219); + this.txt_cleanmode_interval.Location = new System.Drawing.Point(213, 274); + this.txt_cleanmode_interval.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_cleanmode_interval.Name = "txt_cleanmode_interval"; - this.txt_cleanmode_interval.Size = new System.Drawing.Size(188, 29); + this.txt_cleanmode_interval.Size = new System.Drawing.Size(249, 34); this.txt_cleanmode_interval.TabIndex = 42; this.txt_cleanmode_interval.TextChanged += new System.EventHandler(this.txt_cleanmode_interval_TextChanged); this.txt_cleanmode_interval.Leave += new System.EventHandler(this.txt_cleanmode_interval_Leave); @@ -770,9 +773,10 @@ // txt_weight_interval // this.txt_weight_interval.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_weight_interval.Location = new System.Drawing.Point(160, 188); + this.txt_weight_interval.Location = new System.Drawing.Point(213, 235); + this.txt_weight_interval.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_weight_interval.Name = "txt_weight_interval"; - this.txt_weight_interval.Size = new System.Drawing.Size(188, 29); + this.txt_weight_interval.Size = new System.Drawing.Size(249, 34); this.txt_weight_interval.TabIndex = 41; this.txt_weight_interval.TextChanged += new System.EventHandler(this.txt_weight_interval_TextChanged); this.txt_weight_interval.Leave += new System.EventHandler(this.txt_weight_interval_Leave); @@ -784,9 +788,10 @@ this.cb_get_tool.Items.AddRange(new object[] { "真空", "气爪"}); - this.cb_get_tool.Location = new System.Drawing.Point(160, 157); + this.cb_get_tool.Location = new System.Drawing.Point(213, 196); + this.cb_get_tool.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_get_tool.Name = "cb_get_tool"; - this.cb_get_tool.Size = new System.Drawing.Size(188, 29); + this.cb_get_tool.Size = new System.Drawing.Size(249, 35); this.cb_get_tool.TabIndex = 40; this.cb_get_tool.Text = "真空"; this.cb_get_tool.SelectedIndexChanged += new System.EventHandler(this.cb_get_tool_SelectedIndexChanged); @@ -798,9 +803,10 @@ this.cb_get_mode.Items.AddRange(new object[] { "顶取", "侧取"}); - this.cb_get_mode.Location = new System.Drawing.Point(160, 126); + this.cb_get_mode.Location = new System.Drawing.Point(213, 158); + this.cb_get_mode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_get_mode.Name = "cb_get_mode"; - this.cb_get_mode.Size = new System.Drawing.Size(188, 29); + this.cb_get_mode.Size = new System.Drawing.Size(249, 35); this.cb_get_mode.TabIndex = 39; this.cb_get_mode.Text = "顶取"; this.cb_get_mode.SelectedIndexChanged += new System.EventHandler(this.cb_get_mode_SelectedIndexChanged); @@ -812,9 +818,10 @@ this.cb_clear_burr.Items.AddRange(new object[] { "关闭", "开启"}); - this.cb_clear_burr.Location = new System.Drawing.Point(160, 64); + this.cb_clear_burr.Location = new System.Drawing.Point(213, 80); + this.cb_clear_burr.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_clear_burr.Name = "cb_clear_burr"; - this.cb_clear_burr.Size = new System.Drawing.Size(188, 29); + this.cb_clear_burr.Size = new System.Drawing.Size(249, 35); this.cb_clear_burr.TabIndex = 38; this.cb_clear_burr.Text = "开启"; this.cb_clear_burr.SelectedIndexChanged += new System.EventHandler(this.cb_clear_burr_SelectedIndexChanged); @@ -826,9 +833,10 @@ this.cb_weight_mode.Items.AddRange(new object[] { "不称", "抽检"}); - this.cb_weight_mode.Location = new System.Drawing.Point(160, 33); + this.cb_weight_mode.Location = new System.Drawing.Point(213, 41); + this.cb_weight_mode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.cb_weight_mode.Name = "cb_weight_mode"; - this.cb_weight_mode.Size = new System.Drawing.Size(188, 29); + this.cb_weight_mode.Size = new System.Drawing.Size(249, 35); this.cb_weight_mode.TabIndex = 37; this.cb_weight_mode.Text = "不称"; this.cb_weight_mode.SelectedIndexChanged += new System.EventHandler(this.cb_weight_mode_SelectedIndexChanged); @@ -837,9 +845,10 @@ // this.label6.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label6.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label6.Location = new System.Drawing.Point(3, 157); + this.label6.Location = new System.Drawing.Point(4, 196); + this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(155, 27); + this.label6.Size = new System.Drawing.Size(207, 34); this.label6.TabIndex = 36; this.label6.Text = "取件工具"; // @@ -847,9 +856,10 @@ // this.label5.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label5.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label5.Location = new System.Drawing.Point(3, 126); + this.label5.Location = new System.Drawing.Point(4, 158); + this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(155, 27); + this.label5.Size = new System.Drawing.Size(207, 34); this.label5.TabIndex = 35; this.label5.Text = "取件方式"; // @@ -857,9 +867,10 @@ // this.label4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label4.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label4.Location = new System.Drawing.Point(3, 64); + this.label4.Location = new System.Drawing.Point(4, 80); + this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(155, 27); + this.label4.Size = new System.Drawing.Size(207, 34); this.label4.TabIndex = 34; this.label4.Text = "去毛刺"; // @@ -867,9 +878,10 @@ // this.label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label3.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label3.Location = new System.Drawing.Point(3, 219); + this.label3.Location = new System.Drawing.Point(4, 274); + this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(155, 27); + this.label3.Size = new System.Drawing.Size(207, 34); this.label3.TabIndex = 33; this.label3.Text = "清模频率"; // @@ -877,9 +889,10 @@ // this.label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label2.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label2.Location = new System.Drawing.Point(3, 33); + this.label2.Location = new System.Drawing.Point(4, 41); + this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(155, 27); + this.label2.Size = new System.Drawing.Size(207, 34); this.label2.TabIndex = 32; this.label2.Text = "称重模式"; // @@ -887,9 +900,10 @@ // this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label1.Font = new System.Drawing.Font("微软雅黑", 12F); - this.label1.Location = new System.Drawing.Point(3, 188); + this.label1.Location = new System.Drawing.Point(4, 235); + this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(155, 27); + this.label1.Size = new System.Drawing.Size(207, 34); this.label1.TabIndex = 31; this.label1.Text = "称重频率"; // @@ -903,9 +917,10 @@ this.panel4.Controls.Add(this.picMatirxMain); this.panel4.Controls.Add(this.txt_run_speed); this.panel4.Controls.Add(this.label7); - this.panel4.Location = new System.Drawing.Point(2, 3); + this.panel4.Location = new System.Drawing.Point(3, 4); + this.panel4.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(867, 476); + this.panel4.Size = new System.Drawing.Size(1156, 595); this.panel4.TabIndex = 41; // // 标签3 @@ -916,10 +931,11 @@ this.标签3.ForeColor = System.Drawing.Color.Black; this.标签3.HDADDR = "M410"; this.标签3.Image = null; - this.标签3.Location = new System.Drawing.Point(71, 7); + this.标签3.Location = new System.Drawing.Point(95, 9); + this.标签3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签3.Name = "标签3"; this.标签3.PLC = ((uint)(0u)); - this.标签3.Size = new System.Drawing.Size(112, 27); + this.标签3.Size = new System.Drawing.Size(139, 32); this.标签3.TabIndex = 41; this.标签3.Text = "摆舟未就绪"; this.标签3.Value = ((ulong)(0ul)); @@ -1016,9 +1032,10 @@ this.报警窗口1.AutoScroll = true; this.报警窗口1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.报警窗口1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); - this.报警窗口1.Location = new System.Drawing.Point(16, 171); + this.报警窗口1.Location = new System.Drawing.Point(21, 214); + this.报警窗口1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.报警窗口1.Name = "报警窗口1"; - this.报警窗口1.Size = new System.Drawing.Size(477, 107); + this.报警窗口1.Size = new System.Drawing.Size(636, 134); this.报警窗口1.TabIndex = 44; this.报警窗口1.允许拖动 = true; this.报警窗口1.关闭隐藏 = false; @@ -1034,18 +1051,20 @@ // this.lbl_android_startpos.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lbl_android_startpos.ForeColor = System.Drawing.Color.Black; - this.lbl_android_startpos.Location = new System.Drawing.Point(824, 7); + this.lbl_android_startpos.Location = new System.Drawing.Point(1099, 9); + this.lbl_android_startpos.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lbl_android_startpos.Name = "lbl_android_startpos"; - this.lbl_android_startpos.Size = new System.Drawing.Size(68, 19); + this.lbl_android_startpos.Size = new System.Drawing.Size(91, 24); this.lbl_android_startpos.TabIndex = 31; // // picMatirxMain // this.picMatirxMain.BackColor = System.Drawing.Color.White; this.picMatirxMain.Image = global::ZWGXPICK_SYS.Properties.Resources.zhuobiao; - this.picMatirxMain.Location = new System.Drawing.Point(3, 3); + this.picMatirxMain.Location = new System.Drawing.Point(4, 4); + this.picMatirxMain.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.picMatirxMain.Name = "picMatirxMain"; - this.picMatirxMain.Size = new System.Drawing.Size(510, 471); + this.picMatirxMain.Size = new System.Drawing.Size(680, 589); this.picMatirxMain.TabIndex = 29; this.picMatirxMain.TabStop = false; this.picMatirxMain.Paint += new System.Windows.Forms.PaintEventHandler(this.picMatirxMain_Paint); @@ -1054,9 +1073,10 @@ // this.txt_run_speed.BackColor = System.Drawing.SystemColors.InactiveBorder; this.txt_run_speed.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txt_run_speed.Location = new System.Drawing.Point(676, 444); + this.txt_run_speed.Location = new System.Drawing.Point(901, 555); + this.txt_run_speed.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txt_run_speed.Name = "txt_run_speed"; - this.txt_run_speed.Size = new System.Drawing.Size(188, 29); + this.txt_run_speed.Size = new System.Drawing.Size(249, 34); this.txt_run_speed.TabIndex = 265; this.txt_run_speed.Text = "1"; this.txt_run_speed.Leave += new System.EventHandler(this.txt_run_speed_Leave); @@ -1065,9 +1085,10 @@ // this.label7.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label7.Location = new System.Drawing.Point(519, 444); + this.label7.Location = new System.Drawing.Point(692, 555); + this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(155, 27); + this.label7.Size = new System.Drawing.Size(207, 34); this.label7.TabIndex = 264; this.label7.Text = "运行速度:"; // @@ -1080,26 +1101,29 @@ this.panel5.Controls.Add(this.label11); this.panel5.Controls.Add(this.label10); this.panel5.Controls.Add(this.标签1); - this.panel5.Location = new System.Drawing.Point(3, 129); + this.panel5.Location = new System.Drawing.Point(4, 161); + this.panel5.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(511, 27); + this.panel5.Size = new System.Drawing.Size(681, 33); this.panel5.TabIndex = 44; // // lblAndroidStatus // this.lblAndroidStatus.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lblAndroidStatus.Location = new System.Drawing.Point(218, 3); + this.lblAndroidStatus.Location = new System.Drawing.Point(291, 4); + this.lblAndroidStatus.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblAndroidStatus.Name = "lblAndroidStatus"; - this.lblAndroidStatus.Size = new System.Drawing.Size(158, 21); + this.lblAndroidStatus.Size = new System.Drawing.Size(211, 26); this.lblAndroidStatus.TabIndex = 38; // // lblAndroidErrorCode // this.lblAndroidErrorCode.AutoSize = true; this.lblAndroidErrorCode.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.lblAndroidErrorCode.Location = new System.Drawing.Point(454, 3); + this.lblAndroidErrorCode.Location = new System.Drawing.Point(605, 4); + this.lblAndroidErrorCode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.lblAndroidErrorCode.Name = "lblAndroidErrorCode"; - this.lblAndroidErrorCode.Size = new System.Drawing.Size(46, 21); + this.lblAndroidErrorCode.Size = new System.Drawing.Size(60, 27); this.lblAndroidErrorCode.TabIndex = 38; this.lblAndroidErrorCode.Text = "0000"; // @@ -1107,9 +1131,10 @@ // this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label15.Location = new System.Drawing.Point(395, 3); + this.label15.Location = new System.Drawing.Point(527, 4); + this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(62, 21); + this.label15.Size = new System.Drawing.Size(77, 27); this.label15.TabIndex = 38; this.label15.Text = "错误码:"; // @@ -1117,9 +1142,10 @@ // this.label11.AutoSize = true; this.label11.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label11.Location = new System.Drawing.Point(123, 3); + this.label11.Location = new System.Drawing.Point(164, 4); + this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(94, 21); + this.label11.Size = new System.Drawing.Size(117, 27); this.label11.TabIndex = 38; this.label11.Text = "机器人状态:"; // @@ -1127,9 +1153,10 @@ // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(7, 3); + this.label10.Location = new System.Drawing.Point(9, 4); + this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(75, 21); + this.label10.Size = new System.Drawing.Size(92, 27); this.label10.TabIndex = 37; this.label10.Text = "PLC状态:"; // @@ -1141,10 +1168,11 @@ this.标签1.ForeColor = System.Drawing.Color.Black; this.标签1.HDADDR = "M0"; this.标签1.Image = null; - this.标签1.Location = new System.Drawing.Point(88, 3); + this.标签1.Location = new System.Drawing.Point(117, 4); + this.标签1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.标签1.Name = "标签1"; this.标签1.PLC = ((uint)(0u)); - this.标签1.Size = new System.Drawing.Size(30, 21); + this.标签1.Size = new System.Drawing.Size(36, 27); this.标签1.TabIndex = 36; this.标签1.Text = " "; this.标签1.Value = ((ulong)(0ul)); @@ -1242,12 +1270,14 @@ this.dataGridView1.AllowUserToDeleteRows = false; this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dataGridView1.Location = new System.Drawing.Point(734, 4); + this.dataGridView1.Location = new System.Drawing.Point(979, 5); + this.dataGridView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.ReadOnly = true; + this.dataGridView1.RowHeadersWidth = 51; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView1.Size = new System.Drawing.Size(265, 151); + this.dataGridView1.Size = new System.Drawing.Size(353, 189); this.dataGridView1.TabIndex = 32; // // panel7 @@ -1271,17 +1301,19 @@ this.panel7.Controls.Add(this.btnStartProduct); this.panel7.Controls.Add(this.btnCloseAndroid); this.panel7.Controls.Add(this.btnOpenAndroid); - this.panel7.Location = new System.Drawing.Point(1, 480); + this.panel7.Location = new System.Drawing.Point(1, 600); + this.panel7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(1010, 165); + this.panel7.Size = new System.Drawing.Size(1346, 206); this.panel7.TabIndex = 42; // // btnGetWeight // this.btnGetWeight.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnGetWeight.Location = new System.Drawing.Point(416, 46); + this.btnGetWeight.Location = new System.Drawing.Point(555, 58); + this.btnGetWeight.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnGetWeight.Name = "btnGetWeight"; - this.btnGetWeight.Size = new System.Drawing.Size(100, 36); + this.btnGetWeight.Size = new System.Drawing.Size(133, 45); this.btnGetWeight.TabIndex = 53; this.btnGetWeight.Text = "获取重量"; this.btnGetWeight.UseVisualStyleBackColor = true; @@ -1290,9 +1322,10 @@ // btnWeightCalculate // this.btnWeightCalculate.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnWeightCalculate.Location = new System.Drawing.Point(416, 88); + this.btnWeightCalculate.Location = new System.Drawing.Point(555, 110); + this.btnWeightCalculate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnWeightCalculate.Name = "btnWeightCalculate"; - this.btnWeightCalculate.Size = new System.Drawing.Size(100, 36); + this.btnWeightCalculate.Size = new System.Drawing.Size(133, 45); this.btnWeightCalculate.TabIndex = 52; this.btnWeightCalculate.Text = "称重计算"; this.btnWeightCalculate.UseVisualStyleBackColor = true; @@ -1301,9 +1334,10 @@ // btnWeightRest // this.btnWeightRest.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnWeightRest.Location = new System.Drawing.Point(416, 4); + this.btnWeightRest.Location = new System.Drawing.Point(555, 5); + this.btnWeightRest.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnWeightRest.Name = "btnWeightRest"; - this.btnWeightRest.Size = new System.Drawing.Size(100, 36); + this.btnWeightRest.Size = new System.Drawing.Size(133, 45); this.btnWeightRest.TabIndex = 51; this.btnWeightRest.Text = "称重置零"; this.btnWeightRest.UseVisualStyleBackColor = true; @@ -1320,56 +1354,63 @@ this.colComName, this.colWeight, this.colUnit}); - this.dgvWeight.Location = new System.Drawing.Point(528, 4); + this.dgvWeight.Location = new System.Drawing.Point(704, 5); + this.dgvWeight.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.dgvWeight.Name = "dgvWeight"; this.dgvWeight.ReadOnly = true; + this.dgvWeight.RowHeadersWidth = 51; this.dgvWeight.RowTemplate.Height = 23; this.dgvWeight.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvWeight.Size = new System.Drawing.Size(200, 151); + this.dgvWeight.Size = new System.Drawing.Size(267, 189); this.dgvWeight.TabIndex = 50; // // colID // this.colID.DataPropertyName = "ID"; this.colID.HeaderText = "设备编号"; + this.colID.MinimumWidth = 6; this.colID.Name = "colID"; this.colID.ReadOnly = true; - this.colID.Width = 78; + this.colID.Width = 96; // // colComName // this.colComName.DataPropertyName = "ComName"; this.colComName.HeaderText = "设备名称"; + this.colComName.MinimumWidth = 6; this.colComName.Name = "colComName"; this.colComName.ReadOnly = true; - this.colComName.Width = 78; + this.colComName.Width = 96; // // colWeight // this.colWeight.DataPropertyName = "Weight"; this.colWeight.HeaderText = "重量"; + this.colWeight.MinimumWidth = 6; this.colWeight.Name = "colWeight"; this.colWeight.ReadOnly = true; - this.colWeight.Width = 54; + this.colWeight.Width = 66; // // colUnit // this.colUnit.DataPropertyName = "Nuit"; this.colUnit.HeaderText = "单位"; + this.colUnit.MinimumWidth = 6; this.colUnit.Name = "colUnit"; this.colUnit.ReadOnly = true; - this.colUnit.Width = 54; + this.colUnit.Width = 66; // // 一号库位 // this.一号库位.BackColor = System.Drawing.Color.White; this.一号库位.Font = new System.Drawing.Font("微软雅黑", 12F); this.一号库位.HDADDR = "M406"; - this.一号库位.Location = new System.Drawing.Point(104, 88); + this.一号库位.Location = new System.Drawing.Point(139, 110); this.一号库位.LockValue = ((uint)(0u)); + this.一号库位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.一号库位.Name = "一号库位"; this.一号库位.PLC = ((uint)(0u)); - this.一号库位.Size = new System.Drawing.Size(100, 36); + this.一号库位.Size = new System.Drawing.Size(133, 45); this.一号库位.TabIndex = 49; this.一号库位.Text = "一号库位"; this.一号库位.UseVisualStyleBackColor = false; @@ -1446,11 +1487,12 @@ // this.气缸复位.Font = new System.Drawing.Font("微软雅黑", 12F); this.气缸复位.HDADDR = ""; - this.气缸复位.Location = new System.Drawing.Point(208, 88); + this.气缸复位.Location = new System.Drawing.Point(277, 110); this.气缸复位.LockValue = ((uint)(0u)); + this.气缸复位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.气缸复位.Name = "气缸复位"; this.气缸复位.PLC = ((uint)(0u)); - this.气缸复位.Size = new System.Drawing.Size(100, 36); + this.气缸复位.Size = new System.Drawing.Size(133, 45); this.气缸复位.TabIndex = 48; this.气缸复位.Text = "气缸复位"; this.气缸复位.UseVisualStyleBackColor = true; @@ -1497,11 +1539,12 @@ // this.报警复位.Font = new System.Drawing.Font("微软雅黑", 12F); this.报警复位.HDADDR = ""; - this.报警复位.Location = new System.Drawing.Point(311, 88); + this.报警复位.Location = new System.Drawing.Point(415, 110); this.报警复位.LockValue = ((uint)(0u)); + this.报警复位.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.报警复位.Name = "报警复位"; this.报警复位.PLC = ((uint)(0u)); - this.报警复位.Size = new System.Drawing.Size(100, 36); + this.报警复位.Size = new System.Drawing.Size(133, 45); this.报警复位.TabIndex = 47; this.报警复位.Text = "报警复位"; this.报警复位.UseVisualStyleBackColor = true; @@ -1548,11 +1591,12 @@ // this.库号清零.Font = new System.Drawing.Font("微软雅黑", 12F); this.库号清零.HDADDR = ""; - this.库号清零.Location = new System.Drawing.Point(3, 88); + this.库号清零.Location = new System.Drawing.Point(4, 110); this.库号清零.LockValue = ((uint)(0u)); + this.库号清零.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.库号清零.Name = "库号清零"; this.库号清零.PLC = ((uint)(0u)); - this.库号清零.Size = new System.Drawing.Size(100, 36); + this.库号清零.Size = new System.Drawing.Size(133, 45); this.库号清零.TabIndex = 46; this.库号清零.Text = "库号清零"; this.库号清零.UseVisualStyleBackColor = true; @@ -1599,11 +1643,12 @@ // this.手动换舟.Font = new System.Drawing.Font("微软雅黑", 12F); this.手动换舟.HDADDR = ""; - this.手动换舟.Location = new System.Drawing.Point(208, 46); + this.手动换舟.Location = new System.Drawing.Point(277, 58); this.手动换舟.LockValue = ((uint)(0u)); + this.手动换舟.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.手动换舟.Name = "手动换舟"; this.手动换舟.PLC = ((uint)(0u)); - this.手动换舟.Size = new System.Drawing.Size(100, 36); + this.手动换舟.Size = new System.Drawing.Size(133, 45); this.手动换舟.TabIndex = 45; this.手动换舟.Text = "手动换舟"; this.手动换舟.UseVisualStyleBackColor = true; @@ -1649,9 +1694,10 @@ // btnEmulation // this.btnEmulation.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnEmulation.Location = new System.Drawing.Point(311, 46); + this.btnEmulation.Location = new System.Drawing.Point(415, 58); + this.btnEmulation.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnEmulation.Name = "btnEmulation"; - this.btnEmulation.Size = new System.Drawing.Size(100, 36); + this.btnEmulation.Size = new System.Drawing.Size(133, 45); this.btnEmulation.TabIndex = 33; this.btnEmulation.Text = "模拟仿真(&P)"; this.btnEmulation.UseVisualStyleBackColor = true; @@ -1660,9 +1706,10 @@ // btnErrorReset // this.btnErrorReset.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnErrorReset.Location = new System.Drawing.Point(311, 5); + this.btnErrorReset.Location = new System.Drawing.Point(415, 6); + this.btnErrorReset.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnErrorReset.Name = "btnErrorReset"; - this.btnErrorReset.Size = new System.Drawing.Size(100, 36); + this.btnErrorReset.Size = new System.Drawing.Size(133, 45); this.btnErrorReset.TabIndex = 33; this.btnErrorReset.Text = "故障复位"; this.btnErrorReset.UseVisualStyleBackColor = true; @@ -1671,9 +1718,10 @@ // btnStopNow // this.btnStopNow.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnStopNow.Location = new System.Drawing.Point(208, 5); + this.btnStopNow.Location = new System.Drawing.Point(277, 6); + this.btnStopNow.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnStopNow.Name = "btnStopNow"; - this.btnStopNow.Size = new System.Drawing.Size(100, 36); + this.btnStopNow.Size = new System.Drawing.Size(133, 45); this.btnStopNow.TabIndex = 31; this.btnStopNow.Text = "紧急停止"; this.btnStopNow.UseVisualStyleBackColor = true; @@ -1682,9 +1730,10 @@ // btnStopProduct // this.btnStopProduct.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnStopProduct.Location = new System.Drawing.Point(104, 46); + this.btnStopProduct.Location = new System.Drawing.Point(139, 58); + this.btnStopProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnStopProduct.Name = "btnStopProduct"; - this.btnStopProduct.Size = new System.Drawing.Size(100, 36); + this.btnStopProduct.Size = new System.Drawing.Size(133, 45); this.btnStopProduct.TabIndex = 31; this.btnStopProduct.Text = "停止"; this.btnStopProduct.UseVisualStyleBackColor = true; @@ -1693,9 +1742,10 @@ // btnStartProduct // this.btnStartProduct.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnStartProduct.Location = new System.Drawing.Point(104, 5); + this.btnStartProduct.Location = new System.Drawing.Point(139, 6); + this.btnStartProduct.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnStartProduct.Name = "btnStartProduct"; - this.btnStartProduct.Size = new System.Drawing.Size(100, 36); + this.btnStartProduct.Size = new System.Drawing.Size(133, 45); this.btnStartProduct.TabIndex = 30; this.btnStartProduct.Text = "启动"; this.btnStartProduct.UseVisualStyleBackColor = true; @@ -1704,9 +1754,10 @@ // btnCloseAndroid // this.btnCloseAndroid.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnCloseAndroid.Location = new System.Drawing.Point(3, 45); + this.btnCloseAndroid.Location = new System.Drawing.Point(4, 56); + this.btnCloseAndroid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnCloseAndroid.Name = "btnCloseAndroid"; - this.btnCloseAndroid.Size = new System.Drawing.Size(100, 36); + this.btnCloseAndroid.Size = new System.Drawing.Size(133, 45); this.btnCloseAndroid.TabIndex = 29; this.btnCloseAndroid.Text = "关闭机器人"; this.btnCloseAndroid.UseVisualStyleBackColor = true; @@ -1715,9 +1766,10 @@ // btnOpenAndroid // this.btnOpenAndroid.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnOpenAndroid.Location = new System.Drawing.Point(3, 5); + this.btnOpenAndroid.Location = new System.Drawing.Point(4, 6); + this.btnOpenAndroid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnOpenAndroid.Name = "btnOpenAndroid"; - this.btnOpenAndroid.Size = new System.Drawing.Size(100, 36); + this.btnOpenAndroid.Size = new System.Drawing.Size(133, 45); this.btnOpenAndroid.TabIndex = 28; this.btnOpenAndroid.Text = "打开机器人"; this.btnOpenAndroid.UseVisualStyleBackColor = true; @@ -1731,28 +1783,31 @@ this.panel10.Controls.Add(this.btnIpConfig); this.panel10.Controls.Add(this.epsonSocket2); this.panel10.Controls.Add(this.epsonSocket1); - this.panel10.Location = new System.Drawing.Point(2, 651); + this.panel10.Location = new System.Drawing.Point(3, 814); + this.panel10.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.panel10.Name = "panel10"; - this.panel10.Size = new System.Drawing.Size(1010, 77); + this.panel10.Size = new System.Drawing.Size(1346, 96); this.panel10.TabIndex = 49; // // txtWeightMessage // this.txtWeightMessage.BackColor = System.Drawing.SystemColors.Menu; - this.txtWeightMessage.Location = new System.Drawing.Point(599, 2); + this.txtWeightMessage.Location = new System.Drawing.Point(799, 2); + this.txtWeightMessage.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.txtWeightMessage.Multiline = true; this.txtWeightMessage.Name = "txtWeightMessage"; this.txtWeightMessage.ReadOnly = true; this.txtWeightMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.txtWeightMessage.Size = new System.Drawing.Size(257, 70); + this.txtWeightMessage.Size = new System.Drawing.Size(341, 86); this.txtWeightMessage.TabIndex = 52; // // btnWeightConfig // this.btnWeightConfig.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnWeightConfig.Location = new System.Drawing.Point(862, 37); + this.btnWeightConfig.Location = new System.Drawing.Point(1149, 46); + this.btnWeightConfig.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnWeightConfig.Name = "btnWeightConfig"; - this.btnWeightConfig.Size = new System.Drawing.Size(137, 35); + this.btnWeightConfig.Size = new System.Drawing.Size(183, 44); this.btnWeightConfig.TabIndex = 51; this.btnWeightConfig.Text = "称重配置"; this.btnWeightConfig.UseVisualStyleBackColor = true; @@ -1761,9 +1816,10 @@ // btnIpConfig // this.btnIpConfig.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnIpConfig.Location = new System.Drawing.Point(862, 1); + this.btnIpConfig.Location = new System.Drawing.Point(1149, 1); + this.btnIpConfig.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.btnIpConfig.Name = "btnIpConfig"; - this.btnIpConfig.Size = new System.Drawing.Size(137, 35); + this.btnIpConfig.Size = new System.Drawing.Size(183, 44); this.btnIpConfig.TabIndex = 50; this.btnIpConfig.Text = "机器人配置"; this.btnIpConfig.UseVisualStyleBackColor = true; @@ -1787,7 +1843,8 @@ this.epsonSocket2.Ip_addr = "127.0.0.1"; this.epsonSocket2.Is_admin = false; this.epsonSocket2.Is_Reconnect = false; - this.epsonSocket2.Location = new System.Drawing.Point(297, 3); + this.epsonSocket2.Location = new System.Drawing.Point(396, 4); + this.epsonSocket2.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); this.epsonSocket2.Name = "epsonSocket2"; this.epsonSocket2.Node_time = "KFC"; this.epsonSocket2.Port_value = 5002; @@ -1795,7 +1852,7 @@ this.epsonSocket2.Resend_weight_value = 0D; this.epsonSocket2.Select_num = 0; this.epsonSocket2.Send_data = ""; - this.epsonSocket2.Size = new System.Drawing.Size(296, 69); + this.epsonSocket2.Size = new System.Drawing.Size(395, 86); this.epsonSocket2.StatusMsg = ""; this.epsonSocket2.TabIndex = 49; this.epsonSocket2.TimerStart = false; @@ -1824,7 +1881,8 @@ this.epsonSocket1.Ip_addr = "127.0.0.1"; this.epsonSocket1.Is_admin = true; this.epsonSocket1.Is_Reconnect = false; - this.epsonSocket1.Location = new System.Drawing.Point(4, 2); + this.epsonSocket1.Location = new System.Drawing.Point(5, 2); + this.epsonSocket1.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4); this.epsonSocket1.Name = "epsonSocket1"; this.epsonSocket1.Node_time = "KFC"; this.epsonSocket1.Port_value = 5002; @@ -1832,7 +1890,7 @@ this.epsonSocket1.Resend_weight_value = 0D; this.epsonSocket1.Select_num = 0; this.epsonSocket1.Send_data = ""; - this.epsonSocket1.Size = new System.Drawing.Size(287, 70); + this.epsonSocket1.Size = new System.Drawing.Size(383, 88); this.epsonSocket1.StatusMsg = ""; this.epsonSocket1.TabIndex = 49; this.epsonSocket1.TimerStart = false; @@ -1858,17 +1916,48 @@ this.Timer_PLCTick.Enabled = true; this.Timer_PLCTick.Tick += new System.EventHandler(this.Timer_PLCTick_Tick); // + // PLC_Communication + // + this.PLC_Communication.MAIN_HMI_IP = ""; + this.PLC_Communication.MODBUS服务器配置 = null; + this.PLC_Communication.PC时间保存地址 = null; + this.PLC_Communication.允许同时运行多个程序 = false; + startgif1.动画图片 = null; + startgif1.动画时间 = 1000; + startgif1.登录界面 = ""; + this.PLC_Communication.开机界面 = startgif1; + this.PLC_Communication.快速登录注销时间 = ((uint)(300u)); + keybeep1.WAV文件路径 = ""; + keybeep1.启用 = true; + keybeep1.时长 = 120; + keybeep1.频率 = 2000; + this.PLC_Communication.按键音 = keybeep1; + this.PLC_Communication.数据库连接 = null; + this.PLC_Communication.数据路径 = "D:\\"; + this.PLC_Communication.画面 = null; + this.PLC_Communication.登录方式 = PCHMI.CONFIG.LOGType.快速登录; + this.PLC_Communication.等比缩放 = false; + limits1.PLC = ((uint)(0u)); + limits1.地址 = ""; + limits1.限制类型 = PCHMI.limits.LType.无效; + this.PLC_Communication.运行限制 = limits1; + this.PLC_Communication.通讯配置 = new string[] { + "DELTA_AS_MODBUS_TCP;IP=192.168.0.50;PORT=502;JumpBit="}; + this.PLC_Communication.通讯配置文件名 = ""; + this.PLC_Communication.随机数保存地址 = null; + // // MainForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); - this.ClientSize = new System.Drawing.Size(1008, 729); + this.ClientSize = new System.Drawing.Size(1344, 911); this.Controls.Add(this.panel10); this.Controls.Add(this.panel7); this.Controls.Add(this.panel4); this.Controls.Add(this.panel3); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); this.Name = "MainForm"; this.Text = "中钨高新长城装备硬质合金压机机械手"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); @@ -1892,7 +1981,6 @@ } #endregion - private PCHMI.CONFIG PLC_Communication; private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel4; private System.Windows.Forms.PictureBox picMatirxMain; @@ -1982,6 +2070,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn colWeight; private System.Windows.Forms.DataGridViewTextBoxColumn colUnit; private System.Windows.Forms.Button btnGetWeight; + private PCHMI.CONFIG PLC_Communication; } } diff --git a/ZWGXPICK_SYS/frmMain.cs b/ZWGXPICK_SYS/frmMain.cs index 2c4b484..02711b4 100644 --- a/ZWGXPICK_SYS/frmMain.cs +++ b/ZWGXPICK_SYS/frmMain.cs @@ -1,6 +1,8 @@ using EPSON_SOCKET; using Maticsoft.DBUtility; using PCHMI; +using PLCCommunication; + using System; using System.Collections.Generic; using System.ComponentModel; @@ -88,6 +90,7 @@ namespace ZWGXPICK_SYS this.mlbMatrix[row, col] = new GraphicsPath(); } } + } private void setTag(Control cons) @@ -727,6 +730,8 @@ namespace ZWGXPICK_SYS { WriteIniString("global", "txt_plan_placed_num", this.txt_plan_placed_num.Text); WriteIniString("global", "txt_run_speed", this.txt_run_speed.Text); + + PLCCommunicationFactory.Instance.ColseConnection(); } // 数据端口有新的数据进来. @@ -1857,6 +1862,11 @@ namespace ZWGXPICK_SYS PCHMI.TIRGGER m211 = new PCHMI.TIRGGER(0, "M211", "上升沿"); //外接报警复位按钮 PCHMI.TIRGGER m212 = new PCHMI.TIRGGER(0, "M212", "上升沿"); + //外接紧急停止按钮 + PCHMI.TIRGGER m218 = new PCHMI.TIRGGER(0, "M218", "上升沿"); + //外接停止按钮 + PCHMI.TIRGGER m219 = new PCHMI.TIRGGER(0, "M219", "上升沿"); + private void Timer_PLCTick_Tick(object sender, EventArgs e) { for (int i = 0; i < lstTrigger.Count; i++) @@ -1899,6 +1909,26 @@ namespace ZWGXPICK_SYS this.epsonSocket1.tcp_send(cmd); } } + //外接紧急停止按钮 + if (m218.Enable) + { + if (this.epsonSocket1.IsConnection) + { + String cmd = "$stop"; + this.epsonSocket1.tcp_send(cmd); + } + } + + //外接停止按钮 + if (m219.Enable) + { + String cmd = "$rest;"; + if (this.epsonSocket2.IsConnection) + { + // 停止命令发送到5002端口. + this.epsonSocket2.tcp_send(cmd); + } + } } // 重置下一摆放位置参数. diff --git a/ZWGXPICK_SYS/frmMain.resx b/ZWGXPICK_SYS/frmMain.resx index 9922f4f..0bdfde4 100644 --- a/ZWGXPICK_SYS/frmMain.resx +++ b/ZWGXPICK_SYS/frmMain.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - True @@ -141,6 +138,9 @@ 521, 17 + + 17, 17 + 60