Commit f054873b LN

1

1 个父辈 dab6e9e2
......@@ -102,12 +102,6 @@
<Compile Include="FrmAbout.Designer.cs">
<DependentUpon>FrmAbout.cs</DependentUpon>
</Compile>
<Compile Include="FrmIdConfig.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmIdConfig.Designer.cs">
<DependentUpon>FrmIdConfig.cs</DependentUpon>
</Compile>
<Compile Include="FrmPwd.cs">
<SubType>Form</SubType>
</Compile>
......@@ -147,9 +141,6 @@
<EmbeddedResource Include="FrmAbout.resx">
<DependentUpon>FrmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmIdConfig.resx">
<DependentUpon>FrmIdConfig.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmPwd.resx">
<DependentUpon>FrmPwd.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -127,12 +127,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutMove_MouseDown(object sender, MouseEventArgs e)
{
if (this.btnInOutMove.BackColor .Equals(System.Drawing.SystemColors.Control))
{
if (StoreManager.Store.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
{
int speed = FormUtil.GetIntValue(txtInOutSpeed);
if (speed <= 0)
{
......@@ -214,12 +209,7 @@ namespace OnlineStore.ACSingleStore
private void btnInOutMovej_MouseDown(object sender, MouseEventArgs e)
{
if (btnInOutMovej.BackColor.Equals(System.Drawing.SystemColors.Control))
{
if (StoreManager.Store.InOutAxisCanMove().Equals(false))
{
MessageBox.Show("定位气缸不在下降端,不能移动进出轴", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
{
int speed = FormUtil.GetIntValue(txtInOutSpeed);
if (speed <= 0)
{
......
......@@ -66,7 +66,6 @@
<Compile Include="IO\IOManager.cs" />
<Compile Include="IO\KangNaiDe\KNDManager.cs" />
<Compile Include="IO\KangNaiDe\MasterTcpClient.cs" />
<Compile Include="lineConnect\LineConnect.cs" />
<Compile Include="PanasonicServo\ACCMDManager.cs" />
<Compile Include="PanasonicServo\ACServerManager.cs" />
<Compile Include="PanasonicServo\ACServerManager_Partial.cs" />
......
......@@ -37,16 +37,17 @@ DO,温湿度喷气电磁阀,StartOrStopBlow,12,PRO_AOI_IP_1,0,温湿度喷气电磁阀,Y2-5,B14,
,,,14,PRO_AOI_IP_1,0,,Y2-7,B16,,
,,,15,PRO_AOI_IP_1,0,,Y2-8,B17,,
AXIS,(Y轴-前后轴) ,Middle_Axis,1,COM3,0,,,,,
AXIS,(Z轴-升降轴),UpDown_Axis,2,COM3,0,,,,,
AXIS,( X轴-进出轴),InOut_Axis,3,COM3,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM3,0,,,,,
AXIS,Z轴-升降轴),UpDown_Axis,2,COM3,0,,,,,
AXIS,X轴-进出轴),InOut_Axis,3,COM3,0,,,,,
,,,,,,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_DoorO_P1,301400,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_DoorI_P2,321500,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOB_P7,321500,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIB_P8,301400,,,,,,,
PRO,(Y轴-前后轴)P1 待机原位点,MiddleAxis_P1_Position,325000,,,,,,,
PRO,( X轴-进出轴)P1待机原位点,InOutAxis_P1_Position,7900,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompressAxis_P1_Position,318000,,,,,,,
PRO,( X轴-进出轴)P1待机原位点,InOutAxis_P1_Position,7900,,,,,,,
PRO,( X轴-进出轴)P1左侧托架取料点P2,InOutAxis_P2_Position,7900,,,,,,,
PRO,( X轴-进出轴)P1右侧托架取料点P3,InOutAxis_P3_Position,7900,,,,,,,
PRO,是否使用定位气缸,IsHasLocationCylinder,0,,,,,,,
PRO,是否有左右侧门,IsHasDoorLimit,1,,,,,,,
PRO,是否使用压紧轴(1=使用),IsHasCompress_Axis,1,,,,, ,,
......@@ -83,25 +84,26 @@ PRO,(Y轴-前后轴)P7速度,UpDownAxis_P7_Speed,600,,,,,, ,
PRO,(Y轴-前后轴)P8速度,UpDownAxis_P8_Speed,600,,,,,,,
PRO,(Y轴-前后轴)P1速度,MiddleAxis_P1_Speed,500,,,,,,,
PRO,(Y轴-前后轴)P2速度,MiddleAxis_P2_Speed,500,,,,,,,
PRO,( X轴-进出轴)P1速度,InOutAxis_P1_Speed,600,,,,,,,
PRO,( X轴-进出轴)P2速度,InOutAxis_P2_Speed,600,,,,,,,
PRO,( X轴-进出轴)P3速度,InOutAxis_P3_Speed,600,,,,,,,
PRO,(X轴-进出轴)P1速度,InOutAxis_P1_Speed,600,,,,,,,
PRO,(X轴-进出轴)P2速度,InOutAxis_P2_Speed,600,,,,,,,
PRO,(X轴-进出轴)P3速度,InOutAxis_P3_Speed,600,,,,,,,
PRO,(X轴-进出轴)P4速度,InOutAxis_P4_Speed,600,,,,,,,
PRO,(Y轴-前后轴) 停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(Z轴-升降轴)停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,( X轴-进出轴)停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,10,,,,,,,
PRO,Z轴-升降轴)停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
PRO,X轴-进出轴)停止时可误差的脉冲数的最小值,InoutAxis_ErrorCountMin,10,,,,,,,
PRO,(Y轴-前后轴) 停止时可误差的脉冲数的最大值,MiddleAxis_ErrorCountMax,1000,,,,,,,
PRO,(Z轴-升降轴)停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,( X轴-进出轴)停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,Z轴-升降轴)停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,,,,,,
PRO,X轴-进出轴)停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置前后轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(Y轴-前后轴) 最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(Z轴-升降轴)最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,( X轴-进出轴)最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,Z轴-升降轴)最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,X轴-进出轴)最小限位,InoutAxis_PositionMin,0,,,,,,,
PRO,(Y轴-前后轴) 最大限位,MiddleAxis_PositionMax,0,,,,,,,
PRO,(Z轴-升降轴)最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,( X轴-进出轴)最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,Z轴-升降轴)最大限位,UpdownAxis_PositionMax,0,,,,,,,
PRO,X轴-进出轴)最大限位,InoutAxis_PositionMax,0,,,,,,,
PRO,需要吹气的温度(温度标准),Max_Temperature,0,,,,,,,
PRO,需要吹气的湿度(湿度标准),Max_Humidity,10,,,,,,,
PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
......
......@@ -163,7 +163,7 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.ResetMove;
//启动温湿度服务器
HumitureController.Init(Config.Humiture_Port);
LineConnect.StartConnect();
//LineConnect.StartConnect();
ReturnHome();
StartTime = DateTime.Now;
......@@ -592,7 +592,7 @@ namespace OnlineStore.DeviceLibrary
TimeSpan span = DateTime.Now - StartTime;
IsRun = false;
LineConnect.StopConnect();
//LineConnect.StopConnect();
IOManager.instance.CloseAllDO();
LogUtil.info(LOGGER, StoreName + ",停止运行,总运行时间:" + span.ToString());
......@@ -965,7 +965,7 @@ namespace OnlineStore.DeviceLibrary
{
try
{
bool noInStore = LineConnect.WaitInStoreList.Count <= 0;
bool noInStore = waitOutStoreList.Count <= 0;
if (CurrInOutACount >= this.Config.Box_ResetACount &&noInStore)
{
if (storeRunStatus < StoreRunStatus.Runing || StoreMove.MoveType == StoreMoveType.InStore || StoreMove.MoveType == StoreMoveType.OutStore)
......@@ -989,7 +989,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil.info(LOGGER, StoreName + "已经累计出入库" + CurrInOutCount + "次,需要复位一下前后轴");
}
}
else if (LineConnect.CanStartOut() || IsDebug)
// else if (LineConnect.CanStartOut() || IsDebug)
else
{
InOutPosInfo currInOutFixture = null;
lock (waitOutListLock)
......@@ -1208,19 +1209,19 @@ namespace OnlineStore.DeviceLibrary
public void ReviceLineInStoreCMD(string posId, string plateH, string plateW, string message)
{
string logName = "流水线入库命令【 " + message + "】【" + posId + "】:";
if (!LineConnect.WaitInStoreList.Contains(posId))
{
LogUtil.error(logName + "库位未验证通过,重新验证库位");
bool result = ReviceLineCheckInStoreCMD(posId, plateH, plateW, message);
if (!result)
{
return;
}
}
else
{
LineConnect.WaitInStoreList.Remove(posId);
}
//if (!LineConnect.WaitInStoreList.Contains(posId))
//{
// LogUtil.error(logName + "库位未验证通过,重新验证库位");
// bool result = ReviceLineCheckInStoreCMD(posId, plateH, plateW, message);
// if (!result)
// {
// return;
// }
//}
//else
//{
// LineConnect.WaitInStoreList.Remove(posId);
//}
//根据发送的posId获取位置列表
ACSquareSPosition position = CSVPositionReader<ACSquareSPosition>.GetPositon(posId);
if (position == null)
......@@ -1491,11 +1492,11 @@ namespace OnlineStore.DeviceLibrary
//如果在空闲中,且有入库未完成,直接发送入库执行中
if (boxStatus.status.Equals((int)StoreStatus.StoreOnline))
{
List<string> list = new List<string>(LineConnect.WaitInStoreList);
if (list.Count > 0 && (LineConnect.CanStartOut().Equals(false)))
{
boxStatus.status = (int)StoreStatus.InStoreExecute;
}
//List<string> list = new List<string>(LineConnect.WaitInStoreList);
//if (list.Count > 0 && (LineConnect.CanStartOut().Equals(false)))
//{
// boxStatus.status = (int)StoreStatus.InStoreExecute;
//}
}
......@@ -1593,17 +1594,17 @@ namespace OnlineStore.DeviceLibrary
string[] plateWArray = data[ParamDefine.plateW].Split(splitChar);
string[] plateHArray = data[ParamDefine.plateH].Split(splitChar);
bool urgentReel =FormUtil. GetBoolData( data,ParamDefine.urgentReel);
bool cutReel= FormUtil.GetBoolData(data, ParamDefine.cutReel);
bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc);
//bool urgentReel =FormUtil. GetBoolData( data,ParamDefine.urgentReel);
//bool cutReel= FormUtil.GetBoolData(data, ParamDefine.cutReel);
//bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
//string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
//int rfidLoc = FormUtil.GetIntData(data, ParamDefine.rfidLoc);
string barcode = data.ContainsKey(ParamDefine.barcode) ? data[ParamDefine.barcode] : "";
//urgentReel: true 表示紧急料,需要出到料串上
//cutReel: true 表示分盘料,需要出到料串上
//smallReel: true 小料(7x8),放置到小料架上
//rfid: 分配的料架RFID
//rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线, 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
////urgentReel: true 表示紧急料,需要出到料串上
////cutReel: true 表示分盘料,需要出到料串上
////smallReel: true 小料(7x8),放置到小料架上
////rfid: 分配的料架RFID
////rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线, 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线, 70,71,72时只能分配到3 / 4号皮带线; 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3 / 4号皮带线
string dataStr = JsonHelper.SerializeObject(data);
LogUtil.info(LOGGER, "收到服务器出库消息:【" + dataStr+"】");
......@@ -1614,7 +1615,7 @@ namespace OnlineStore.DeviceLibrary
index++;
string plateW = plateWArray[index];
string plateH = plateHArray[index];
InOutPosInfo intouInfo = new InOutPosInfo(barcode, posId, plateW, plateH, urgentReel, cutReel, smallReel, rfid, rfidLoc);
InOutPosInfo intouInfo = new InOutPosInfo(barcode, posId, plateW, plateH );
//根据发送的posId获取位置列表
ACSquareSPosition position = CSVPositionReader<ACSquareSPosition>.GetPositon(posId);
......@@ -1651,7 +1652,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error("验证出库【" + intouInfo.ToStr() + "】是否重复出错:" + ex.ToString());
}
if (CanStarInOut() && (LineConnect.CanStartOut() || IsDebug))
if (CanStarInOut() || IsDebug )
{
bool result = StartOutStoreMove(new InOutParam(intouInfo));
if (!result)
......
......@@ -56,15 +56,22 @@ namespace OnlineStore.DeviceLibrary
p.InOut_P1 = Config.InOutAxis_P1_Position;
p.Middle_P1 = Config.MiddleAxis_P1_Position;
p.InOut_P2 = position.InOutAxis_Door_P2;
if (param.PosInfo.ShelfType.Equals(1))
{
p.InOut_P2 = Config.InOutAxis_P2_Position;
}
else
{
p.InOut_P2 = Config.InOutAxis_P3_Position;
}
p.UpDown_P1 = Config.UpDownAxis_DoorO_P1;
p.UpDown_P8 = Config.UpDownAxis_DoorIB_P8;
p.UpDown_P2 = Config.UpDownAxis_DoorI_P2;
p.UpDown_P7 = Config.UpDownAxis_DoorOB_P7;
p.ComPress_P2 = position.CompressAxis_P2;
p.ComPress_P3 = position.CompressAxis_C_P3;
p.InOut_P3 = position.InOutAxis_P3;
//p.ComPress_P2 = position.CompressAxis_P2;
//p.ComPress_P3 = position.CompressAxis_C_P3;
p.InOut_P4 = position.InOutAxis_P4;
p.Middle_P2 = position.MiddleAxis_P2;
p.UpDown_P3 = position.UpDownAxis_IH_P3;
p.UpDown_P4 = position.UpDownAxis_IL_P4;
......@@ -181,11 +188,11 @@ namespace OnlineStore.DeviceLibrary
isOk = false;
break;
}
else if ((!wait.IsEnd) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_14_WaitTake) && LineConnect.CanReSend())
{
//判断是否需要重发入库结束命令
SendOutStoreEnd(StoreMove);
}
//else if ((!wait.IsEnd) && StoreMove.MoveStep.Equals(StoreMoveStep.SO_14_WaitTake) && LineConnect.CanReSend())
//{
// //判断是否需要重发入库结束命令
// SendOutStoreEnd(StoreMove);
//}
TimeSpan rwSpan = DateTime.Now - preRWTime;
if (!wait.IsEnd && rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6)
......@@ -214,14 +221,7 @@ namespace OnlineStore.DeviceLibrary
{
wait.IsEnd = (span.TotalMilliseconds >= wait.TimeMSeconds);
}
else if (wait.WaitType == 7)
{
//wait.IsEnd = (wait.HeightValue.Equals(GetHeight()));
//if (wait.IsEnd)
//{
// LogUtil.debug("等待height=" + wait.HeightValue + "完成");
//}
}
if (wait.IsEnd)
{
if (StoreMove.OneWaitCanEndStep)
......@@ -287,7 +287,15 @@ namespace OnlineStore.DeviceLibrary
//料盘检测
InStoreLog(" 入库:SI_00 检测料盘信号");
StoreMove.NextMoveStep(StoreMoveStep.SI_00_TrayCheck);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.HIGH));
if (param.PosInfo.ShelfType.Equals(1))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LeftShelf_Check, IO_VALUE.HIGH));
}
else
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.RightShelf_Check, IO_VALUE.HIGH));
}
}
else
{
......@@ -417,7 +425,7 @@ namespace OnlineStore.DeviceLibrary
InStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P4, Config.InOutAxis_P3_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_10_LocationCylinder_Down)
......@@ -425,7 +433,7 @@ namespace OnlineStore.DeviceLibrary
//IOManager.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
InStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
StoreMove.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P4, Config.InOutAxis_P3_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SI_11_DeviceToBag)
......@@ -549,7 +557,7 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_04_DeviceToBag);
OutStoreLog("出库:SO_04 叉子进入库位中, 进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
ACAxisMove(Config.InOut_Axis, moveP.InOut_P4, Config.InOutAxis_P3_Speed);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_04_DeviceToBag)
{
......@@ -599,7 +607,15 @@ namespace OnlineStore.DeviceLibrary
//SO_10_DeviceToDoorPro();
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
if (StoreMove.MoveParam.PosInfo.ShelfType.Equals(1))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LeftShelf_Check, IO_VALUE.LOW));
}
else
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.RightShelf_Check, IO_VALUE.LOW));
}
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor();
......@@ -610,7 +626,15 @@ namespace OnlineStore.DeviceLibrary
{
StoreMove.NextMoveStep(StoreMoveStep.SO_091_WaitNoTray);
OutStoreLog("出库:SO_091 打开仓门,等待门口无料盘 ");
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
if (StoreMove.MoveParam.PosInfo.ShelfType.Equals(1))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LeftShelf_Check, IO_VALUE.LOW));
}
else
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.RightShelf_Check, IO_VALUE.LOW));
}
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
OpenDoor();
......@@ -640,7 +664,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoor();
//发送消息给流水线
SendOutStoreEnd(StoreMove);
//SendOutStoreEnd(StoreMove);
}
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_GoBack)
{
......@@ -653,7 +677,15 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SO_14_WaitTake);
OutStoreLog("出库:SO_14_WaitTake 等待拿走物品,最多等待" + OutStoreWaitSeconds + "秒");
StoreMove.WaitList.Add(WaitResultInfo.WaitTime(ms));
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
if (StoreMove.MoveParam.PosInfo.ShelfType.Equals(1))
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LeftShelf_Check, IO_VALUE.LOW));
}
else
{
StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.RightShelf_Check, IO_VALUE.LOW));
}
// StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Door, IO_VALUE.LOW));
// StoreMove.WaitList.Add(WaitResultInfo.WaitHeight(0));
StoreMove.OneWaitCanEndStep = true;
}
......@@ -674,28 +706,7 @@ namespace OnlineStore.DeviceLibrary
}
}
private void SendOutStoreEnd(StoreMoveInfo storeMove)
{
int hasTray = (int)IOManager.IOValue(IO_Type.TrayCheck_Door);
int ss = (int)storeStatus;
if (IsDebug)
{
ss = (int)StoreStatus.Debugging;
}
StoreSendBean store = new StoreSendBean(Config.Id, Config.CID, (int)storeStatus, (int)storeRunStatus, hasTray, (int)alarmType);
store.data.Add(ParamDefine.posId, StoreMove.MoveParam.PosInfo.PosId);
store.data.Add(ParamDefine.plateH, StoreMove.MoveParam.PosInfo.PlateH);
store.data.Add(ParamDefine.plateW, StoreMove.MoveParam.PosInfo.PlateW);
store.data.Add(ParamDefine.cutReel, StoreMove.MoveParam.PosInfo.cutReel.ToString());
store.data.Add(ParamDefine.smallReel, StoreMove.MoveParam.PosInfo.smallReel.ToString());
store.data.Add(ParamDefine.urgentReel, StoreMove.MoveParam.PosInfo.urgentReel.ToString());
store.data.Add(ParamDefine.rfid, StoreMove.MoveParam.PosInfo.rfid);
store.data.Add(ParamDefine.rfidLoc, StoreMove.MoveParam.PosInfo.rfidLoc.ToString());
store.data.Add(ParamDefine.barcode, StoreMove.MoveParam.PosInfo.barcode);
LineConnect.OutStoreEnd(store);
}
private void SO_10_DeviceToDoorPro()
{
if (DoorIsOpen())
......@@ -715,16 +726,7 @@ namespace OnlineStore.DeviceLibrary
}
}
public bool InOutAxisCanMove()
{
if (StoreManager.Store.Config.IsHasLocationCylinder.Equals(0))
{
return true;
}
return false;
}
#endregion
public List<InOutPosInfo> waitOutStoreList = new List<InOutPosInfo>();
......
......@@ -56,17 +56,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public class InOutPosInfo
{
public InOutPosInfo(string barcode, string posId, string platew = "", string plateh = "", bool urgentReel = false , bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0)
public InOutPosInfo(string barcode, string posId, string platew = "", string plateh = "", int shelftype=1)
{
this.barcode = barcode;
this.PosId = posId;
this.PlateW = platew;
this.PlateH = plateh;
this.urgentReel = urgentReel;
this.cutReel = cutReel;
this.smallReel = smallReel;
this.rfid = rfid;
this.rfidLoc = rfidLoc;
}
/// <summary>
......@@ -86,34 +82,15 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public string PlateH { get; set; }
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel { get; set; }
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel { get; set; }
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid { get; set; }
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// 使用左侧托架=1,还是右侧托架=2
/// </summary>
public int rfidLoc { get; set; }
public int ShelfType = 1;
public string ToStr()
{
return " barcode[" + barcode + "],PosId [" + PosId + "],plateW [" + PlateW + "],plateH [" + PlateH + "],urgentReel [" + urgentReel
+ "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "]";
return " barcode[" + barcode + "],PosId [" + PosId + "],plateW [" + PlateW + "],plateH [" + PlateH + "],ShelfLR [" + ShelfType + "]";
}
}
......
......@@ -117,19 +117,7 @@ namespace OnlineStore.DeviceLibrary
{
return new TimeSpan(0);
}
}
protected void AddAxisMoveTime(ConfigMoveAxis axis)
{
//int axisNo = axis.GetAxisValue();
//if (AxisLastStartTime.ContainsKey(axisNo))
//{
// AxisLastStartTime.Remove(axisNo);
//}
//AxisLastStartTime.Add(axisNo, DateTime.Now);
}
}
/// <summary>
/// 运动处理
/// </summary>
......@@ -250,8 +238,7 @@ namespace OnlineStore.DeviceLibrary
{
moveAxis.TargetPosition = 0;
LogUtil.info(LOGGER, moveAxis.DisplayStr + "speed[" + moveAxis.TargetSpeed + "]开始原点返回");
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true));
AddAxisMoveTime(moveAxis);
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, true));
ACServerManager.HomeMove(moveAxis.DeviceName, (short)moveAxis.GetAxisValue(), moveAxis.HomeHighSpeed);
}
......@@ -261,8 +248,7 @@ namespace OnlineStore.DeviceLibrary
protected void ACAxisMove(ConfigMoveAxis moveAxis, int targetPosition, int targetSpeed)
{
StoreMove.WaitList.Add(WaitResultInfo.WaitAxis(moveAxis, targetPosition, targetSpeed));
moveAxis.TargetPosition = targetPosition;
AddAxisMoveTime(moveAxis);
moveAxis.TargetPosition = targetPosition;
ACServerManager.AbsMove(moveAxis.DeviceName, moveAxis.GetAxisValue(), targetPosition, targetSpeed);
}
......
......@@ -65,19 +65,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 轴3进出轴 库位点取料点P3
/// </summary>
public int InOut_P3 { get; set; }
/// <summary>
/// 轴4( 压紧轴)待机原位点P1
/// </summary>
public int ComPress_P1 { get; set; }
/// <summary>
/// 轴4( 压紧轴)压紧点 P2
/// </summary>
public int ComPress_P2 { get; set; }
/// <summary>
/// 轴4( 压紧轴) 压紧前点P3
/// </summary>
public int ComPress_P3{ get; set; }
public int InOut_P4 { get; set; }
}
}
......@@ -42,27 +42,27 @@ namespace OnlineStore.LoadCSVLibrary
public int UpDownAxis_IL_P4 { get; set; }
/// <summary>
/// 进出轴(库位点取料点)P3
/// 进出轴库位取料点P4
/// </summary>
[CSVAttribute("进出轴库位点取料点P3")]
public int InOutAxis_P3 { get; set; }
[CSVAttribute("进出轴库位取料点P4")]
public int InOutAxis_P4 { get; set; }
/// <summary>
/// 压紧轴(压紧点)P2
/// </summary>
[CSVAttribute("压紧轴压紧点P2")]
public int CompressAxis_P2 { get; set; }
/// <summary>
/// 压紧轴(压紧前点)P3
/// </summary>
[CSVAttribute("压紧轴压紧前点P3")]
public int CompressAxis_C_P3 { get; set; }
///// <summary>
///// 压紧轴(压紧点)P2
///// </summary>
//[CSVAttribute("压紧轴压紧点P2")]
//public int CompressAxis_P2 { get; set; }
///// <summary>
///// 压紧轴(压紧前点)P3
///// </summary>
//[CSVAttribute("压紧轴压紧前点P3")]
//public int CompressAxis_C_P3 { get; set; }
/// <summary>
/// 轴3(进出轴) 进料口取料点P2
/// </summary>
[CSVAttribute("进出轴进料口取料点P2")]
public int InOutAxis_Door_P2 { get; set; }
///// <summary>
///// 轴3(进出轴) 进料口取料点P2
///// </summary>
//[CSVAttribute("进出轴进料口取料点P2")]
//public int InOutAxis_Door_P2 { get; set; }
public static bool CheckPosition(ACSquareSPosition position, Box_Config Config)
{
......@@ -82,12 +82,8 @@ namespace OnlineStore.LoadCSVLibrary
{
int iMin = Config.InOut_Axis.PositionMin;
int iMax = Config.InOut_Axis.PositionMax;
if (iMin > position.InOutAxis_Door_P2 || iMax < position.InOutAxis_Door_P2)
{
LogUtil.error(position.PositionNum + " InOutAxis_Door_P2位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
}
if (iMin > position.InOutAxis_P3 || iMax < position.InOutAxis_P3)
if (iMin > position.InOutAxis_P4 || iMax < position.InOutAxis_P4)
{
LogUtil.error(position.PositionNum + " InOutAxis_P3位置超出" + Config.InOut_Axis.Explain + "上下限(" + iMin + "-" + iMax + ")");
return false;
......
......@@ -404,10 +404,25 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[ConfigProAttribute("Humiture_Port", true )]
public string Humiture_Port { get; set; }
/// <summary>
/// PRO,(X轴-进出轴)P1左侧托架取料点P2,InOutAxis_P2_Position,7900,,,,,,,
/// </summary>
[ConfigProAttribute("InOutAxis_P2_Position", true)]
public int InOutAxis_P2_Position { get; set; }
/// <summary>
/// PRO,(X轴-进出轴)P1右侧托架取料点P3,InOutAxis_P3_Position,7900,,,,,,,
/// </summary>
[ConfigProAttribute("InOutAxis_P3_Position", true)]
public int InOutAxis_P3_Position { get; set; }
/// <summary>
/// PRO,(X轴-进出轴)P4速度,InOutAxis_P4_Speed,600,,,,,,,
/// </summary>
[ConfigProAttribute("InOutAxis_P4_Speed", true)]
public int InOutAxis_P4_Speed { get; set; }
/// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary>
......
......@@ -129,7 +129,7 @@ namespace OnlineStore.LoadCSVLibrary
/// DO, 温湿度喷气电磁阀, StartOrStopBlow,12, 温湿度喷气电磁阀, Y2-5, B14
/// </summary>
public static string StartOrStopBlow = "StartOrStopBlow";
public static string TrayCheck_Door;
// public static string TrayCheck_Door;
}
public enum IO_VALUE
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!