Commit d7299a86 几米阳光

1.使用硕科步进电机作为压紧轴

2.温湿度修改为com通信
3.IO调整
1 个父辈 d6324b1e
此文件类型无法预览
此文件类型无法预览
...@@ -89,6 +89,13 @@ namespace OnlineStore.ACSingleStore ...@@ -89,6 +89,13 @@ namespace OnlineStore.ACSingleStore
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString(); //txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
} }
List<string> port = new List<string>(SerialPort.GetPortNames());
comboBoxPortName.DataSource = port;
if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
{
comboBoxPortName.SelectedIndex = port.IndexOf(store.Config.CompressAxis_PortName);
}
cmbHomeType.SelectedIndex = 0;
timer1.Enabled = true; timer1.Enabled = true;
} }
#endregion #endregion
...@@ -220,13 +227,17 @@ namespace OnlineStore.ACSingleStore ...@@ -220,13 +227,17 @@ namespace OnlineStore.ACSingleStore
if (store.Config.IsHasDoorLimit.Equals(1)) if (store.Config.IsHasDoorLimit.Equals(1))
{ {
if (store.KNDIOValue(IO_Type.Left_Door_LimitSingle).Equals(IO_VALUE.LOW)) //if (store.KNDIOValue(IO_Type.Left_Door_LimitSingle).Equals(IO_VALUE.LOW))
{ //{
lblWarnMsg.Text = lblWarnMsg.Text + " 左侧门未关"; // lblWarnMsg.Text = lblWarnMsg.Text + " 左侧门未关";
} //}
if (store.KNDIOValue(IO_Type.Right_Door_LimitSingle).Equals(IO_VALUE.LOW)) //if (store.KNDIOValue(IO_Type.Right_Door_LimitSingle).Equals(IO_VALUE.LOW))
//{
// lblWarnMsg.Text = lblWarnMsg.Text + " 右侧门未关";
//}
if (store.KNDIOValue(IO_Type.Door_LimitSingle).Equals(IO_VALUE.LOW))
{ {
lblWarnMsg.Text = lblWarnMsg.Text + " 右侧门未关"; lblWarnMsg.Text = lblWarnMsg.Text + " 门未关";
} }
} }
//如果不在出入库中,且叉子上有信号,需要提示检查叉子 //如果不在出入库中,且叉子上有信号,需要提示检查叉子
...@@ -907,11 +918,6 @@ namespace OnlineStore.ACSingleStore ...@@ -907,11 +918,6 @@ namespace OnlineStore.ACSingleStore
LogUtil.ClearLog(); LogUtil.ClearLog();
} }
private void btnRelMove_Click(object sender, EventArgs e)
{
//int posi = FormUtil.GetIntValue(txtLinePosition);
//ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
}
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e) private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
{ {
...@@ -1232,5 +1238,67 @@ namespace OnlineStore.ACSingleStore ...@@ -1232,5 +1238,67 @@ namespace OnlineStore.ACSingleStore
int value = ACServerManager.GetHomeSingle(GetPortName(), GetSlaveAddr()); int value = ACServerManager.GetHomeSingle(GetPortName(), GetSlaveAddr());
this.txtHomeSingle.Text = value.ToString(); this.txtHomeSingle.Text = value.ToString();
} }
private void btnOpen_Click(object sender, EventArgs e)
{
if (ACStoreManager.OpenShuoKe(store))
{
store.SetShuokeSpeed();
FormComStatus(true);
}
}
private void btnClose_Click(object sender, EventArgs e)
{
ShuoKeControls.ClosePort();
FormComStatus(false);
}
private void btnVolMove_Click(object sender, EventArgs e)
{
int speed = FormUtil.GetIntValue(txtSpeed);
ShuoKeControls.VolMove(store.Config.CompressAxis_Slv, speed);
}
private void btnGetPosition_Click(object sender, EventArgs e)
{
ShuoKeControls.GetABSPosition(store.Config.CompressAxis_Slv);
}
private void btnStop_Click(object sender, EventArgs e)
{
ShuoKeControls.SuddownStop(this.store.Config.CompressAxis_Slv);
}
private void btnClearPosition_Click(object sender, EventArgs e)
{
ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.AbsPositionClear);
ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.RelPositionClear);
}
private void btnHomeMove_Click(object sender, EventArgs e)
{
ShuoKeControls.HomeMove(this.store.Config.CompressAxis_Slv, byte.Parse(cmbHomeType.SelectedIndex.ToString()));
}
private void btnLineAbsMove_Click(object sender, EventArgs e)
{
int posi = FormUtil.GetIntValue(txtLinePosition);
ShuoKeControls.AbsMove(this.store.Config.CompressAxis_Slv, posi);
}
private void btnRelMove_Click(object sender, EventArgs e)
{
int posi = FormUtil.GetIntValue(txtLinePosition);
ShuoKeControls.RelativeMove(this.store.Config.CompressAxis_Slv, posi);
}
private void btnStatusSearch_Click(object sender, EventArgs e)
{
ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv);
}
private void FormComStatus(bool isOpen)
{
btnOpen.Enabled = !isOpen;
btnClose.Enabled = isOpen;
btnClearPosition.Enabled = isOpen;
btnVolMove.Enabled = isOpen;
btnGetPosition.Enabled = isOpen;
btnHomeMove.Enabled = isOpen;
btnLineAbsMove.Enabled = isOpen;
btnStatusSearch.Enabled = isOpen;
// Bt_ClearCounter.Enabled = isOpen;
}
} }
} }
...@@ -124,10 +124,10 @@ ...@@ -124,10 +124,10 @@
<value>107, 16</value> <value>107, 16</value>
</metadata> </metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>390, 39</value> <value>227, 16</value>
</metadata> </metadata>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>555, 39</value> <value>392, 16</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="notifyIcon1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
......
120181022新建分支RC26-LDACSingleStore联电料仓 120181022新建分支RC26-LDACSingleStore联电料仓
需要修改内容:
1.使用硕科步进电机作为压紧轴
2.温湿度修改为com通信
3.增加安全光栅信号,当叉子出料过程中,遮挡光栅会暂停进出轴移动,光栅正常时再恢复移动
4.增加模拟量IO
\ No newline at end of file \ No newline at end of file
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
<Compile Include="util\CSVReaderControl.cs" /> <Compile Include="util\CSVReaderControl.cs" />
<Compile Include="util\FormUtil.cs" /> <Compile Include="util\FormUtil.cs" />
<Compile Include="util\HttpHelper.cs" /> <Compile Include="util\HttpHelper.cs" />
<Compile Include="util\HumitureController.cs" />
<Compile Include="util\HumitureServer.cs" /> <Compile Include="util\HumitureServer.cs" />
<Compile Include="util\JsonHelper.cs" /> <Compile Include="util\JsonHelper.cs" />
<Compile Include="util\LogUtil.cs" /> <Compile Include="util\LogUtil.cs" />
......

