Commit 9895791e 几米阳光

1.测高AI模块BUG修改。

2.出库增加缓存功能,若出库失败也放入缓存。
1 个父辈 082ccb10
...@@ -12,7 +12,7 @@ using OnlineStore.Common; ...@@ -12,7 +12,7 @@ using OnlineStore.Common;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class AITcpClient public class AITcpClient
{ {
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
...@@ -69,7 +69,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,7 +69,7 @@ namespace OnlineStore.DeviceLibrary
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
/// <summary>Response data event. This event is called when new data arrives</summary> /// <summary>Response data event. This event is called when new data arrives</summary>
public delegate void ResponseData(string ip, ushort id, byte function, byte[] data,byte[] reviceData); public delegate void ResponseData(string ip, ushort id, byte function, byte[] data, byte[] reviceData);
/// <summary>Response data event. This event is called when new data arrives</summary> /// <summary>Response data event. This event is called when new data arrives</summary>
public event ResponseData OnResponseData; public event ResponseData OnResponseData;
/// <summary>Exception data event. This event is called when the data is incorrect</summary> /// <summary>Exception data event. This event is called when the data is incorrect</summary>
...@@ -83,25 +83,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -83,25 +83,25 @@ namespace OnlineStore.DeviceLibrary
public bool autoConnectOfBreak public bool autoConnectOfBreak
{ {
get { return _autoConnectOfBreak; } get { return _autoConnectOfBreak; }
set { _autoConnectOfBreak = value; } set { _autoConnectOfBreak = value; }
} }
public static ushort timeout public static ushort timeout
{ {
get { return _timeout; } get { return _timeout; }
set { _timeout = value; } set { _timeout = value; }
} }
public ushort refresh public ushort refresh
{ {
get { return _refresh; } get { return _refresh; }
set { _refresh = value; } set { _refresh = value; }
} }
public bool connected public bool connected
{ {
get { return _connected; } get { return _connected; }
} }
public AITcpClient() public AITcpClient()
{ {
} }
...@@ -182,21 +182,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -182,21 +182,21 @@ namespace OnlineStore.DeviceLibrary
byte[] _adr = AcSerialBean.StringToByte(address); byte[] _adr = AcSerialBean.StringToByte(address);
data[8] = _adr[0]; // Start address data[8] = _adr[0]; // Start address
data[9] = _adr[1]; // Start address data[9] = _adr[1]; // Start address
byte[] _length = BitConverter.GetBytes((short)1); byte[] _length = BitConverter.GetBytes((short)1);
data[10] = _length[0]; // Number of data to read data[10] = _length[0]; // Number of data to read
data[11] = _length[1]; // Number of data to read data[11] = _length[1]; // Number of data to read
WriteAsyncData( data,id); WriteAsyncData(data, id);
} }
public void ReadAllAI(ushort id, string startAddress, int length, byte slaveId) public void ReadAllAI(ushort id, string startAddress, int length, byte slaveId)
{ {
//0x 000100000006FF0302580010 //0x 000100000006FF0302580010
byte function = 0x03; byte function = 0x03;
byte[] data = CreateData(id, startAddress,(ushort) length, function, slaveId); byte[] data = CreateData(id, startAddress, (ushort)length, function, slaveId);
WriteAsyncData(data, id); WriteAsyncData(data, id);
} }
private byte[] CreateData(ushort id, string startAddress, ushort length, byte function, byte SlaveID) private byte[] CreateData(ushort id, string startAddress, ushort length, byte function, byte SlaveID)
{ {
byte[] data = new byte[12]; byte[] data = new byte[12];
...@@ -207,11 +207,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -207,11 +207,12 @@ namespace OnlineStore.DeviceLibrary
data[6] = SlaveID; // Slave address //必须设置为"1": 2012.04-24 覃发光; data[6] = SlaveID; // Slave address //必须设置为"1": 2012.04-24 覃发光;
data[7] = function; // Function code data[7] = function; // Function code
byte[] _adr = AcSerialBean.StringToByte(startAddress); byte[] _adr = AcSerialBean.StringToByte(startAddress);
if (_adr.Length .Equals( 2)) if (_adr.Length.Equals(2))
{ {
data[8] = _adr[0]; // Start address data[8] = _adr[0]; // Start address
data[9] = _adr[1]; // Start address data[9] = _adr[1]; // Start address
}else if (_adr.Length.Equals(1)) }
else if (_adr.Length.Equals(1))
{ {
data[8] = 0x00; data[8] = 0x00;
data[9] = _adr[0]; // Start address data[9] = _adr[0]; // Start address
...@@ -230,7 +231,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
ReviceDataProcess(); ReviceDataProcess();
Thread.Sleep(10); Thread.Sleep(10);
} }
catch (Exception ex) catch (Exception ex)
...@@ -241,82 +242,72 @@ namespace OnlineStore.DeviceLibrary ...@@ -241,82 +242,72 @@ namespace OnlineStore.DeviceLibrary
private void ReviceDataProcess() private void ReviceDataProcess()
{ {
int lengthIndex = 5;
byte[] rdata = Receive(); byte[] rdata = Receive();
if (rdata != null) if (rdata == null)
{ {
string str = ""; return;
foreach (byte by in rdata) }
{ string str = "";
str = str + " " + by; foreach (byte by in rdata)
//if (str.Length > 200) {
//{ str = str + " " + by;
// break; }
//}
}
//这里rdata就是接收到的数据,
IPEndPoint clientipe = (IPEndPoint)socketClient.RemoteEndPoint;
//ushort id = BitConverter.ToUInt16(rdata, 0);
//byte function = rdata[7];
byte dataLength = rdata[lengthIndex];
int allLength = lengthIndex + 1 + dataLength; int lengthIndex = 5;
//这里rdata就是接收到的数据,
if (rdata.Length > allLength) IPEndPoint clientipe = (IPEndPoint)socketClient.RemoteEndPoint;
byte dataLength = rdata[lengthIndex];
int allLength = lengthIndex + 1 + dataLength;
if (rdata.Length <= allLength)
{
LogUtil.debug(LOGGER, clientipe.ToString() + "收到数据(无需分包):" + str);
ushort id = BitConverter.ToUInt16(rdata, 0);
byte function = rdata[7];
DataProcess(clientipe.ToString(), id, function, rdata);
return;
}
int currStartIndex = 0;
try
{
for (int i = 0; i < 100; i++)
{ {
//LogUtil.info(clientipe.ToString() + "收到数据(需要分包):" + str); if (rdata.Length < currStartIndex + lengthIndex)
int currStartIndex = 0;
for (int i = 0; i < 100; i++)
{ {
try LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]");
{ break;
}
else
{
dataLength = rdata[currStartIndex + lengthIndex];
allLength = lengthIndex + 1 + dataLength;
byte[] thisData = new byte[allLength];
Array.Copy(rdata, currStartIndex, thisData, 0, allLength);
ushort id = BitConverter.ToUInt16(thisData, 0);
byte function = thisData[7];
DataProcess(clientipe.ToString(), id, function, thisData);
//剩余的数据处理
if (rdata.Length < currStartIndex + lengthIndex) if (rdata.Length <= currStartIndex + allLength)
{
LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]");
break;
}
else
{
dataLength = rdata[currStartIndex + lengthIndex];
allLength = lengthIndex + 1 + dataLength;
byte[] thisData = new byte[allLength];
Array.Copy(rdata, currStartIndex, thisData, 0, allLength);
ushort id = BitConverter.ToUInt16(thisData, 0);
byte function = thisData[7];
DataProcess(clientipe.ToString(), id, function, thisData);
//剩余的数据处理
if (rdata.Length <= currStartIndex + allLength)
{
break;
}
currStartIndex = currStartIndex + allLength;
}
}
catch (Exception ex)
{ {
LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]:" + ex.ToString()); break;
} }
currStartIndex = currStartIndex + allLength;
} }
} }
else }
{ catch (Exception ex)
LogUtil.debug(LOGGER, clientipe.ToString() + "收到数据(无需分包):" + str); {
ushort id = BitConverter.ToUInt16(rdata, 0); LogUtil.error(clientipe.ToString() + "收到数据:" + str + "分包出错 [" + currStartIndex + "]:" + ex.ToString());
byte function = rdata[7];
DataProcess(clientipe.ToString(),id,function,rdata);
}
} }
} }
private void DataProcess(string clientIp, ushort id, byte function, byte[] rdata) private void DataProcess(string clientIp, ushort id, byte function, byte[] rdata)
{ {
byte[] data; byte[] data;
if (rdata.Length <= 9)
{
return;
}
if ((function >= fctWriteSingleCoil) && (function != fctReadWriteMultipleRegister)) if ((function >= fctWriteSingleCoil) && (function != fctReadWriteMultipleRegister))
{ {
data = new byte[2]; data = new byte[2];
...@@ -325,7 +316,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,7 +316,7 @@ namespace OnlineStore.DeviceLibrary
// ------------------------------------------------------------ // ------------------------------------------------------------
// Read response data // Read response data
else else
{ {
data = new byte[rdata[8]]; data = new byte[rdata[8]];
Array.Copy(rdata, 9, data, 0, rdata[8]); Array.Copy(rdata, 9, data, 0, rdata[8]);
} }
...@@ -340,11 +331,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -340,11 +331,11 @@ namespace OnlineStore.DeviceLibrary
// Response data is regular data // Response data is regular data
else if (OnResponseData != null) else if (OnResponseData != null)
{ //收到的数据打印出来 { //收到的数据打印出来
OnResponseData(clientIp, id, function, data, rdata); OnResponseData(clientIp, id, function, data, rdata);
} }
} }
private byte[] Receive() private byte[] Receive()
{ {
try try
...@@ -353,10 +344,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -353,10 +344,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return null; return null;
} }
int size = socketClient.Available; int size = socketClient.Available;
byte[] rData = new byte[size]; byte[] rData = new byte[size];
socketClient.Receive(rData, size, SocketFlags.None); socketClient.Receive(rData, size, SocketFlags.None);
return rData; return rData;
} }
...@@ -370,19 +361,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -370,19 +361,19 @@ namespace OnlineStore.DeviceLibrary
return null; return null;
} }
} }
public void disconnect() public void disconnect()
{ {
Dispose(); Dispose();
} }
~AITcpClient() ~AITcpClient()
{ {
Dispose(); Dispose();
} }
public void Dispose() public void Dispose()
{ {
reviceTimer.Enabled = false; reviceTimer.Enabled = false;
...@@ -395,7 +386,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -395,7 +386,7 @@ namespace OnlineStore.DeviceLibrary
socketClient.Close(); socketClient.Close();
} }
socketClient = null; socketClient = null;
} }
} }
internal void CallException(ushort id, byte function, byte exception, byte[] rdata) internal void CallException(ushort id, byte function, byte exception, byte[] rdata)
...@@ -417,7 +408,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -417,7 +408,7 @@ namespace OnlineStore.DeviceLibrary
OnException(socketClient.RemoteEndPoint.AddressFamily.ToString(), id, function, exception, rdata); OnException(socketClient.RemoteEndPoint.AddressFamily.ToString(), id, function, exception, rdata);
} }
} }
public void WriteAsyncData(byte[] write_data, ushort id) public void WriteAsyncData(byte[] write_data, ushort id)
{ {
try try
...@@ -432,14 +423,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -432,14 +423,7 @@ namespace OnlineStore.DeviceLibrary
{ {
try try
{ {
//发送的数据打印出来 //LogUtil.info( clientipe.ToString()+"发送数据:" + AcSerialBean.byteToHexStr(write_data));
string str = "";
foreach (byte by in write_data)
{
str = str + " " + by;
}
//LogUtil.info( clientipe.ToString()+"发送数据:" + str);
socketClient.BeginSend(write_data, 0, write_data.Length, SocketFlags.None, new AsyncCallback(OnSend), null); socketClient.BeginSend(write_data, 0, write_data.Length, SocketFlags.None, new AsyncCallback(OnSend), null);
//socketClient.BeginReceive(tcpSocketReviceBuffer, 0, tcpSocketReviceBuffer.Length, SocketFlags.None, new AsyncCallback(OnReceive), socketClient); //socketClient.BeginReceive(tcpSocketReviceBuffer, 0, tcpSocketReviceBuffer.Length, SocketFlags.None, new AsyncCallback(OnReceive), socketClient);
ReviceDataProcess(); ReviceDataProcess();
...@@ -453,18 +437,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -453,18 +437,18 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LOGGER.Error("出错:"+ex.ToString()); LOGGER.Error("出错:" + ex.ToString());
} }
} }
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Write asynchronous data acknowledge // Write asynchronous data acknowledge
private void OnSend(System.IAsyncResult result) private void OnSend(System.IAsyncResult result)
{ {
if (result.IsCompleted == false) CallException(0xFFFF, 0xFF, excSendFailt, tcpSocketReviceBuffer); if (result.IsCompleted == false) CallException(0xFFFF, 0xFF, excSendFailt, tcpSocketReviceBuffer);
} }
internal bool ISConnection() internal bool ISConnection()
{ {
if (socketClient == null) if (socketClient == null)
{ {
return false; return false;
......
...@@ -68,11 +68,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -68,11 +68,11 @@ namespace OnlineStore.DeviceLibrary
MBmaster.OnException += new AITcpClient.ExceptionData(MBmaster_OnException); MBmaster.OnException += new AITcpClient.ExceptionData(MBmaster_OnException);
MBmaster.autoConnectOfBreak = false; MBmaster.autoConnectOfBreak = false;
mastMap.Add(ioIp, MBmaster); mastMap.Add(ioIp, MBmaster);
LogUtil.info(LOGGER, "连接AI模块[" + ioIp + "]成功");
Thread.Sleep(10); Thread.Sleep(10);
WriteAIScope(ioIp, 1); WriteAIScope(ioIp, 1);
Thread.Sleep(10); Thread.Sleep(10);
ReadAll(ioIp); ReadAll(ioIp);
LogUtil.info(LOGGER, "连接AI模块[" + ioIp + "]成功");
} }
catch (Exception error) catch (Exception error)
{ {
...@@ -157,8 +157,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -157,8 +157,8 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(2); Thread.Sleep(2);
isProcess = false; isProcess = false;
} }
private static void WriteAIScope(string ioIp,int value) private static void WriteAIScope(string ioIp, int value)
{ {
// 0 表示 0 - 10V, 1 表示 0 - 5V // 0 表示 0 - 10V, 1 表示 0 - 5V
WriteAIScope(ioIp, DefualtSlaveID, "03EA", value); WriteAIScope(ioIp, DefualtSlaveID, "03EA", value);
...@@ -202,17 +202,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,17 +202,17 @@ namespace OnlineStore.DeviceLibrary
} }
mastMap.Clear(); mastMap.Clear();
} }
public static double ConvertAI(double aiValue,double defaultValue ) public static double ConvertAI(double aiValue, double defaultValue)
{ {
double xishu =(double) ConfigAppSettings.GetNumValue(Setting_Init.AI_ConvertPosition); double xishu = (double)ConfigAppSettings.GetNumValue(Setting_Init.AI_ConvertPosition);
double result= Math.Round((aiValue-defaultValue)/xishu,2); double result = Math.Round((aiValue - defaultValue) / xishu, 2);
return result; return result;
} }
public static double GetAIValue(string ioiP, int index) public static double GetAIValue(string ioiP, int index)
{ {
double aiValue = GetAIValue(ioiP, DefualtSlaveID, index-1); double aiValue = GetAIValue(ioiP, DefualtSlaveID, index - 1);
return Math.Round(aiValue,2); return Math.Round(aiValue, 2);
} }
public static double GetAIValue(string ioIP, byte slaveId, int index) public static double GetAIValue(string ioIP, byte slaveId, int index)
...@@ -284,7 +284,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -284,7 +284,7 @@ namespace OnlineStore.DeviceLibrary
} }
try try
{ {
if (StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH)) if (StoreManager.Store != null && StoreManager.Store.KNDIOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.HIGH))
{ {
if (StoreManager.Config.AIDI1_Addr > 0 && StoreManager.Config.AIDI2_Addr > 0) if (StoreManager.Config.AIDI1_Addr > 0 && StoreManager.Config.AIDI2_Addr > 0)
{ //每次上传后验证下 { //每次上传后验证下
...@@ -298,7 +298,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -298,7 +298,7 @@ namespace OnlineStore.DeviceLibrary
// ConnectionIP(ioIp); // ConnectionIP(ioIp);
} }
} }
else if(StoreManager.Config.AIDI3_Addr > 0 && StoreManager.Config.AIDI4_Addr > 0) else if (StoreManager.Config.AIDI3_Addr > 0 && StoreManager.Config.AIDI4_Addr > 0)
{ //每次上传后验证下 { //每次上传后验证下
int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI3_Addr); int v1 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI3_Addr);
int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI4_Addr); int v2 = (int)GetAIValue(ioIp, StoreManager.Config.AIDI4_Addr);
...@@ -311,6 +311,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -311,6 +311,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -349,7 +350,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -349,7 +350,7 @@ namespace OnlineStore.DeviceLibrary
break; break;
} }
} }
// LOGGER.Info ("Read data:【" + reviceMsg + "】 "); // LOGGER.Info ("Read data:【" + reviceMsg + "】 ");
if (ID == 0xFF) if (ID == 0xFF)
{ {
return; return;
...@@ -392,9 +393,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -392,9 +393,9 @@ namespace OnlineStore.DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error(LOGGER, "处理接受数据出错:" + ex.ToString()); LogUtil.error(LOGGER, "处理接受数据出错:" + ex.ToString());
} }
} }
private static void MBmaster_OnException(string ioIp, ushort id, byte function, byte exception, byte[] reviceData) private static void MBmaster_OnException(string ioIp, ushort id, byte function, byte exception, byte[] reviceData)
{ {
string exc = "Modbus says error: "; string exc = "Modbus says error: ";
...@@ -413,7 +414,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -413,7 +414,7 @@ namespace OnlineStore.DeviceLibrary
default: default:
break; break;
} }
LOGGER.Error("接收数据出错:" + exc); LOGGER.Error("接收数据出错:" + exc);
} }
} }
......
...@@ -1225,7 +1225,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -1225,7 +1225,12 @@ namespace OnlineStore.DeviceLibrary
if (currInOutFixture.WareNum.Equals("")) if (currInOutFixture.WareNum.Equals(""))
{ {
LogUtil.info(LOGGER, StoreName + "开始执行排队中的出库【" + currInOutFixture.ToStr() + "】"); LogUtil.info(LOGGER, StoreName + "开始执行排队中的出库【" + currInOutFixture.ToStr() + "】");
StartOutStoreMove(new InOutStoreParam("", currInOutFixture.PosId, currInOutFixture.plateH, currInOutFixture.plateW)); bool result = StartOutStoreMove(new InOutStoreParam("", currInOutFixture.PosId, currInOutFixture.plateH, currInOutFixture.plateW));
if (!result)
{
LogUtil.info(LOGGER, StoreName + " 执行排队中的出库【" + currInOutFixture.ToStr() + "】失败,重新加入等待队列");
AddWaitOutInfo(currInOutFixture);
}
} }
} }
} }
...@@ -1950,13 +1955,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -1950,13 +1955,20 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "", posId, plateW, plateH);
if (CanStarInOut()) if (CanStarInOut())
{ {
StartOutStoreMove(new InOutStoreParam("", posId, position)); bool result = StartOutStoreMove(new InOutStoreParam("", posId, position));
if (!result)
{
LogUtil.info(LOGGER, StoreName + " 执行出库【" + currInOutFixture.ToStr() + "】失败,加入等待队列");
AddWaitOutInfo(currInOutFixture);
}
} }
else else
{ {
LogUtil.error(LOGGER, "收到服务器出库命令:出库【" + posId + "】失败,当前在忙碌中"); LogUtil.error(LOGGER, "执行出库【" + currInOutFixture.ToStr() + "】失败,当前在忙碌中,加入等待队列");
AddWaitOutInfo(currInOutFixture);
} }
} }
......
...@@ -517,7 +517,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -517,7 +517,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 开始出库运动 /// 开始出库运动
/// </summary> /// </summary>
public override void StartOutStoreMove(InOutStoreParam param) public override bool StartOutStoreMove(InOutStoreParam param)
{ {
startOutStoreTime = DateTime.Now; startOutStoreTime = DateTime.Now;
string posId = param != null ? param.PositionNum : ""; string posId = param != null ? param.PositionNum : "";
...@@ -526,12 +526,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -526,12 +526,12 @@ namespace OnlineStore.DeviceLibrary
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,找不到库位信息"); LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,找不到库位信息");
return; return false ;
} }
if (KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (KNDIOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,叉子料盘检测有料"); LogUtil.error(LOGGER, StoreName + " 启动出库【" + posId + "】出错,叉子料盘检测有料");
return; return false ;
} }
storeStatus = StoreStatus.OutStoreExecute; storeStatus = StoreStatus.OutStoreExecute;
LogUtil.info(LOGGER, StoreName + "启动出库【" + posId + "】 ", storeMoveColor); LogUtil.info(LOGGER, StoreName + "启动出库【" + posId + "】 ", storeMoveColor);
...@@ -552,11 +552,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -552,11 +552,13 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_01 定位气缸下降"); OutStoreLog("出库:SO_01 定位气缸下降");
LocationDownAndWait(); LocationDownAndWait();
} }
return true;
} }
else else
{ {
LogUtil.error(LOGGER, StoreName + " 启动出库出错,当前状态,storeStatus=" + storeRunStatus); LogUtil.error(LOGGER, StoreName + " 启动出库出错,当前状态,storeStatus=" + storeRunStatus);
} }
return false;
} }
protected override void OutStoreProcess() protected override void OutStoreProcess()
{ {
......
...@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -89,7 +89,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 开始出库运动 /// 开始出库运动
/// </summary> /// </summary>
public abstract void StartOutStoreMove(InOutStoreParam param); public abstract bool StartOutStoreMove(InOutStoreParam param);
protected abstract void OutStoreProcess(); protected abstract void OutStoreProcess();
#endregion #endregion
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!