Commit 61eb4022 LN

1

1 个父辈 6b4a395d
......@@ -53,35 +53,7 @@ namespace OnlineStore.Common
}
#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>
/// 构造函数,可以自定义串口的初始化参数
......@@ -224,56 +196,7 @@ namespace OnlineStore.Common
}
#endregion
#region 发送数据string类型
//public void SendData(string data)
//{ //发送数据
// if (_serialPort.IsOpen)
// {
// lock (lockObj)
// {
// _serialPort.Write(data);
// System.Threading.Thread.Sleep(10);
// }
// }
//}
#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 + "】");
// lock (lockObj)
// {
// try
// {
// if (_serialPort.IsOpen)
// {
// _serialPort.DiscardInBuffer();//清空接收缓冲区
// _serialPort.Write(data, offset, count);
// System.Threading.Thread.Sleep(10);
// }
// }
// catch (Exception ex)
// {
// _serialPort.DiscardOutBuffer();
// LogUtil.error(LOGGER, "SendData ERROR:" + ex.ToString(), 21);
// }
// }
//}
#endregion
#region 发送命令
/// <summary>
/// 发送命令
......@@ -414,31 +337,8 @@ namespace OnlineStore.Common
#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>
/// 把字节型转换成十六进制字符串
......
......@@ -18,10 +18,7 @@ namespace OnlineStore.DeviceLibrary
this.Name = deviceName;
this.PortName = port;
}
public bool Init()
{
return HumitureController.Init(PortName);
}
public HumitureParam QueryData()
{
HumitureParam param = HumitureController.QueryData(PortName);
......
......@@ -189,7 +189,7 @@ namespace OnlineStore.DeviceLibrary
return false;
}
ShelfPosition sp = CSVPositionReader<ShelfPosition>.GetPositon(param.ShelfPosID);
if (sp == null&&needCheckShelf)
if (sp == null && needCheckShelf)
{
LogUtil.error(box.Name + "GetPositon[" + param.ShelfPosID + "]=null,没有库位不能执行出入库");
return false;
......@@ -215,7 +215,7 @@ namespace OnlineStore.DeviceLibrary
p.InOut_P11 = box.Config.InOutAxis_P11_Position;
p.Middle_P11 = box.Config.MiddleAxis_P11;
p.UpDown_P11 = box.Config.UpDownAxis_P11;
p.UpDown_P12 = box.Config.UpDownAxis_P12;
p.UpDown_P12 = box.Config.UpDownAxis_P12;
p.ComPress_P2 = box.Config.GetComP2(position.BagHigh).TargetComP2();
p.ComPress_P3 = position.ComAxis_P3;
......
......@@ -56,9 +56,9 @@ PRO,升降轴(轴2)P1待机点/扫码放料低点,UpDownAxis_P1,309300,,,,,,,
PRO,升降轴(轴2)P2扫码放料高点缓冲点,UpDownAxis_P2,415000,,,,,,,
PRO,旋转轴(轴1)P1待机点/扫码放料点,MiddleAxis_P1,268093,,,,,,,
PRO,进出轴(轴3)P1待机点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机点,CompAxis_P1_Position,10000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,,
PRO,压紧轴(轴4)P1待机点,CompAxis_P1_Position,97900,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,97900,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,100000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
PRO,压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#),CompAxis_P2_List,8=1000;2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000# ,,,,,,,
,,,,,,,,,,
......@@ -92,17 +92,17 @@ PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,250,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,250,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,150,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,250,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,100,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,100,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,100,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,200,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,200,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,200,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,120,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,120,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,100,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,100,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,1000,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,100,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,100,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,100,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,200,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,200,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,200,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,300,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,300,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,300,,,,,,,
,,,,,,,,,,
PRO,升降轴(轴2)P101速度,UpDownAxis_P101_Speed,100,,,,,, ,
PRO,升降轴(轴2)P102速度,UpDownAxis_P102_Speed,100,,,,,,,
......
......@@ -96,7 +96,7 @@ PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,120,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,120,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,100,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,100,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,1000,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,100,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,100,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,100,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,100,,,,,,,
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!