Commit 22f5946d 几米阳光

1

1 个父辈 1f8a322e
......@@ -211,7 +211,7 @@ namespace OnlineStore.DeviceLibrary
int length = 2;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
System.Threading.Thread.Sleep(1000);
System.Threading.Thread.Sleep(500);
data = "0000";
dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteCoil, addr, data, length);
SendData(portName, dataArray);
......
......@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
......@@ -515,6 +516,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
ComMoveToPosition(moveP.ComPress_P3, true);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
Thread.Sleep(100);
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
{
......@@ -691,17 +693,16 @@ namespace OnlineStore.DeviceLibrary
else if (StoreMove.MoveStep == StoreMoveStep.SO_02_DeviceBack)
{
StoreMove.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
bool BatchNeedMove = false;
int targetValue = -1;
int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue;
if (StoreMove.IsBatchInOutStore)
{
//上下料机构下降的距离=料盘最低高度+默认的高度
int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue;
int targetValue = GetBatchTargetValue(outDownPosition);
//上下料机构下降的距离=料盘最低高度+默认的高度
targetValue = GetBatchTargetValue(outDownPosition);
if (targetValue >= 1000)
{
StoreMove.TimeOutSeconds = 120;
ACAxisMove(Config.Batch_Axis, targetValue, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_03 批量轴下降【" + outDownPosition + "】目标【" + targetValue + "】 ");
BatchNeedMove = true;
}
else
{
......@@ -720,10 +721,17 @@ namespace OnlineStore.DeviceLibrary
}
OutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3);
ComMoveToPosition(moveP.ComPress_P3);
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);
Thread.Sleep(100);
if (BatchNeedMove)
{
StoreMove.TimeOutSeconds = 120;
ACAxisMove(Config.Batch_Axis, targetValue, Config.BatchAxis_P1_Speed);
OutStoreLog("出库:SO_03 批量轴下降【" + outDownPosition + "】目标【" + targetValue + "】 ");
Thread.Sleep(100);
}
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_03_ToBagPosition)
{
......@@ -802,6 +810,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_OutLow_P8, Config.UpDownAxis_P8_Speed);
AutomaticBaiting.BatchOutStoreHeight += StoreMove.MoveParam.PlateH;
AutomaticBaiting.BatchOutStoreCount++;
Thread.Sleep(100);
}
else if (IOManager.IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH))
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!