using log4net;
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Reflection;
using System.Text;
namespace OnlineStore.Common
{
public class HumitureController
{
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public static bool IsRun = false;
public static string serialPort = "";
private static int bautRate = 4800;//波特率
private static Parity parity = Parity.None;//校验位
private static int dataBits = 8;//数据位
private static StopBits stopBits = StopBits.One; //停止位
private static AcSerialBean sb = null;
private static string LogName = "";
public static bool Init(string port)
{
if (IsRun && port.Equals(serialPort))
{
return true;
}
else if (IsRun)
{
Release();
}
LogName = "温湿度传感器[" + port + "]";
if (sb == null)
{
serialPort = port;
sb = new AcSerialBean(serialPort, bautRate, parity, dataBits, stopBits);
}
try
{
if (sb.openPort())
{
IsRun = true;
return true;
}
else
{
LogUtil.error(LOGGER, LogName + "串口打开失败!");
IsRun = false;
return false;
}
}
catch (Exception ex)
{
IsRun = false;
}
return true;
}
/// <summary>
/// 释放资源
/// </summary>
public static void Release()
{
sb.closePort();
IsRun = false;
}
public static ASTemperateParam LastData = new ASTemperateParam(0, 0);
public static ASTemperateParam QueryData()
{
ASTemperateParam param = new ASTemperateParam(0, 0);
List<double> data = queryData();
if (data.Count.Equals(2))
{
param = new ASTemperateParam(data[0], data[1]);
}
LastData = param;
return param;
}
/// <summary>
/// 返回温度和湿度
/// </summary>
/// <returns></returns>
private static List<double> queryData()
{
// 温度计算:
//当温度低于 0 ℃ 时温度数据以补码的形式上传。
//温度:FF9B H(十六进制)= -101 => 温度 = -10.1℃
//湿度计算:
//湿度:292 H(十六进制) = 658 => 湿度 = 65.8 % RH
if (IsRun.Equals(false))
{
return new List<double>();
}
byte[] sendData = new byte[8];
sendData[0] = 0x01;
sendData[1] = 0x03;
sendData[2] = 0x00;
sendData[3] = 0x00;
sendData[4] = 0x00;
sendData[5] = 0x02;
sendData[6] = 0x00;
sendData[7] = 0x00;
sendData = buildCheckData(sendData, sendData.Length-2);
string str = AcSerialBean.byteToHexStr(sendData);
LogUtil.info("温湿度控制器发送数据:" + str);
byte[] reviceData = new byte[9];
bool isOk = false;
sb.SendCommand(sendData, ref reviceData, 100, out isOk);
return getReviceData(reviceData);
}
private static byte[] buildCheckData(byte[] sendData, int length)
{
ushort pChecksum = 0;
SerialBean.CalculateCRC(sendData, length, out pChecksum);
string checkStr = Convert.ToString(pChecksum, 16);
byte[] checkByte = SerialBean.StringToByte(checkStr);
if (checkByte.Length == 1)
{
sendData[length] = checkByte[0];
sendData[length + 1] = 0x00;
}
else
{
sendData[length + 1] = checkByte[0];
sendData[length] = checkByte[1];
}
return sendData;
}
private static List<double> getReviceData(byte[] dataArray)
{
List<double> list = new List<double>();
try
{
if (dataArray == null)
{
return list;
}
if (dataArray.Length >= 9)
{
string temp = String.Format("{0:X2}", dataArray[3])+ String.Format("{0:X2}", dataArray[4]);
string hum = String.Format("{0:X2}", dataArray[5]) + String.Format("{0:X2}", dataArray[6]);
double tempV = (double)Convert.ToInt32(temp, 16)/10;
double humV =(double) Convert.ToInt32(hum, 16)/10;
list.Add(tempV);
list.Add(humV);
}
}
catch (Exception ex)
{
LOGGER.Info(LogName + "转换出错:" + ex.ToString());
}
return list;
}
}
}
类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID 类型,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义,SlaveID,
DI,急停,SuddenStop_BTN,200,192.168.200.10,0,急停,X01,DI-01,0 DI,急停,SuddenStop_BTN,200,192.168.200.10,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,201,192.168.200.10,0,复位,X02,DI-02,0 DI,复位,Reset_BTN,201,192.168.200.10,0,复位,X02,DI-02,0,
DI,自动,AutoRun_Single,202,192.168.200.10,0,自动,X03,DI-03,0 DI,自动,AutoRun_Single,202,192.168.200.10,0,自动,X03,DI-03,0,
DI,气压检测,Airpressure_Check,203,192.168.200.10,0,气压检测,X04,DI-04,0 DI,气压检测,Airpressure_Check,203,192.168.200.10,0,气压检测,X04,DI-04,0,
DI,料仓门口料盘检测,TrayCheck_Door,204,192.168.200.10,0,料仓门口料盘检测,X05,DI-05,0 DI,料盘检测1(进料口),TrayCheck_Door,204,192.168.200.10,0,料盘检测1(进料口),X05,DI-05,0,
DI,叉子料盘检测,TrayCheck_Fixture,205,192.168.200.10,0,叉子料盘检测,X06,DI-06,0 DI,料盘检测2(料叉),TrayCheck_Fixture,205,192.168.200.10,0,料盘检测2(料叉),X06,DI-06,0,
DI,进料口门上升端,Door_Up,206,192.168.200.10,0,进料口门上升端,X07,DI-07,0 DI,进料口门上升端,Door_Up,206,192.168.200.10,0,进料口门上升端,X07,DI-07,0,
DI,进料口门下降端,Door_Down,207,192.168.200.10,0,进料口门下降端,X08,DI-08,0 DI,进料口门下降端,Door_Down,207,192.168.200.10,0,进料口门下降端,X08,DI-08,0,
DI,定位气缸1上升端,LocationCylinder_Up,208,192.168.200.10,0,定位气缸1上升端,X09,DI-09,0 ,,,208,192.168.200.10,0,,X09,DI-09,0,
DI,定位气缸1下降端,LocationCylinder_Down,209,192.168.200.10,0,定位气缸1下降端,X10,DI-10,0 ,,,209,192.168.200.10,0,,X10,DI-10,0,
DI,左侧门限位,Left_Door_LimitSingle,210,192.168.200.10,0,左侧门限位,X11,DI-11,0 DI,前门限位,Door_LimitSingle,210,192.168.200.10,0,前门限位,X11,DI-11,0,
DI,右侧门限位,Right_Door_LimitSingle,211,192.168.200.10,0,右侧门限位,X12,DI-12,0 ,,,211,192.168.200.10,0,,X12,DI-12,0,
DI,料盘检测3,TrayCheck_3,212,192.168.200.10,0,料盘检测3,X13,DI-13,0 DI,安全光栅,SafetyLightCurtains,212,192.168.200.10,0,安全光栅,X13,DI-13,0,
DI,料盘检测4,TrayCheck_4,213,192.168.200.10,0,料盘检测4,X14,DI-14,0 ,,,213,192.168.200.10,0,,X14,DI-14,0,
DI,定位气缸2上升端,LocationCylinder2_Up,214,192.168.200.10,0,定位气缸2上升端,X15,DI-15,0 ,,,214,192.168.200.10,0,,X15,DI-15,0,
DI,定位气缸2下降端,LocationCylinder2_Down,215,192.168.200.10,0,定位气缸2下降端,X16,DI-16,0 ,,,215,192.168.200.10,0,,X16,DI-16,0,
DO,自动指示灯,AutoRun_HddLed,100,192.168.200.10,0,自动指示灯,Y01,DO-01,0 DO,自动指示灯,AutoRun_HddLed,100,192.168.200.10,0,自动指示灯,Y01,DO-01,0,
DO,故障指示灯,Alarm_HddLed,101,192.168.200.10,0,故障指示灯,Y02,DO-02,0 DO,故障指示灯,Alarm_HddLed,101,192.168.200.10,0,故障指示灯,Y02,DO-02,0,
DO,待机指示灯,RunSign_HddLed,102,192.168.200.10,0,待机指示灯,Y03,DO-03,0 DO,待机指示灯,RunSign_HddLed,102,192.168.200.10,0,待机指示灯,Y03,DO-03,0,
DO,吹气SOL ON,StartOrStopBlow,103,192.168.200.10,0,吹气SOL ON,Y04,DO-04,0 DO,吹气SOL ON,StartOrStopBlow,103,192.168.200.10,0,吹气SOL ON,Y04,DO-04,0,
DO,料仓运转ON,Run_Sign,104,192.168.200.10,0,料仓运转ON,Y05,DO-05,0 DO,料仓运转ON,Run_Sign,104,192.168.200.10,0,料仓运转ON,Y05,DO-05,0,
DO,轴2刹车电源ON,Axis_Brake,105,192.168.200.10,0,轴2刹车电源ON,Y06,DO-06,0 DO,轴2刹车电源ON,Axis_Brake,105,192.168.200.10,0,轴2刹车电源ON,Y06,DO-06,0,
DO,进料口门上升SOL,Door_Up,106,192.168.200.10,0,进料口门上升SOL,Y07,DO-07,0 DO,进料口门上升SOL,Door_Up,106,192.168.200.10,0,进料口门上升SOL,Y07,DO-07,0,
DO,进料口门下降SOL,Door_Down,107,192.168.200.10,0,进料口门下降SOL,Y08,DO-08,0 DO,进料口门下降SOL,Door_Down,107,192.168.200.10,0,进料口门下降SOL,Y08,DO-08,0,
DO,定位上升SOL,LocationCylinder_Up,108,192.168.200.10,0,定位上升SOL,Y09,DO-09,0 ,,,108,192.168.200.10,0,,Y09,DO-09,0,
DO,定位下降SOL,LocationCylinder_Down,109,192.168.200.10,0,定位下降SOL,Y10,DO-10,0 ,,,109,192.168.200.10,0,,Y10,DO-10,0,
DO,相机照明开,CameraLight_Power,110,192.168.200.10,0,相机照明开,Y11,DO-11,0 DO,相机照明开,CameraLight_Power,110,192.168.200.10,0,相机照明开,Y11,DO-11,0,
,,,111,192.168.200.10,0,,Y12,DO-12,0 ,,,111,192.168.200.10,0,,Y12,DO-12,0,
,,,112,192.168.200.10,0,,Y13,DO-13,0 ,,,112,192.168.200.10,0,,Y13,DO-13,0,
,,,113,192.168.200.10,0,,Y14,DO-14,0 ,,,113,192.168.200.10,0,,Y14,DO-14,0,
,,,114,192.168.200.10,0,,Y15,DO-15,0 ,,,114,192.168.200.10,0,,Y15,DO-15,0,
,,,115,192.168.200.10,0,,Y16,DO-16,0 ,,,115,192.168.200.10,0,,Y16,DO-16,0,
AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,, AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,, AXIS,(轴二)升降轴轴,UpDown_Axis,1,COM4,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,, AXIS,(轴三)进出轴,InOut_Axis,1,COM5,0,,,,,
PRO,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,, PRO,温湿度传感器地址,Temperate_ServerAddress,192.168.200.14,,,,,,,
PRO,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,, PRO,扫码枪IP,Scanner_Ip,192.168.200.13,,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,, PRO,扫码枪端口号,Scanner_Port,51236,,,,,,,
...@@ -44,9 +44,9 @@ PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,423300,,,,,,, ...@@ -44,9 +44,9 @@ PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,423300,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,-200400,,,,,,, PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1_Position,-200400,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,500,,,,,,, PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,500,,,,,,,
PRO,押金轴(轴4)P1待机原位点,CompressAxis_P1_Position,0,,,,,,, PRO,押金轴(轴4)P1待机原位点,CompressAxis_P1_Position,0,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,1,,,,,,, PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,0,,,,,,, PRO,是否有左右侧门,IsHasDoorLimit,0,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,0,,,,, ,, PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,0,,,,,,, PRO,设备是否处于调试状态(1=调试,0=正常),IsInDebug,0,,,,,,,
PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,, PRO,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,
PRO,温湿度传感器地址,TemperateServer_Port,9001,,,,,,, PRO,温湿度传感器地址,TemperateServer_Port,9001,,,,,,,
...@@ -103,3 +103,16 @@ PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,, ...@@ -103,3 +103,16 @@ PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,, PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,, PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,, PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,, ,
PRO,硕科步进电机(压紧轴)控制端口号,CompressAxis_PortName,COM2,,,,,,,
PRO,硕科步进电机(压紧轴)控制波特率,CompressAxis_PortBaudrate,9600,,,,,,,
PRO,硕科步进电机(压紧轴)控制奇偶校验,CompressAxis_PortParity,0,,,,,,,
PRO,硕科步进电机(压紧轴)控制停止位,CompressAxis_StopBits,1,,,,,,,
PRO,硕科步进电机(压紧轴)控制初速度,CompressAxis_StartSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制最大速度,CompressAxis_MaxSpeed,50000,,,,,,,
PRO,硕科步进电机(压紧轴)控制末速度,CompressAxis_EndSpeed,30000,,,,,,,
PRO,硕科步进电机(压紧轴)控制加速度,CompressAxis_AddSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制减速度,CompressAxis_DelSpeed,15000,,,,,,,
PRO,硕科步进电机(压紧轴)控制归零速度(原点返回速度),CompressAxis_HomeSpeed,15000,,,,,,,
PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,,
...@@ -20,6 +20,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,6 +20,24 @@ namespace OnlineStore.DeviceLibrary
public ACStoreManager() public ACStoreManager()
{ {
} }
public static bool OpenShuoKe(AC_SA_BoxBean box)
{
//打开硕科步进驱动器端口
Parity parity = (Parity)box.Config.CompressAxis_PortParity;
StopBits bit = (StopBits)box.Config.CompressAxis_StopBits;
bool result = ShuoKeControls.InitPort(box.Config.CompressAxis_PortName, box.Config.CompressAxis_PortBaudrate,
box.Config.CompressAxis_PortParity, 8, bit);
if (result)
{
LogUtil.info(box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】成功");
return true;
}
else
{
LogUtil.error(LOGGER, box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】失败,启动失败!");
return false;
}
}
public static void CheckEnum(Type type) public static void CheckEnum(Type type)
{ {
if (type.IsEnum) if (type.IsEnum)
...@@ -114,24 +132,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -114,24 +132,6 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error("出错:", ex); LOGGER.Error("出错:", ex);
} }
} }
public static bool OpenShuoKe(AC_SA_BoxBean box)
{
//打开硕科步进驱动器端口
//Parity parity = (Parity)box.Config.CompressAxis_PortParity;
//StopBits bit = (StopBits)box.Config.CompressAxis_StopBits;
//bool result = ShuoKeControls.InitPort(box.Config.CompressAxis_PortName, box.Config.CompressAxis_PortBaudrate,
// box.Config.CompressAxis_PortParity, 8, bit);
//if (result)
//{
// LogUtil.info(box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】成功");
// return true;
//}
//else
//{
// LogUtil.error(LOGGER, box.StoreName + "打开硕科步进控制器【" + box.Config.CompressAxis_PortName + "】失败,启动失败!");
// return false;
//}
return true;
}
} }
} }
...@@ -281,7 +281,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,7 +281,8 @@ namespace OnlineStore.DeviceLibrary
//TODO 启动时先所有轴远点返回,测试暂时关闭 //TODO 启动时先所有轴远点返回,测试暂时关闭
storeRunStatus = StoreRunStatus.HomeMoving; storeRunStatus = StoreRunStatus.HomeMoving;
//启动温湿度服务器 //启动温湿度服务器
HumitureServer.StartTemperateServer(Config.TemperateServer_Port); //HumitureServer.StartTemperateServer(Config.TemperateServer_Port);
HumitureController.Init(Config.Humiture_Port);
Task.Factory.StartNew(delegate () Task.Factory.StartNew(delegate ()
{ {
HDevelopExport.OpenAllCamera(); HDevelopExport.OpenAllCamera();
...@@ -324,10 +325,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -324,10 +325,24 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack);
ACAxisHomeMove(Config.InOut_Axis); ACAxisHomeMove(Config.InOut_Axis);
LogUtil.info(LOGGER, StoreName + "开始原点返回,先把进出轴回原点"); LogUtil.info(LOGGER, StoreName + "开始原点返回,先把进出轴回原点");
//设置速度
SetShuokeSpeed();
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000)); StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
public void SetShuokeSpeed()
{
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetAddSpeed, Config.CompressAxis_AddSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetDelSpeed, Config.CompressAxis_DelSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetEndSpeed, Config.CompressAxis_EndSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetHomeSpeed, Config.CompressAxis_HomeSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetMaxSpeed, Config.CompressAxis_MaxSpeed);
Thread.Sleep(100);
ShuoKeControls.SetSpeed(Config.CompressAxis_Slv, ShuoKeCMD.SetStartSpeed, Config.CompressAxis_StartSpeed);
}
public void MoveToP1() public void MoveToP1()
{ {
//压紧轴回原点,叉子回到P1,关闭门旋转轴和升降轴回到P1 //压紧轴回原点,叉子回到P1,关闭门旋转轴和升降轴回到P1
...@@ -385,12 +400,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -385,12 +400,8 @@ namespace OnlineStore.DeviceLibrary
if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0)) if (IsHasCompress_Axis || Config.IsHasLocationCylinder.Equals(0))
{ {
InoutStartReset(); InoutStartReset();
//StoreMove.NextMoveStep(StoreMoveStep.BOX_H_InOutBack); //硕科压紧轴回原点
//LogUtil.info(LOGGER, StoreName + "开始复位,先把进出轴回原点"); SetShuokeSpeed();
//ACAxisHomeMove(Config.InOut_Axis);
//StoreMove.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
else else
{ {
...@@ -472,8 +483,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -472,8 +483,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0); ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
} }
ACAxisHomeMove(Config.Middle_Axis); ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis); ACAxisHomeMove(Config.UpDown_Axis);
...@@ -501,6 +512,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -501,6 +512,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "到待机状态,压紧轴回原点,关闭舱门"); LogUtil.info(LOGGER, StoreName + "到待机状态,压紧轴回原点,关闭舱门");
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 1);
StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 1, true));
} }
//关闭舱门 //关闭舱门
CloseDoorAndWait(); CloseDoorAndWait();
...@@ -586,8 +599,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -586,8 +599,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack); StoreMove.NextMoveStep(StoreMoveStep.BOX_H_OtherAxisBack);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0); ShuoKeControls.HomeMove(Config.CompressAxis_Slv, 0);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, 0, true));
} }
ACAxisHomeMove(Config.Middle_Axis); ACAxisHomeMove(Config.Middle_Axis);
ACAxisHomeMove(Config.UpDown_Axis); ACAxisHomeMove(Config.UpDown_Axis);
...@@ -745,7 +758,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -745,7 +758,6 @@ namespace OnlineStore.DeviceLibrary
{ {
ShuoKeControls.ClosePort(); ShuoKeControls.ClosePort();
} }
//scanSocket.StopScanner();
HDevelopExport.CloseAllCamera(); HDevelopExport.CloseAllCamera();
HumitureServer.StopTemperateServer(); HumitureServer.StopTemperateServer();
...@@ -1210,7 +1222,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1210,7 +1222,7 @@ namespace OnlineStore.DeviceLibrary
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.SuddownStop(Config.CompressAxis_Slv); ShuoKeControls.SuddownStop(Config.CompressAxis_Slv);
} }
else else
{ {
...@@ -1434,7 +1446,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1434,7 +1446,8 @@ namespace OnlineStore.DeviceLibrary
preLogTime = DateTime.Now; preLogTime = DateTime.Now;
//用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4 //用最大的湿度判断是否需要吹气,开始吹气的值=发过来的值-4
//温湿度 //温湿度
ASTemperateParam param = HumitureServer.GetTemperateParam(Config.GetTempAddrList()); //ASTemperateParam param = HumitureServer.GetTemperateParam(Config.GetTempAddrList());
ASTemperateParam param = HumitureController.LastData;
double humidity = 0; double humidity = 0;
double temp = 0; double temp = 0;
if (param != null) if (param != null)
...@@ -1443,7 +1456,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1443,7 +1456,8 @@ namespace OnlineStore.DeviceLibrary
temp = param.Temperate; temp = param.Temperate;
currTempStr=("当前湿度:" + humidity.ToString()+",当前温度:"+temp); currTempStr=("当前湿度:" + humidity.ToString()+",当前温度:"+temp);
} }
double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList()); //double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
double currMaxHumidity = param.Humidity;
float startBlowHumidity = Max_Humidity - StartBlowValue; float startBlowHumidity = Max_Humidity - StartBlowValue;
float stopBlowHumidity = Max_Humidity - StopBlowValue; float stopBlowHumidity = Max_Humidity - StopBlowValue;
...@@ -1533,7 +1547,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1533,7 +1547,8 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
HumitureServer.RandomData(Config.GetTempAddrList()); //HumitureServer.RandomData(Config.GetTempAddrList());
HumitureController.QueryData();
HumidityProcess(); HumidityProcess();
LedProcess(); LedProcess();
isInProcess = true; isInProcess = true;
...@@ -1609,7 +1624,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -1609,7 +1624,8 @@ namespace OnlineStore.DeviceLibrary
} }
//温湿度 //温湿度
ASTemperateParam param = HumitureServer.GetTemperateParam(Config.Temperate_Serveraddress); //ASTemperateParam param = HumitureServer.GetTemperateParam(Config.Temperate_Serveraddress);
ASTemperateParam param = HumitureController.LastData;
if (param != null) if (param != null)
{ {
boxStatus.humidity = param.Humidity.ToString(); boxStatus.humidity = param.Humidity.ToString();
......
...@@ -356,8 +356,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -356,8 +356,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome); StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
} }
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
...@@ -366,10 +366,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -366,10 +366,10 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始"); InStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
//StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare); StoreMove.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
} }
else else
{ {
...@@ -390,9 +390,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -390,9 +390,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice); StoreMove.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false));
//System.Threading.Thread.Sleep(600); System.Threading.Thread.Sleep(600);
} }
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
...@@ -462,8 +462,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -462,8 +462,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag); StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
} }
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
} }
...@@ -487,8 +487,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,8 +487,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack); StoreMove.NextMoveStep(StoreMoveStep.SI_14_GoBack);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
} }
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
...@@ -585,8 +585,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -585,8 +585,8 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"); OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P3);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P3, false));
} }
ACAxisMove(Config.Middle_Axis, StoreMove.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, StoreMove.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed); ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
...@@ -604,8 +604,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -604,8 +604,8 @@ namespace OnlineStore.DeviceLibrary
//电缸微动至对应料盘的上端位置 //电缸微动至对应料盘的上端位置
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P2);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P2, false));
} }
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
} }
...@@ -681,8 +681,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -681,8 +681,8 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare); StoreMove.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
if (IsHasCompress_Axis) if (IsHasCompress_Axis)
{ {
//ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1); ShuoKeControls.AbsMove(Config.CompressAxis_Slv, moveP.ComPress_P1);
//StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false)); StoreMove.WaitList.Add(WaitResultInfo.WaitShuoKe(Config.CompressAxis_Slv, moveP.ComPress_P1, false));
} }
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P8, Config.UpDownAxis_P8_Speed);
} }
......
...@@ -17,16 +17,16 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -17,16 +17,16 @@ namespace OnlineStore.LoadCSVLibrary
{ {
} }
/// <summary> ///// <summary>
/// 温湿度传感器地址 ///// 温湿度传感器地址/COM口配置
/// </summary> ///// </summary>
[ConfigProAttribute("TemperateServer_Port")] //[ConfigProAttribute("TemperateServer_Port")]
public int TemperateServer_Port { get; set; } //public int TemperateServer_Port { get; set; }
/// <summary> ///// <summary>
/// 温湿度 传感器地址 ///// 温湿度 传感器地址
/// </summary> ///// </summary>
[ConfigProAttribute("Temperate_ServerAddress")] //[ConfigProAttribute("Temperate_ServerAddress")]
public string Temperate_Serveraddress { get; set; } //public string Temperate_Serveraddress { get; set; }
/// <summary> /// <summary>
/// 预警温度 /// 预警温度
/// </summary> /// </summary>
...@@ -288,24 +288,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -288,24 +288,6 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("Box_ResetACount")] [ConfigProAttribute("Box_ResetACount")]
public int Box_ResetACount { get; set; } public int Box_ResetACount { get; set; }
///// <summary>
///// PRO (轴一)旋转轴速度倍率 MiddleAxis_ResolveSpeed 10
///// </summary>
//[ConfigProAttribute("MiddleAxis_ResolveSpeed")]
//public int MiddleAxis_ResolveSpeed { get; set; }
///// <summary>
///// PRO (轴二)升降轴速度倍率 UpdownAxis_ResolveSpeed 20
///// </summary>
//[ConfigProAttribute("UpdownAxis_ResolveSpeed")]
//public int UpdownAxis_ResolveSpeed { get; set; }
///// <summary>
///// PRO (轴三)进出轴速度倍率 InoutAxis_ResolveSpeed 10
///// </summary>
//[ConfigProAttribute("InoutAxis_ResolveSpeed")]
//public int InoutAxis_ResolveSpeed { get; set; }
/// <summary> /// <summary>
/// PRO IO信号超时时间(毫秒) IOSingle_TimerOut 5000 /// PRO IO信号超时时间(毫秒) IOSingle_TimerOut 5000
/// </summary> /// </summary>
...@@ -386,6 +368,62 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -386,6 +368,62 @@ namespace OnlineStore.LoadCSVLibrary
public ConfigMoveAxis InOut_Axis { get; set; } public ConfigMoveAxis InOut_Axis { get; set; }
/// <summary> /// <summary>
/// PRO 硕科步进电机(压紧轴)控制端口号 CompressAxis_PortName COM4
/// </summary>
[ConfigProAttribute("CompressAxis_PortName")]
public string CompressAxis_PortName { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制波特率 CompressAxis_PortBaudrate 9600
/// </summary>
[ConfigProAttribute("CompressAxis_PortBaudrate")]
public int CompressAxis_PortBaudrate { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制奇偶校验 CompressAxis_PortParity 2
/// </summary>
[ConfigProAttribute("CompressAxis_PortParity")]
public int CompressAxis_PortParity { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制停止位 CompressAxis_StopBits 1
/// </summary>
[ConfigProAttribute("CompressAxis_StopBits")]
public int CompressAxis_StopBits { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制初速度 CompressAxis_StartSpeed 100
/// </summary>
[ConfigProAttribute("CompressAxis_StartSpeed")]
public int CompressAxis_StartSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制最大速度 CompressAxis_MaxSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_MaxSpeed")]
public int CompressAxis_MaxSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制末速度 CompressAxis_EndSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_EndSpeed")]
public int CompressAxis_EndSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制加速度 CompressAxis_AddSpeed 5000
/// </summary>
[ConfigProAttribute("CompressAxis_AddSpeed")]
public int CompressAxis_AddSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制减速度 CompressAxis_DelSpeed 1000
/// </summary>
[ConfigProAttribute("CompressAxis_DelSpeed")]
public int CompressAxis_DelSpeed { get; set; }
/// <summary>
/// PRO 硕科步进电机(压紧轴)控制归零速度(原点返回速度) CompressAxis_HomeSpeed 10000
/// </summary>
[ConfigProAttribute("CompressAxis_HomeSpeed")]
public int CompressAxis_HomeSpeed { get; set; }
/// <summary>
/// PRO,硕科步进电机轴地址(压紧轴),CompressAxis_Slv,1,,,,,,
/// </summary>
[ConfigProAttribute("CompressAxis_Slv")]
public int CompressAxis_Slv { get; set; }
/// <summary>
/// PRO (轴一)旋转轴最小限位 MiddleAxis_PositionMin /// PRO (轴一)旋转轴最小限位 MiddleAxis_PositionMin
/// </summary> /// </summary>
[ConfigProAttribute("MiddleAxis_PositionMin", false)] [ConfigProAttribute("MiddleAxis_PositionMin", false)]
...@@ -437,31 +475,37 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -437,31 +475,37 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("BlowAir_Interval", false)] [ConfigProAttribute("BlowAir_Interval", false)]
public int BlowAir_Interval { get; set; } public int BlowAir_Interval { get; set; }
public int InoutAxis_PositionMax { get; set; }
private List<string> TempAddrList = null;
public static char TempAddrSpilt = '#';
/// <summary> /// <summary>
/// 温湿度地址列表 /// PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
/// </summary> /// </summary>
public List<string> GetTempAddrList() [ConfigProAttribute("Humiture_Port", true )]
{ public string Humiture_Port { get; set; }
if (TempAddrList == null)
{ public int InoutAxis_PositionMax { get; set; }
TempAddrList = new List<string>(); //private List<string> TempAddrList = null;
string[] array = Temperate_Serveraddress.Split(TempAddrSpilt); //public static char TempAddrSpilt = '#';
if (array.Length > 0) ///// <summary>
{ ///// 温湿度地址列表
foreach (string str in array) ///// </summary>
{ //public List<string> GetTempAddrList()
if (!str.Equals("")) //{
{ // if (TempAddrList == null)
TempAddrList.Add(str); // {
} // TempAddrList = new List<string>();
} // string[] array = Temperate_Serveraddress.Split(TempAddrSpilt);
} // if (array.Length > 0)
} // {
return TempAddrList; // foreach (string str in array)
} // {
// if (!str.Equals(""))
// {
// TempAddrList.Add(str);
// }
// }
// }
// }
// return TempAddrList;
//}
protected override void initMustHavePro() protected override void initMustHavePro()
{ {
...@@ -476,17 +520,19 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -476,17 +520,19 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList.Add(IO_Type.Door_Up); MustHaveDIList.Add(IO_Type.Door_Up);
MustHaveDIList.Add(IO_Type.Door_Down); MustHaveDIList.Add(IO_Type.Door_Down);
MustHaveDIList.Add(IO_Type.LocationCylinder_Down); MustHaveDIList.Add(IO_Type.Door_LimitSingle);
MustHaveDIList.Add(IO_Type.LocationCylinder_Up); MustHaveDIList.Add(IO_Type.SafetyLightCurtains);
MustHaveDIList.Add(IO_Type.LocationCylinder2_Down); //MustHaveDIList.Add(IO_Type.LocationCylinder_Down);
MustHaveDIList.Add(IO_Type.LocationCylinder2_Up); //MustHaveDIList.Add(IO_Type.LocationCylinder_Up);
//MustHaveDIList.Add(IO_Type.LocationCylinder2_Down);
//MustHaveDIList.Add(IO_Type.LocationCylinder2_Up);
//MustHaveDIList.Add(IO_Type.Left_Door_LimitSingle); //MustHaveDIList.Add(IO_Type.Left_Door_LimitSingle);
//MustHaveDIList.Add(IO_Type.Right_Door_LimitSingle); //MustHaveDIList.Add(IO_Type.Right_Door_LimitSingle);
MustHaveDIList.Add(IO_Type.TrayCheck_3); //MustHaveDIList.Add(IO_Type.TrayCheck_3);
MustHaveDIList.Add(IO_Type.TrayCheck_4); //MustHaveDIList.Add(IO_Type.TrayCheck_4);
MustHaveDIList.Add(IO_Type.LocationCylinder2_Down); //MustHaveDIList.Add(IO_Type.LocationCylinder2_Down);
MustHaveDIList.Add(IO_Type.LocationCylinder2_Up); //MustHaveDIList.Add(IO_Type.LocationCylinder2_Up);
MustHaveDOList.Add(IO_Type.AutoRun_HddLed); MustHaveDOList.Add(IO_Type.AutoRun_HddLed);
MustHaveDOList.Add(IO_Type.Alarm_HddLed); MustHaveDOList.Add(IO_Type.Alarm_HddLed);
...@@ -495,8 +541,8 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -495,8 +541,8 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDOList.Add(IO_Type.Run_Sign); MustHaveDOList.Add(IO_Type.Run_Sign);
MustHaveDOList.Add(IO_Type.Door_Up); MustHaveDOList.Add(IO_Type.Door_Up);
MustHaveDOList.Add(IO_Type.Door_Down); MustHaveDOList.Add(IO_Type.Door_Down);
MustHaveDOList.Add(IO_Type.LocationCylinder_Down); //MustHaveDOList.Add(IO_Type.LocationCylinder_Down);
MustHaveDOList.Add(IO_Type.LocationCylinder_Up); //MustHaveDOList.Add(IO_Type.LocationCylinder_Up);
MustHaveDOList.Add(IO_Type.Axis_Brake); MustHaveDOList.Add(IO_Type.Axis_Brake);
MustHaveDOList.Add(IO_Type.CameraLight_Power); MustHaveDOList.Add(IO_Type.CameraLight_Power);
} }
......
...@@ -306,6 +306,14 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -306,6 +306,14 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string Right_Door_LimitSingle = "Right_Door_LimitSingle"; public static string Right_Door_LimitSingle = "Right_Door_LimitSingle";
/// <summary> /// <summary>
/// 前门限位
/// </summary>
public static string Door_LimitSingle = "Door_LimitSingle";
/// <summary>
/// 安全光栅
/// </summary>
public static string SafetyLightCurtains = "SafetyLightCurtains";
/// <summary>
/// 摄像机光源 /// 摄像机光源
/// </summary> /// </summary>
public static string CameraLight_Power = "CameraLight_Power"; public static string CameraLight_Power = "CameraLight_Power";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!