Commit e82d8680 LN

日志增加位置打印

1 个父辈 1036da91
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net.Sockets;
using System.Net;
using System.IO;
using log4net;
using System.Text;
using OnlineStore.Common;
namespace OnlineStore
{
public class NetTCPServer
{
/// <summary>
/// TCP服务端监听
/// </summary>
TcpListener tcpsever = null;
/// <summary>
/// 监听状态
/// </summary>
bool isListen = false;
public BindingList<NewClient> lstClient = new BindingList<NewClient>();
public IPAddress[] getLoacalIPAddress()
{
IPHostEntry ipHostEntry = Dns.GetHostEntry(Dns.GetHostName());
return ipHostEntry.AddressList;
}
public delegate void ReviceData(NewClient client, string ip, byte[] data);
public event ReviceData ReviceDataEvent;
/// <summary>
/// 开启TCP监听
/// </summary>
/// <returns></returns>
public void StartTCPServer(int port)
{
try
{
tcpsever = new TcpListener(IPAddress.Any, port);
tcpsever.Start();
tcpsever.BeginAcceptTcpClient(new AsyncCallback(Acceptor), tcpsever);
isListen = true;
}
catch (Exception ex)
{
}
}
/// <summary>
/// 停止TCP监听
/// </summary>
/// <returns></returns>
public void StopTCPServer()
{
tcpsever.Stop();
isListen = false;
}
/// <summary>
/// 客户端连接初始化
/// </summary>
/// <param name="o"></param>
private void Acceptor(IAsyncResult o)
{
TcpListener server = o.AsyncState as TcpListener;
try
{
//初始化连接的客户端
NewClient newClient = new NewClient();
newClient.tcpClient = server.EndAcceptTcpClient(o);
lstClient.Add(newClient);
newClient.tcpClient.GetStream().BeginRead(newClient.Buffer, 0, newClient.Buffer.Length, new AsyncCallback(TCPCallBack), newClient);
server.BeginAcceptTcpClient(new AsyncCallback(Acceptor), server);//继续监听客户端连接
}
catch (ObjectDisposedException ex)
{ //监听被关闭
}
catch (Exception ex)
{
}
}
/// <summary>
/// 对当前选中的客户端发送数据
/// </summary>
/// <param name="sender"></param>
/// <param name="data"></param>
public bool SendData(NewClient selClient, byte[] data)
{
try
{
selClient.tcpClient.GetStream().Write(data, 0, data.Length);
}
catch (Exception ex)
{
return false;
}
return true;
}
/// <summary>
/// 客户端通讯回调函数
/// </summary>
/// <param name="ar"></param>
private void TCPCallBack(IAsyncResult ar)
{
NewClient client = (NewClient)ar.AsyncState;
if (client.tcpClient.Connected)
{
NetworkStream ns = client.tcpClient.GetStream();
StreamReader sr = new StreamReader(ns);
string str = sr.ReadLine();
LogUtil.info("读取到数据:"+str);
byte[] recdata = new byte[ns.EndRead(ar)];
if (recdata.Length > 0)
{
//Array.Copy(client.Buffer, recdata, recdata.Length);
LogUtil.info("读取到数据1111:" + Encoding.ASCII.GetString(recdata));
//ns.BeginRead(client.Buffer, 0, client.Buffer.Length, new AsyncCallback(TCPCallBack), client);
}
else
{
client.tcpClient.Close();
lstClient.Remove(client);
}
}
}
/// <summary>
/// 清理
/// </summary>
public void ClearSelf()
{
foreach (NewClient client in lstClient)
{
client.tcpClient.Close();
}
lstClient.Clear();
if (tcpsever != null)
{
tcpsever.Stop();
}
}
}
public class NewClient
{
public TcpClient tcpClient { get; set; }
public byte[] Buffer = new byte[1024];
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
namespace OnlineStore.Common
{
/// <summary>
/// 扫码枪连接类
/// </summary>
public class ScanSocket
{
private readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public event ScanRevice OnScanRevice;
public delegate void ScanRevice(string message);
/// <summary>
/// 扫码枪链接
/// </summary>
private TcpClient scannerSocket;
/// <summary>
/// 扫描枪 是否开始运行
/// </summary>
public bool isScannerRun = false;
/// <summary>
/// 连接扫码枪
/// </summary>
/// <param name="serverIp">扫码枪Ip</param>
/// <param name="port">扫码枪端口号</param>
/// <returns>是否连接成功</returns>
public bool ConnectScanner(string serverIp, int port)
{
return StartScanner(serverIp, port, false);
}
/// <summary>
/// 停止扫码枪
/// </summary>
public void StopScanner()
{
try
{
scannerSocket.close();
isScannerRun = false;
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错:" + ex);
}
}
/// <summary>
/// 发送扫码命令开始扫码
/// </summary>
public void BeginScannering()
{
string str = ConfigAppSettings.GetValue(Setting_Init.scanner_start_command);
if (str.Equals(""))
{
str = "S";
}
scannerSocket.send(str);
//onCodeReceived("AAAA");
}
/// <summary>
/// 开启扫码枪
/// </summary>
private bool StartScanner(string serverIp, int port, bool isMustCon)
{
bool result = true;
try
{
if (!isScannerRun || isMustCon)
{
if (scannerSocket == null)
{
scannerSocket = new TcpClient();
}
result = scannerSocket.connect(serverIp, port, new TcpClient.HandleMessage(onCodeReceived));
if (result)
{
isScannerRun = true;
}
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错:" + ex);
}
return result;
}
/// <summary>
/// 扫码枪数据接收
/// </summary>
/// <param name="message"></param>
private void onCodeReceived(string message)
{
try
{
message = ScanCodeManager.ReplaceCode(message);
if (OnScanRevice != null)
{
OnScanRevice.Invoke(message);
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错:" + ex.ToString());
}
}
}
}
using log4net;
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
namespace OnlineStore.Common
{
public class SerialBean
{
#region 全部变量
public static readonly ILog LOGGER = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private SerialPort _serialPort = null;
//定义委托
public delegate void SerialPortDataReceiveEventArgs(string portName, object sender, SerialDataReceivedEventArgs e, byte[] bits);
//定义接收数据事件
public event SerialPortDataReceiveEventArgs DataReceived;
//定义接收错误事件
//public event SerialErrorReceivedEventHandler Error;
//接收事件是否有效 false表示有效
public bool ReceiveEventFlag = false;
#endregion
#region 获取串口名
private string protName;
public string PortName
{
get { return _serialPort.PortName; }
set
{
_serialPort.PortName = value;
protName = value;
}
}
#endregion
#region 获取比特率
private int baudRate;
public int BaudRate
{
get { return _serialPort.BaudRate; }
set
{
_serialPort.BaudRate = value;
baudRate = value;
}
}
#endregion
#region 默认构造函数
///// <summary>
///// 默认构造函数,操作COM1,速度为9600,没有奇偶校验,8位字节,停止位为1 "COM1", 9600, Parity.None, 8, StopBits.One
///// </summary>
//public SerialBean()
//{
// _serialPort = new SerialPort();
//}
#endregion
#region 构造函数
///// <summary>
///// 构造函数,
///// </summary>
///// <param name="comPortName"></param>
//public SerialBean(string comPortName)
//{
// _serialPort = new SerialPort(comPortName);
// _serialPort.BaudRate = 9600;
// _serialPort.Parity = Parity.Even;
// _serialPort.DataBits = 8;
// _serialPort.StopBits = StopBits.One;
// _serialPort.Handshake = Handshake.None;
// _serialPort.RtsEnable = true;
// _serialPort.ReadTimeout = 2000;
// setSerialPort();
//}
#endregion
#region 构造函数,可以自定义串口的初始化参数
/// <summary>
/// 构造函数,可以自定义串口的初始化参数
/// </summary>
/// <param name="comPortName">需要操作的COM口名称</param>
/// <param name="baudRate">COM的速度</param>
/// <param name="parity">奇偶校验位</param>
/// <param name="dataBits">数据长度</param>
/// <param name="stopBits">停止位</param>
public SerialBean(string comPortName, int baudRate, Parity parity, int dataBits, StopBits stopBits)
{
_serialPort = new SerialPort(comPortName, baudRate, parity, dataBits, stopBits);
_serialPort.RtsEnable = true; //自动请求
_serialPort.ReadTimeout = 3000;//超时
setSerialPort();
}
#endregion
#region 析构函数
/// <summary>
/// 析构函数,关闭串口
/// </summary>
~SerialBean()
{
if (_serialPort.IsOpen)
_serialPort.Close();
}
#endregion
#region 设置串口参数
/// <summary>
/// 设置串口参数
/// </summary>
/// <param name="comPortName">需要操作的COM口名称</param>
/// <param name="baudRate">COM的速度</param>
/// <param name="dataBits">数据长度</param>
/// <param name="stopBits">停止位</param>
public void setSerialPort(string comPortName, int baudRate, int dataBits, int stopBits)
{
if (_serialPort.IsOpen)
_serialPort.Close();
_serialPort.PortName = comPortName;
_serialPort.BaudRate = baudRate;
_serialPort.Parity = Parity.None;
_serialPort.DataBits = dataBits;
_serialPort.StopBits = (StopBits)stopBits;
_serialPort.Handshake = Handshake.None;
_serialPort.RtsEnable = false;
_serialPort.ReadTimeout = 3000;
_serialPort.NewLine = "/r/n";
setSerialPort();
}
#endregion
#region 设置接收函数
/// <summary>
/// 设置串口资源,还需重载多个设置串口的函数
/// </summary>
void setSerialPort()
{
if (_serialPort != null)
{
//设置触发DataReceived事件的字节数为1
_serialPort.ReceivedBytesThreshold = 1;
//接收到一个字节时,也会触发DataReceived事件
_serialPort.DataReceived += new SerialDataReceivedEventHandler(_serialPort_DataReceived);
//接收数据出错,触发事件
_serialPort.ErrorReceived += new SerialErrorReceivedEventHandler(_serialPort_ErrorReceived);
//打开串口
//openPort();
}
}
#endregion
#region 打开串口资源
/// <summary>
/// 打开串口资源
/// <returns>返回bool类型</returns>
/// </summary>
public bool openPort()
{
bool ok = false;
//如果串口是打开的,先关闭
if (_serialPort.IsOpen)
_serialPort.Close();
try
{
//打开串口
_serialPort.Open();
ok = true;
}
catch (Exception Ex)
{
LogUtil.error(LOGGER, Ex.ToString());
//throw Ex;
}
return ok;
}
#endregion
#region 关闭串口
/// <summary>
/// 关闭串口资源,操作完成后,一定要关闭串口
/// </summary>
public void closePort()
{
//如果串口处于打开状态,则关闭
if (_serialPort.IsOpen)
_serialPort.Close();
}
public void clearInBuffer()
{
if (_serialPort.IsOpen)
{
_serialPort.DiscardInBuffer();
}
}
public void clearOutBuffer()
{
if (_serialPort.IsOpen)
{
_serialPort.DiscardOutBuffer();
}
}
#endregion
#region 接收串口数据事件
private object LockReviceObj = "";
/// <summary>
/// 接收串口数据事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void _serialPort_DataReceived(object sender, SerialDataReceivedEventArgs e)
{
lock (LockReviceObj)
{
//禁止接收事件时直接退出
if (ReceiveEventFlag)
{
return;
}
try
{
System.Threading.Thread.Sleep(20);
byte[] _data = new byte[_serialPort.BytesToRead];
_serialPort.Read(_data, 0, _data.Length);
if (_data.Length == 0) { return; }
if (DataReceived != null)
{
DataReceived(_serialPort.PortName, sender, e, _data);
}
_serialPort.DiscardInBuffer(); //清空接收缓冲区
}
catch (Exception ex)
{
LogUtil.error(LOGGER, ex.ToString());
}
}
}
#endregion
#region 接收数据出错事件
/// <summary>
/// 接收数据出错事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void _serialPort_ErrorReceived(object sender, SerialErrorReceivedEventArgs e)
{
}
#endregion
/// <summary>
/// 发送命令
/// </summary>
/// <param name="SendData">发送数据</param>
/// <param name="ReceiveData">接收数据</param>
/// <param name="Overtime">超时时间</param>
/// <param name="ReceiveLength">接收数据长度</param>
/// <returns></returns>
public int SendCommand(byte[] SendData, ref byte[] ReceiveData, int Overtime, int ReceiveLength)
{
if (_serialPort.IsOpen)
{
try
{
lock (LockReviceObj)
{
ReceiveEventFlag = true; //关闭接收事件
_serialPort.DiscardInBuffer(); //清空接收缓冲区
_serialPort.Write(SendData, 0, SendData.Length);
int num = 0, ret = 0;
System.Threading.Thread.Sleep(10);
ReceiveEventFlag = false; //打开事件
if (ReceiveData == null)
{
ReceiveData = new byte[ReceiveLength];
}
while (num++ < Overtime)
{
if (_serialPort.BytesToRead >= ReceiveData.Length)
break;
System.Threading.Thread.Sleep(10);
}
if (_serialPort.BytesToRead >= ReceiveData.Length)
{
ret = _serialPort.Read(ReceiveData, 0, ReceiveData.Length);
}
else
{
ret = _serialPort.Read(ReceiveData, 0, _serialPort.BytesToRead);
}
ReceiveEventFlag = false; //打开事件
return ret;
}
}
catch (Exception ex)
{
ReceiveEventFlag = false;
throw ex;
}
}
return -1;
}
#region 发送数据string类型
public void SendData(string data)
{ //发送数据
//禁止接收事件时直接退出
if (ReceiveEventFlag)
{
return;
}
if (_serialPort.IsOpen)
{
_serialPort.Write(data);
}
}
#endregion
#region 发送数据byte类型
/// <summary>
/// 数据发送
/// </summary>
/// <param name="data">要发送的数据字节</param>
public void SendData(byte[] data, int offset, int count)
{
string strSend = "";
for (int i = 0; i < data.Length; i++)
{
strSend += string.Format("{0:X2} ", data[i]);
}
LOGGER.Debug("【" + _serialPort.PortName + "】发送数据【" + strSend + "】");
//禁止接收事件时直接退出
if (ReceiveEventFlag)
{
return;
}
try
{
if (_serialPort.IsOpen)
{
//_serialPort.DiscardInBuffer();//清空接收缓冲区
_serialPort.Write(data, offset, count);
}
}
catch (Exception ex)
{
_serialPort.DiscardOutBuffer();
throw ex;
}
}
#endregion
#region 发送命令
/// <summary>
/// 发送命令
/// </summary>
/// <param name="SendData">发送数据</param>
/// <param name="ReceiveData">接收数据</param>
/// <param name="Overtime">超时时间</param>
/// <returns></returns>
public int SendCommand(byte[] SendData, ref byte[] ReceiveData, int Overtime)
{
if (_serialPort.IsOpen)
{
try
{
ReceiveEventFlag = true; //关闭接收事件
_serialPort.DiscardInBuffer(); //清空接收缓冲区
_serialPort.Write(SendData, 0, SendData.Length);
int num = 0, ret = 0;
System.Threading.Thread.Sleep(10);
ReceiveEventFlag = false; //打开事件
while (num++ < Overtime)
{
if (_serialPort.BytesToRead >= ReceiveData.Length)
break;
System.Threading.Thread.Sleep(10);
}
if (_serialPort.BytesToRead >= ReceiveData.Length)
{
ret = _serialPort.Read(ReceiveData, 0, ReceiveData.Length);
}
else
{
ret = _serialPort.Read(ReceiveData, 0, _serialPort.BytesToRead);
}
ReceiveEventFlag = false; //打开事件
return ret;
}
catch (Exception ex)
{
ReceiveEventFlag = false;
throw ex;
}
}
return -1;
}
#endregion
#region 获取串口
/// <summary>
/// 获取所有已连接短信猫设备的串口
/// </summary>
/// <returns></returns>
public string[] serialsIsConnected()
{
List<string> lists = new List<string>();
string[] seriallist = getSerials();
foreach (string s in seriallist)
{
}
return lists.ToArray();
}
#endregion
#region 获取当前全部串口资源
/// <summary>
/// 获得当前电脑上的所有串口资源
/// </summary>
/// <returns></returns>
public string[] getSerials()
{
return SerialPort.GetPortNames();
}
#endregion
#region 字节型转换16
/// <summary>
/// 把字节型转换成十六进制字符串
/// </summary>
/// <param name="InBytes"></param>
/// <returns></returns>
public static string ByteToString(byte[] InBytes)
{
string StringOut = "";
foreach (byte InByte in InBytes)
{
StringOut = StringOut + String.Format("{0:X2} ", InByte);
}
return StringOut;
}
#endregion
#region 十六进制字符串转字节型
/// <summary>
/// 打包方法,可以将十六制字符串转成byte[] ,字符串没有空格
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
//public static byte[] StringToByte(string s)
//{
// string temps = ReplaceSpace(s);
// if (temps.Length % 2 != 0)
// {
// temps = "0" + temps;
// }
// byte[] tempb = new byte[50];
// int j = 0;
// for (int i = 0; i < temps.Length; i = i + 2, j++)
// {
// tempb[j] = Convert.ToByte(temps.Substring(i, 2), 16);
// }
// byte[] send = new byte[j];
// Array.Copy(tempb, send, j);
// return send;
//}
//除去空格
public static string ReplaceSpace(string str)
{
string putout = "";
for (int i = 0; i < str.Length; i++)
{
if (str[i] != ' ')
{ putout += str[i]; }
}
return putout;
}
#endregion
#region 字节型转十六进制字符串
/// <summary>
/// 字节数组转16进制字符串
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
public static string byteToHexStr(byte[] bytes)
{
string returnStr = "";
if (bytes != null)
{
for (int i = 0; i < bytes.Length; i++)
{
returnStr += bytes[i].ToString("X2");
}
}
return returnStr;
}
#endregion
#region 计算校验码
public static void CalculateBCC(byte[] pByte, int nNumberOfBytes, out ushort pChecksum)
{
byte check = 0;
check = (byte)(pByte[0] ^ (pByte[1]));
for (int i = 2; i < pByte.Length; i++)
{
check = (byte)(check ^ (pByte[i]));
}
pChecksum = check;
}
//public static void CalculateCRC(byte[] pByte, int nNumberOfBytes, out ushort pChecksum)
//{
// int nBit;
// ushort nShiftedBit;
// pChecksum = 0xFFFF;
// for (int nByte = 0; nByte < nNumberOfBytes; nByte++)
// {
// pChecksum ^= pByte[nByte];
// for (nBit = 0; nBit < 8; nBit++)
// {
// if ((pChecksum & 0x1) == 1)
// {
// nShiftedBit = 1;
// }
// else
// {
// nShiftedBit = 0;
// }
// pChecksum >>= 1;
// if (nShiftedBit != 0)
// {
// pChecksum ^= 0xA001;
// }
// }
// }
//}
#endregion
}
}
...@@ -86,7 +86,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,7 +86,6 @@ namespace OnlineStore.DeviceLibrary
public void MoveAxisConfig() public void MoveAxisConfig()
{ {
moveAxisList = new List<ConfigMoveAxis>(); moveAxisList = new List<ConfigMoveAxis>();
moveAxisList.Add(Config.Middle_Axis); moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis); moveAxisList.Add(Config.UpDown_Axis);
...@@ -99,7 +98,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -99,7 +98,6 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.Comp_Axis); moveAxisList.Add(Config.Comp_Axis);
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo()); this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
} }
public override bool StartRun() public override bool StartRun()
...@@ -241,7 +239,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -241,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.BOX_H_InOutBack: case StoreMoveStep.BOX_H_InOutBack:
Thread.Sleep(200); Thread.Sleep(200);
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H_InOutToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H_InOutToP1);
LogUtil.info(Name + "" + MoveInfo.MoveType + ":进出轴到待机点P1,关闭舱门"); LogUtil.info(Name + "" + MoveInfo.MoveType + ":进出轴到待机点P1["+ Config.InOutAxis_P1_Position + "],关闭舱门");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
CloseDoor(); CloseDoor();
break; break;
...@@ -270,7 +268,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -270,7 +268,7 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.BOX_H_OtherAxisBack: case StoreMoveStep.BOX_H_OtherAxisBack:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H_MiddleAxisToP1);
LogUtil.info(Name + "" + MoveInfo.MoveType + ":旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"); LogUtil.info(Name + "" + MoveInfo.MoveType + ":旋转轴运动到P1[" + Config.MiddleAxis_P1_Position + "],上下轴走到P1[" + Config.UpDownAxis_DoorOPosition_P1 + "],压紧轴到P1[" + Config.CompressAxis_P1_Position + "]");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed);
...@@ -300,7 +298,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -300,7 +298,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
case StoreMoveStep.BOX_M_H_TOP1_CompressHome: case StoreMoveStep.BOX_M_H_TOP1_CompressHome:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1);
LogUtil.info(Name + "" + MoveInfo.MoveType + ":旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"); LogUtil.info(Name + "" + MoveInfo.MoveType + ":旋转轴运动到P1[" + Config.MiddleAxis_P1_Position + "],上下轴走到P1[" + Config.UpDownAxis_DoorOPosition_P1 + "],压紧轴到P1[" + Config.CompressAxis_P1_Position + "]");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1_Position, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_DoorOPosition_P1, Config.UpDownAxis_P1_Speed);
......
...@@ -117,7 +117,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -117,7 +117,7 @@ namespace OnlineStore.DeviceLibrary
int errorCount = Math.Abs(outCount - InOut_P1); int errorCount = Math.Abs(outCount - InOut_P1);
if (errorCount <= Config.InOut_Axis.CanErrorCountMin) if (errorCount <= Config.InOut_Axis.CanErrorCountMin)
{ {
LogUtil.info("进出轴当前位置:" + outCount + ",已经在P1,不需要再回P1"); LogUtil.info("进出轴当前位置:" + outCount + ",已经在P1["+ InOut_P1 + "],不需要再回P1");
} }
else else
{ {
...@@ -518,7 +518,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -518,7 +518,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SI_12_PutWareToBag) else if (MoveInfo.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
{ {
InStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); InStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点)["+ moveP.InOut_P1 + "] ");
MoveInfo.NextMoveStep(StoreMoveStep.SI_13_InoutBack); MoveInfo.NextMoveStep(StoreMoveStep.SI_13_InoutBack);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
...@@ -611,10 +611,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -611,10 +611,10 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveStep == StoreMoveStep.SO_02_InoutBack) if (MoveInfo.MoveStep == StoreMoveStep.SO_02_InoutBack)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToBagP); MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToBagP);
OutStoreLog("出库:压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"); OutStoreLog("出库:压紧轴至P3(压紧前点)["+ moveP.ComPress_P3 + "] ,旋转轴至P2(库位点)["+ moveP.Middle_P2 + "], 升降轴至P5(库位出库前点)["+ moveP.UpDown_P5 + "]");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_03_ToBagP) else if (MoveInfo.MoveStep == StoreMoveStep.SO_03_ToBagP)
{ {
...@@ -624,7 +624,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -624,7 +624,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_04_InoutToP3) else if (MoveInfo.MoveStep == StoreMoveStep.SO_04_InoutToP3)
{ {
OutStoreLog("出库:升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) "); OutStoreLog("出库:升降轴至P6(库位出料缓冲点)["+ moveP.ComPress_P2 + "],压紧轴至P2(压紧点)["+ moveP.UpDown_P6 + "] ");
MoveInfo.NextMoveStep(StoreMoveStep.SO_05_GetWare); MoveInfo.NextMoveStep(StoreMoveStep.SO_05_GetWare);
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed); ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
...@@ -633,7 +633,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -633,7 +633,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_GetWare) else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_GetWare)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_06_InoutToP1); MoveInfo.NextMoveStep(StoreMoveStep.SO_06_InoutToP1);
OutStoreLog("出库:进出轴至P1(待机点) "); OutStoreLog("出库:进出轴至P1(待机点) ["+ moveP.InOut_P1 + "]");
//ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed); //ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
//把库位的物品放到取到叉子上之后是出仓完成 //把库位的物品放到取到叉子上之后是出仓完成
...@@ -654,7 +654,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -654,7 +654,7 @@ namespace OnlineStore.DeviceLibrary
if (MoveInfo.MoveParam.LoadLocationP()) if (MoveInfo.MoveParam.LoadLocationP())
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_11_MoveToBag); MoveInfo.NextMoveStep(StoreMoveStep.SOL_11_MoveToBag);
OutStoreLog("出库定位:旋转轴 至P2( 库位点)升降轴到P3(库位入库前点) "); OutStoreLog("出库定位:旋转轴 至P2( 库位点)["+ MoveInfo.MoveParam.LocationPos.MiddleAxis_Position_P2 + "], 升降轴到P3(库位入库前点)["+ MoveInfo.MoveParam.LocationPos.UpDownAxis_IHPosition_P3 + "] ");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.LocationPos.MiddleAxis_Position_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.LocationPos.MiddleAxis_Position_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_IHPosition_P3, Config.UpDownAxis_P3_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_IHPosition_P3, Config.UpDownAxis_P3_Speed);
...@@ -675,13 +675,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -675,13 +675,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_12_InoutToP3) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_12_InoutToP3)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_13_ComToP3); MoveInfo.NextMoveStep(StoreMoveStep.SOL_13_ComToP3);
OutStoreLog("出库定位:压紧轴到P3( 压紧前点) "); OutStoreLog("出库定位:压紧轴到P3( 压紧前点)["+ MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3 + "] ");
ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3, Config.CompAxis_P3_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_13_ComToP3) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_13_ComToP3)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_14_UpdownToP4); MoveInfo.NextMoveStep(StoreMoveStep.SOL_14_UpdownToP4);
OutStoreLog("出库定位:放下物品,升降轴到P4( 库位入料缓冲点) "); OutStoreLog("出库定位:放下物品,升降轴到P4( 库位入料缓冲点)["+ MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4 + "] ");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4, Config.UpDownAxis_P4_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4, Config.UpDownAxis_P4_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_14_UpdownToP4) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_14_UpdownToP4)
...@@ -693,14 +693,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -693,14 +693,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_15_WaitTime) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_15_WaitTime)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_16_GetWare); MoveInfo.NextMoveStep(StoreMoveStep.SOL_16_GetWare);
OutStoreLog("出库定位:拿物品,升降轴到P6( 库位出料缓冲点),压紧轴到P2(压紧点) "); OutStoreLog("出库定位:拿物品,升降轴到P6( 库位出料缓冲点)["+ MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6 + "],压紧轴到P2(压紧点) ["+ moveP.ComPress_P2 + "]");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6, Config.UpDownAxis_P6_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6, Config.UpDownAxis_P6_Speed);
ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.MoveP.ComPress_P2, Config.CompAxis_P2_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P2, Config.CompAxis_P2_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_16_GetWare) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_16_GetWare)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_17_UpdownToP42); MoveInfo.NextMoveStep(StoreMoveStep.SOL_17_UpdownToP42);
OutStoreLog("出库定位2:放下物品,升降轴到P4( 库位入料缓冲点) "); OutStoreLog("出库定位2:放下物品,压紧轴到P3["+ MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3 + "],升降轴到P4( 库位入料缓冲点)["+ MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4 + "] ");
//压紧轴放松,压紧轴到压紧前点P3 //压紧轴放松,压紧轴到压紧前点P3
ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.LocationPos.CompressAxis_CPosition_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4, Config.UpDownAxis_P4_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_ILPosition_P4, Config.UpDownAxis_P4_Speed);
...@@ -714,14 +714,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -714,14 +714,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_18_WaitTime2) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_18_WaitTime2)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_19_GetWare2); MoveInfo.NextMoveStep(StoreMoveStep.SOL_19_GetWare2);
OutStoreLog("出库定位2:拿物品,升降轴到P6( 库位出料缓冲点),压紧轴到P2(压紧点) "); OutStoreLog("出库定位2:拿物品,升降轴到P6( 库位出料缓冲点)["+ MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6 + "],压紧轴到P2(压紧点) ["+ moveP.ComPress_P2 + "]");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6, Config.UpDownAxis_P6_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.LocationPos.UpDownAxis_OHPosition_P6, Config.UpDownAxis_P6_Speed);
ACAxisMove(Config.Comp_Axis, MoveInfo.MoveParam.MoveP.ComPress_P2, Config.CompAxis_P2_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P2, Config.CompAxis_P2_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_19_GetWare2) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_19_GetWare2)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SOL_20_InoutToP1); MoveInfo.NextMoveStep(StoreMoveStep.SOL_20_InoutToP1);
OutStoreLog("出库定位: 进出轴到P1( 待机点) "); OutStoreLog("出库定位: 进出轴到P1( 待机点)["+ Config.InOutAxis_P1_Position + "] ");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SOL_20_InoutToP1) else if (MoveInfo.MoveStep == StoreMoveStep.SOL_20_InoutToP1)
...@@ -743,7 +743,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -743,7 +743,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_23_InoutToP2) else if (MoveInfo.MoveStep == StoreMoveStep.SO_23_InoutToP2)
{ {
OutStoreLog("出库:升降轴至P8(进料口出料缓冲点) "); OutStoreLog("出库:压紧轴到P1["+ moveP.ComPress_P1 + "],升降轴至P8(进料口出料缓冲点)["+ moveP.UpDown_P8 + "] ");
MoveInfo.NextMoveStep(StoreMoveStep.SO_24_PutWare); MoveInfo.NextMoveStep(StoreMoveStep.SO_24_PutWare);
//NeedCheckSafetyLight = 0; //NeedCheckSafetyLight = 0;
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
...@@ -753,15 +753,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -753,15 +753,15 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep == StoreMoveStep.SO_24_PutWare) else if (MoveInfo.MoveStep == StoreMoveStep.SO_24_PutWare)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_25_InoutToP1); MoveInfo.NextMoveStep(StoreMoveStep.SO_25_InoutToP1);
OutStoreLog("出库:进出轴动作至P1(待机点) "); OutStoreLog("出库:进出轴动作至P1(待机点) ["+ moveP.InOut_P1 + "]");
InOutBackToP1(moveP.InOut_P1); InOutBackToP1(moveP.InOut_P1);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_25_InoutToP1) else if (MoveInfo.MoveStep == StoreMoveStep.SO_25_InoutToP1)
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_26_CloseDoor); MoveInfo.NextMoveStep(StoreMoveStep.SO_26_CloseDoor);
OutStoreLog("出库:轴2至P1(待机点) ,关闭舱门"); OutStoreLog("出库:轴2至P1(待机点)["+ moveP.UpDown_P1 + "] ,关闭舱门");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor(); CloseDoor();
} }
...@@ -838,7 +838,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -838,7 +838,7 @@ namespace OnlineStore.DeviceLibrary
private void SO_28_GoBack() private void SO_28_GoBack()
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_28_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.SO_28_GoBack);
OutStoreLog("出库:轴2至P1(待机点) ,关闭舱门"); OutStoreLog("出库:轴2至P1(待机点)["+ MoveInfo.MoveParam.MoveP.UpDown_P1 + "] ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor(); CloseDoor();
//发送消息给流水线 //发送消息给流水线
...@@ -848,7 +848,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -848,7 +848,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LineMoveP moveP = MoveInfo.MoveParam.MoveP; LineMoveP moveP = MoveInfo.MoveParam.MoveP;
MoveInfo.NextMoveStep(StoreMoveStep.SO_21_ToDoorP); MoveInfo.NextMoveStep(StoreMoveStep.SO_21_ToDoorP);
OutStoreLog("出库:旋转轴至P1(待机点)升降轴至P2(进料口出料前点),打开舱门 "); OutStoreLog("出库:旋转轴至P1(待机点)["+ moveP.Middle_P1 + "],升降轴至P2(进料口出料前点)["+ moveP.UpDown_P2 + "] ,打开舱门 ");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
} }
...@@ -887,7 +887,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -887,7 +887,7 @@ namespace OnlineStore.DeviceLibrary
//判断仓门是否打开 //判断仓门是否打开
LineMoveP moveP = MoveInfo.MoveParam.MoveP; LineMoveP moveP = MoveInfo.MoveParam.MoveP;
MoveInfo.NextMoveStep(StoreMoveStep.SO_23_InoutToP2); MoveInfo.NextMoveStep(StoreMoveStep.SO_23_InoutToP2);
OutStoreLog("出库:进出轴至P2(进料口取料点) "); OutStoreLog("出库:进出轴至P2(进料口取料点) ["+ moveP.InOut_P2 + "]");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1; //NeedCheckSafetyLight = 1;
} }
...@@ -902,19 +902,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -902,19 +902,6 @@ namespace OnlineStore.DeviceLibrary
public bool InOutAxisCanMove() public bool InOutAxisCanMove()
{ {
return true; return true;
//if (StoreManager.Store.Config.IsHasLocationCylinder.Equals(0))
//{
// return true;
//}
//if (IOValue(IO_Type.LocationCylinder_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder_Up).Equals(IO_VALUE.LOW)
// && IOValue(IO_Type.LocationCylinder2_Down).Equals(IO_VALUE.HIGH)
// && IOValue(IO_Type.LocationCylinder2_Up).Equals(IO_VALUE.LOW))
//{
// return true;
//}
//return false;
} }
#endregion #endregion
......
...@@ -233,54 +233,54 @@ ...@@ -233,54 +233,54 @@
// toolStripSeparator1 // toolStripSeparator1
// //
this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator1.Size = new System.Drawing.Size(114, 6);
// //
// 启动AToolStripMenuItem // 启动AToolStripMenuItem
// //
this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem"; this.启动AToolStripMenuItem.Name = "启动AToolStripMenuItem";
this.启动AToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.启动AToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.启动AToolStripMenuItem.Text = "启动 "; this.启动AToolStripMenuItem.Text = "启动 ";
this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动所有料仓AToolStripMenuItem_Click); this.启动AToolStripMenuItem.Click += new System.EventHandler(this.启动所有料仓AToolStripMenuItem_Click);
// //
// toolStripSeparator4 // toolStripSeparator4
// //
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(114, 6);
// //
// 复位RToolStripMenuItem // 复位RToolStripMenuItem
// //
this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem"; this.复位RToolStripMenuItem.Name = "复位RToolStripMenuItem";
this.复位RToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复位RToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.复位RToolStripMenuItem.Text = "复位"; this.复位RToolStripMenuItem.Text = "复位";
this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click); this.复位RToolStripMenuItem.Click += new System.EventHandler(this.复位RToolStripMenuItem_Click);
// //
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(114, 6);
// //
// 停止TToolStripMenuItem // 停止TToolStripMenuItem
// //
this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem"; this.停止TToolStripMenuItem.Name = "停止TToolStripMenuItem";
this.停止TToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.停止TToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.停止TToolStripMenuItem.Text = "停止"; this.停止TToolStripMenuItem.Text = "停止";
this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止所有料仓TToolStripMenuItem_Click); this.停止TToolStripMenuItem.Click += new System.EventHandler(this.停止所有料仓TToolStripMenuItem_Click);
// //
// toolStripSeparator5 // toolStripSeparator5
// //
this.toolStripSeparator5.Name = "toolStripSeparator5"; this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator5.Size = new System.Drawing.Size(114, 6);
// //
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(114, 6);
this.toolStripSeparator2.Visible = false; this.toolStripSeparator2.Visible = false;
// //
// 退出ToolStripMenuItem // 退出ToolStripMenuItem
// //
this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem"; this.退出ToolStripMenuItem.Name = "退出ToolStripMenuItem";
this.退出ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.退出ToolStripMenuItem.Size = new System.Drawing.Size(117, 26);
this.退出ToolStripMenuItem.Text = "退出"; this.退出ToolStripMenuItem.Text = "退出";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1); this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click_1);
// //
...@@ -355,12 +355,14 @@ ...@@ -355,12 +355,14 @@
this.板卡调试ToolStripMenuItem.Name = "板卡调试ToolStripMenuItem"; this.板卡调试ToolStripMenuItem.Name = "板卡调试ToolStripMenuItem";
this.板卡调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.板卡调试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.板卡调试ToolStripMenuItem.Text = "板卡调试"; this.板卡调试ToolStripMenuItem.Text = "板卡调试";
this.板卡调试ToolStripMenuItem.Visible = false;
this.板卡调试ToolStripMenuItem.Click += new System.EventHandler(this.板卡调试ToolStripMenuItem_Click); this.板卡调试ToolStripMenuItem.Click += new System.EventHandler(this.板卡调试ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator7.Visible = false;
// //
// 帮助ToolStripMenuItem // 帮助ToolStripMenuItem
// //
...@@ -379,43 +381,43 @@ ...@@ -379,43 +381,43 @@
// toolStripMenuItem3 // toolStripMenuItem3
// //
this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 26); this.toolStripMenuItem3.Size = new System.Drawing.Size(144, 26);
this.toolStripMenuItem3.Text = "料仓配置"; this.toolStripMenuItem3.Text = "料仓配置";
this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click);
// //
// toolStripSeparator9 // toolStripSeparator9
// //
this.toolStripSeparator9.Name = "toolStripSeparator9"; this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator9.Size = new System.Drawing.Size(141, 6);
// //
// 版本号ToolStripMenuItem // 版本号ToolStripMenuItem
// //
this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem"; this.版本号ToolStripMenuItem.Name = "版本号ToolStripMenuItem";
this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.版本号ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.版本号ToolStripMenuItem.Text = "关于软件"; this.版本号ToolStripMenuItem.Text = "关于软件";
this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click); this.版本号ToolStripMenuItem.Click += new System.EventHandler(this.版本号ToolStripMenuItem_Click);
// //
// toolStripSeparator13 // toolStripSeparator13
// //
this.toolStripSeparator13.Name = "toolStripSeparator13"; this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator13.Size = new System.Drawing.Size(141, 6);
// //
// 复制日志ToolStripMenuItem // 复制日志ToolStripMenuItem
// //
this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem"; this.复制日志ToolStripMenuItem.Name = "复制日志ToolStripMenuItem";
this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.复制日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.复制日志ToolStripMenuItem.Text = "复制日志"; this.复制日志ToolStripMenuItem.Text = "复制日志";
this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click); this.复制日志ToolStripMenuItem.Click += new System.EventHandler(this.复制日志ToolStripMenuItem_Click);
// //
// toolStripSeparator12 // toolStripSeparator12
// //
this.toolStripSeparator12.Name = "toolStripSeparator12"; this.toolStripSeparator12.Name = "toolStripSeparator12";
this.toolStripSeparator12.Size = new System.Drawing.Size(177, 6); this.toolStripSeparator12.Size = new System.Drawing.Size(141, 6);
// //
// 清空日志ToolStripMenuItem // 清空日志ToolStripMenuItem
// //
this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem"; this.清空日志ToolStripMenuItem.Name = "清空日志ToolStripMenuItem";
this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(180, 26); this.清空日志ToolStripMenuItem.Size = new System.Drawing.Size(144, 26);
this.清空日志ToolStripMenuItem.Text = "清空日志"; this.清空日志ToolStripMenuItem.Text = "清空日志";
this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click); this.清空日志ToolStripMenuItem.Click += new System.EventHandler(this.清空日志ToolStripMenuItem_Click);
// //
...@@ -463,7 +465,7 @@ ...@@ -463,7 +465,7 @@
// //
// FrmStore // FrmStore
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White; this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1350, 729); this.ClientSize = new System.Drawing.Size(1350, 729);
......
...@@ -86,9 +86,9 @@ ...@@ -86,9 +86,9 @@
this.groupBox6.Controls.Add(this.btnClear); this.groupBox6.Controls.Add(this.btnClear);
this.groupBox6.Controls.Add(this.richTextBox1); this.groupBox6.Controls.Add(this.richTextBox1);
this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox6.Location = new System.Drawing.Point(6, 5); this.groupBox6.Location = new System.Drawing.Point(5, 4);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(1008, 707); this.groupBox6.Size = new System.Drawing.Size(1010, 709);
this.groupBox6.TabIndex = 250; this.groupBox6.TabIndex = 250;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
// //
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
this.groupBox2.Controls.Add(this.txtTargetPosition); this.groupBox2.Controls.Add(this.txtTargetPosition);
this.groupBox2.Location = new System.Drawing.Point(9, 192); this.groupBox2.Location = new System.Drawing.Point(9, 192);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(458, 504); this.groupBox2.Size = new System.Drawing.Size(458, 506);
this.groupBox2.TabIndex = 283; this.groupBox2.TabIndex = 283;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "位置信息"; this.groupBox2.Text = "位置信息";
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
this.txtP4Offset.Name = "txtP4Offset"; this.txtP4Offset.Name = "txtP4Offset";
this.txtP4Offset.Size = new System.Drawing.Size(121, 26); this.txtP4Offset.Size = new System.Drawing.Size(121, 26);
this.txtP4Offset.TabIndex = 287; this.txtP4Offset.TabIndex = 287;
this.txtP4Offset.Text = "-6000"; this.txtP4Offset.Text = "-60";
// //
// label10 // label10
// //
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
this.txtP3Offset.Name = "txtP3Offset"; this.txtP3Offset.Name = "txtP3Offset";
this.txtP3Offset.Size = new System.Drawing.Size(121, 26); this.txtP3Offset.Size = new System.Drawing.Size(121, 26);
this.txtP3Offset.TabIndex = 285; this.txtP3Offset.TabIndex = 285;
this.txtP3Offset.Text = "6000"; this.txtP3Offset.Text = "60";
// //
// label9 // label9
// //
...@@ -185,7 +185,7 @@ ...@@ -185,7 +185,7 @@
this.txtP6Offset.Name = "txtP6Offset"; this.txtP6Offset.Name = "txtP6Offset";
this.txtP6Offset.Size = new System.Drawing.Size(121, 26); this.txtP6Offset.Size = new System.Drawing.Size(121, 26);
this.txtP6Offset.TabIndex = 283; this.txtP6Offset.TabIndex = 283;
this.txtP6Offset.Text = "6000"; this.txtP6Offset.Text = "60";
// //
// label5 // label5
// //
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
this.txtP5Offset.Name = "txtP5Offset"; this.txtP5Offset.Name = "txtP5Offset";
this.txtP5Offset.Size = new System.Drawing.Size(121, 26); this.txtP5Offset.Size = new System.Drawing.Size(121, 26);
this.txtP5Offset.TabIndex = 281; this.txtP5Offset.TabIndex = 281;
this.txtP5Offset.Text = "-6000"; this.txtP5Offset.Text = "-60";
// //
// label4 // label4
// //
...@@ -500,7 +500,7 @@ ...@@ -500,7 +500,7 @@
// btnExit // btnExit
// //
this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnExit.Location = new System.Drawing.Point(838, 665); this.btnExit.Location = new System.Drawing.Point(840, 668);
this.btnExit.Name = "btnExit"; this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(132, 36); this.btnExit.Size = new System.Drawing.Size(132, 36);
this.btnExit.TabIndex = 281; this.btnExit.TabIndex = 281;
...@@ -511,7 +511,7 @@ ...@@ -511,7 +511,7 @@
// btnClear // btnClear
// //
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.Location = new System.Drawing.Point(691, 665); this.btnClear.Location = new System.Drawing.Point(693, 668);
this.btnClear.Name = "btnClear"; this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(132, 36); this.btnClear.Size = new System.Drawing.Size(132, 36);
this.btnClear.TabIndex = 106; this.btnClear.TabIndex = 106;
...@@ -527,7 +527,7 @@ ...@@ -527,7 +527,7 @@
this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.richTextBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.richTextBox1.Location = new System.Drawing.Point(473, 20); this.richTextBox1.Location = new System.Drawing.Point(473, 20);
this.richTextBox1.Name = "richTextBox1"; this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(526, 642); this.richTextBox1.Size = new System.Drawing.Size(528, 644);
this.richTextBox1.TabIndex = 105; this.richTextBox1.TabIndex = 105;
this.richTextBox1.Text = ""; this.richTextBox1.Text = "";
// //
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!