Commit 30a616ce LN

入料机构代码

1 个父辈 5d42698f
正在显示 29 个修改的文件 包含 1090 行增加136 行删除
...@@ -100,6 +100,15 @@ namespace OnlineStore.Common ...@@ -100,6 +100,15 @@ namespace OnlineStore.Common
public static string PNList = "PNList"; public static string PNList = "PNList";
public static string AutoInput { get; set; } public static string AutoInput = "AutoInput";
public static string AInStoreInfo= "AInStoreInfo";
public static string AOutStoreInfo= "AOutStoreInfo";
public static string BInStoreInfo= "BInStoreInfo";
public static string BOutStoreInfo= "BOutStoreInfo";
public static string AShelfInfo = "AShelfInfo";
public static string BShelfInfo = "BShelfInfo";
} }
} }
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,出力,距离,推压速度,脆盘目标速度,脆盘加速度,脆盘减速度,脆盘出力,脆盘距离,脆盘推压速度 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,出力,距离,推压速度,脆盘目标速度,脆盘加速度,脆盘减速度,脆盘出力,脆盘距离,脆盘推压速度
CLAW,1,移栽D1_夹爪,CLAW_Input,0,COM13,,100,500,500,60,6,20,15,15,15,20,20,15 CLAW,1,入料机构夹爪,CLAW_Input,0,COM13,,100,500,500,60,6,20,15,15,15,20,20,15
PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,,,,,,,,,, PRO,0,当多久没操作时流水线休眠(秒),Sleep_MSeconds,600,,,,,,,,,,,,,,
PRO,0,气压检测信号关闭需要持续的时间,Airpressure_CheckSeconds,600,,,,,,,,,,,,,, PRO,0,气压检测信号关闭需要持续的时间,Airpressure_CheckSeconds,600,,,,,,,,,,,,,,
PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,,, PRO,0,IO信号超时时间(秒),IOSingle_TimerOut,15,,,,,,,,,,,,,,
......
...@@ -48,15 +48,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -48,15 +48,15 @@ namespace OnlineStore.DeviceLibrary
rmaxis.ClosePort(); rmaxis.ClosePort();
} }
} }
public void Push(DeviceMoveInfo moveInfo , bool checkHasReel , string[] code ) //public void Push(DeviceMoveInfo moveInfo , bool checkHasReel , string[] code )
//{
// ClampPush(moveInfo, checkHasReel, code);
//}
public void Push(DeviceMoveInfo moveInfo = null, bool checkHasReel = true, params string[] code )
{ {
ClampPush(moveInfo, checkHasReel, code); ClampPush(moveInfo, checkHasReel, code);
} }
public void Push(DeviceMoveInfo moveInfo = null, bool checkHasReel = true, string code="") private void ClampPush(DeviceMoveInfo moveInfo, bool checkHasReel, params string[] code)
{
ClampPush(moveInfo, checkHasReel, code);
}
public void ClampPush(DeviceMoveInfo moveInfo, bool checkHasReel, params string[] code)
{ {
bool iscrisp = StoreManager.IsCrispReel(code); bool iscrisp = StoreManager.IsCrispReel(code);
float distance = config.Distance; float distance = config.Distance;
......
...@@ -310,6 +310,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -310,6 +310,7 @@ namespace OnlineStore.DeviceLibrary
public static bool HasRightCode(params string[] codes) public static bool HasRightCode(params string[] codes)
{ {
return true;
//640104 * 3331001202 * 210417624 * 600 * 0011 //640104 * 3331001202 * 210417624 * 600 * 0011
//分号分割后长度=4,L,E,B,R //分号分割后长度=4,L,E,B,R
try try
......
using System; using OnlineStore.Common;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -8,23 +9,102 @@ namespace OnlineStore.DeviceLibrary ...@@ -8,23 +9,102 @@ namespace OnlineStore.DeviceLibrary
{ {
public class BufferDataManager public class BufferDataManager
{ {
private static InOutPosInfo aInStoreInfo=null;
private static InOutPosInfo aOutStoreInfo = null;
private static InOutPosInfo bInStoreInfo = null;
private static InOutPosInfo bOutStoreInfo = null;
/// <summary> /// <summary>
/// A进料上暂存区料盘信息,null时无料 /// A进料上暂存区料盘信息,null时无料
/// </summary> /// </summary>
public static InOutPosInfo AInStoreInfo = null; public static InOutPosInfo AInStoreInfo
{
get { return aInStoreInfo; }
set
{
aInStoreInfo = value;
SaveData(Setting_Init.AInStoreInfo, value);
}
}
/// <summary> /// <summary>
/// A出料下暂存区料盘信息,null时无料 /// A出料下暂存区料盘信息,null时无料
/// </summary> /// </summary>
public static InOutPosInfo AOutStoreInfo = null; public static InOutPosInfo AOutStoreInfo
{
get { return aOutStoreInfo; }
set
{
aOutStoreInfo = value;
SaveData(Setting_Init.AOutStoreInfo, value);
}
}
/// <summary> /// <summary>
/// B进料上暂存区料盘信息,null时无料 /// B进料上暂存区料盘信息,null时无料
/// </summary> /// </summary>
public static InOutPosInfo BInStoreInfo = null; public static InOutPosInfo BInStoreInfo
{
get { return bInStoreInfo; }
set
{
bInStoreInfo = value;
SaveData(Setting_Init.BInStoreInfo, value);
}
}
/// <summary> /// <summary>
/// B出料下暂存区料盘信息,null时无料 /// B出料下暂存区料盘信息,null时无料
/// </summary> /// </summary>
public static InOutPosInfo BOutStoreInfo = null; public static InOutPosInfo BOutStoreInfo
{
get { return bOutStoreInfo; }
set
{
bOutStoreInfo = value;
SaveData(Setting_Init.BOutStoreInfo, value);
}
}
public static void InitData()
{
AInStoreInfo = LoadInoutPosInfo(Setting_Init.AInStoreInfo);
AOutStoreInfo = LoadInoutPosInfo(Setting_Init.AOutStoreInfo);
BInStoreInfo = LoadInoutPosInfo(Setting_Init.BInStoreInfo);
BOutStoreInfo = LoadInoutPosInfo(Setting_Init.BOutStoreInfo);
}
private static InOutPosInfo LoadInoutPosInfo(string configStr)
{
string saveData = ConfigAppSettings.GetValue(configStr);
if (!String.IsNullOrEmpty(saveData))
{
InOutPosInfo ainPos = JsonHelper.DeserializeJsonToObject<InOutPosInfo>(saveData);
if (ainPos != null && (!ainPos.barcode.Equals("")) && (!ainPos.PosId.Equals("")))
{
return ainPos;
}
}
return null;
}
public static T LoadData<T>(string configStr)where T:class
{
string saveData = ConfigAppSettings.GetValue(configStr);
if (!String.IsNullOrEmpty(saveData))
{
T data = JsonHelper.DeserializeJsonToObject<T>(saveData);
return data;
}
return null;
}
public static void SaveData<T>(string configStr, T value) where T : class
{
string jsonData = "";
if (!(value == null))
{
JsonHelper.SerializeObject(value);
}
ConfigAppSettings.SaveValue(configStr, jsonData);
LogUtil.info($"保存配置:[{ configStr}]=[{jsonData }]");
}
} }
} }
...@@ -433,7 +433,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -433,7 +433,7 @@ namespace OnlineStore.DeviceLibrary
// 参数:cids: 多个 cid // 参数:cids: 多个 cid
//code: 条码内容 //code: 条码内容
Dictionary<string, string> paramMap = new Dictionary<string, string>(); Dictionary<string, string> paramMap = new Dictionary<string, string>();
//paramMap.Add("cids", LineServer.GetAllCID(feedEquipId)); paramMap.Add("cids", StoreManager.Config.CID);
paramMap.Add("code", codeStr); paramMap.Add("code", codeStr);
paramMap.Add(ParamDefine.rfid, rfid); paramMap.Add(ParamDefine.rfid, rfid);
...@@ -487,14 +487,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -487,14 +487,14 @@ namespace OnlineStore.DeviceLibrary
result.Result = serverResult.result; result.Result = serverResult.result;
if (!serverResult.pos.Equals("")) if (!serverResult.pos.Equals(""))
{ {
// 仓位命名: 4D01020304 // 库位号格式:
//第1和第2位表示楼层(4D) //例:05AA03040102
//第3和第4位表示料仓(01) 01 - 18为流水线料仓, 19 - 24为包装料仓 //05:第1和第2位表示料仓编号,01 - 08
//第5和第6位表示列(02) //AA:第3和第4位存储机构A面或B面,AA或者BB
//第7和第8位表示行(03) //03:第5和第6位表示抽屉在第几行
//第9和第10位表示隔板位置(04) //04:第7和第8位表示抽屉在第几列
//例如: 4D12010124 表示4楼12号料仓第1列第1行架子上的第24个隔板位置 //01:第9和第10位表示在抽屉中的第几行
//4D19050208 表示4楼19号料仓(包装料仓)第5列第2行架子上的第8个隔板位置 //02:第11和第12位表示在抽屉中的第几列
string posId = serverResult.pos; string posId = serverResult.pos;
//根据库位号查找移栽 //根据库位号查找移栽
......
...@@ -97,12 +97,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,12 +97,13 @@ namespace OnlineStore.DeviceLibrary
string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input); string inputConfigPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Input);
InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath); InputEquip_Config inputConfig = CSVConfigReader.LoadInputConfig(1, DeviceType.InputEquip, inputConfigPath);
inputConfig.CID = CID;
inputConfig.SetIO(1); inputConfig.SetIO(1);
allConfigMap.Add(1, inputConfig); allConfigMap.Add(1, inputConfig);
string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box); string boxPath = appPath + ConfigAppSettings.GetValue(Setting_Init.ConfigPath_Box);
BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath); BoxEquip_Config boxConfig = CSVConfigReader.LoadBoxConfig(2, DeviceType.BoxEquip, boxPath);
boxConfig.CID = CID;
boxConfig.SetIO(2); boxConfig.SetIO(2);
allConfigMap.Add(2, boxConfig); allConfigMap.Add(2, boxConfig);
......
...@@ -278,6 +278,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -278,6 +278,16 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = false; wait.IsEnd = false;
return wait; return wait;
} }
public static WaitResultInfo WaitAxisOrg(ConfigMoveAxis axis, IO_VALUE value)
{
WaitResultInfo wait = new WaitResultInfo();
wait.CanWhileMoveCount = 0;
wait.WaitType = WaitEnum.W006_AxisOrg;
wait.AxisInfo = axis;
wait.IoValue = value;
wait.IsEnd = false;
return wait;
}
public static WaitResultInfo WaitTime(int MScends) public static WaitResultInfo WaitTime(int MScends)
{ {
......
...@@ -106,9 +106,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -106,9 +106,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
ResetMove =13, ResetMove =13,
} }
public enum StepEnum
public enum StepEnum {
{
Wait = 0, Wait = 0,
#region 入料模块复位 1000 开始 #region 入料模块复位 1000 开始
...@@ -142,7 +141,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
/// 入料模块复位:升降轴到P1 /// 入料模块复位:升降轴到P1
/// </summary> /// </summary>
IR06_UpdownToP1, IR06_UpdownToP1,
/// <summary> /// <summary>
/// 入料模块复位: 夹紧气缸放松 /// 入料模块复位: 夹紧气缸放松
/// </summary> /// </summary>
...@@ -154,12 +153,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -154,12 +153,12 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 入料模块取 1100 开始 #region 入料机构入 1100 开始
/// <summary> /// <summary>
/// 入库料串取料:升降轴到达P1 /// 入库料串取料:升降轴到达P1
/// </summary> /// </summary>
II01_UpdownToP1= 1101, II01_UpdownToP1 = 1101,
/// <summary> /// <summary>
/// 入库料串取料A:取料旋转轴SVD13运动到P2(A料口取料点) /// 入库料串取料A:取料旋转轴SVD13运动到P2(A料口取料点)
...@@ -195,14 +194,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -195,14 +194,20 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
II10_WaitAxisCheck, II10_WaitAxisCheck,
/// <summary>
/// 入库料串取料:等待测高完成
/// </summary>
II11_WaitHeight,
/// <summary> /// <summary>
/// 入库料串取料:测宽度,记录条码高度宽度,开始下一盘预扫码 /// 入库料串取料:测宽度,记录条码高度宽度,开始下一盘预扫码
/// </summary> /// </summary>
II11_SaveSize, II12_SaveSize,
/// <summary> /// <summary>
/// 入库料串取料:获取库位号 /// 入库料串取料:获取库位号
/// </summary> /// </summary>
II12_GetPosId, II13_GetPosId,
#region 入料->A侧上暂存区 1140 #region 入料->A侧上暂存区 1140
...@@ -244,27 +249,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -244,27 +249,27 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
II61_WaitNoReel, II61_WaitNoReel,
/// <summary> /// <summary>
/// 入料->B侧:取料升降轴 到P8(B上暂存区放料高点) /// 入料->B侧:取料升降轴 到P10(B上暂存区放料高点)
/// </summary> /// </summary>
II62_UpdownToP8, II62_UpdownToP10,
/// <summary> /// <summary>
/// 入料->B侧:取料旋转轴 到P5 (B上暂存区放料点) /// 入料->B侧:取料旋转轴 到P5 (B上暂存区放料点)
/// </summary> /// </summary>
II63_MiddleToP5, II63_MiddleToP5,
/// <summary> /// <summary>
/// 入料->B侧:取料升降轴 到P9 (B上暂存区放料低点) /// 入料->B侧:取料升降轴 到P11 (B上暂存区放料低点)
/// </summary> /// </summary>
II64_UpdownToP9, II64_UpdownToP11,
/// <summary> /// <summary>
/// 入料->B侧:电卡爪放松 /// 入料->B侧:电卡爪放松
/// </summary> /// </summary>
II65_ClampRelax, II65_ClampRelax,
/// <summary> /// <summary>
/// 入料->B侧:取料升降轴 到P8 (B上暂存区放料高点) /// 入料->B侧:取料升降轴 到P10 (B上暂存区放料高点)
/// </summary> /// </summary>
II66_UpdownToP8, II66_UpdownToP10,
/// <summary> /// <summary>
/// 入料->B侧:取料旋转轴 到P1(待机点) /// 入料->B侧:取料旋转轴 到P1(待机点)
/// </summary> /// </summary>
...@@ -297,13 +302,134 @@ namespace OnlineStore.DeviceLibrary ...@@ -297,13 +302,134 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 入料->NG:取料旋转轴SVD13 运动到P1(待机点) /// 入料->NG:取料旋转轴SVD13 运动到P1(待机点)
/// </summary> /// </summary>
II86_MiddleToP1, II86_MiddleToP1,
#endregion
#endregion #endregion
#region 入料机构出料 1200 开始
#region 出库A侧取料
/// <summary>
/// A侧出料:等待 X54(A出料下暂存区料盘检测)=1
/// </summary>
IO01_ReelCheck = 1201,
/// <summary>
/// A侧出料:取料升降轴SVD12 运动到P6(A下暂存区取料高点)
/// </summary>
IO02_UpdownToP6,
/// <summary>
/// A侧出料:取料旋转轴SVD13 运动到P7(A下暂存区取料点)
/// </summary>
IO03_MiddleToP7,
/// <summary>
/// A侧出料:取料升降轴SVD12 运动到P7(A下暂存区取料低点)
/// </summary>
IO04_UpdownToP7,
/// <summary>
/// A侧出料:电卡爪夹紧 判断到位
/// </summary>
IO05_ClampWork,
/// <summary>
/// A侧出料:取料升降轴SVD12 运动到P6(A下暂存区取料高点)
/// </summary>
IO06_UpdownToP6,
#endregion #endregion
#region 入料模块批量轴开始复位 1500 开始 #region 出库B侧取料
/// <summary>
/// B侧出料:等待 X56(A出料下暂存区料盘检测)=1
/// </summary>
IO11_ReelCheck = 1211,
/// <summary>
/// B侧出料:取料升降轴SVD12 运动到P12(B下暂存区取料高点)
/// </summary>
IO12_UpdownToP12,
/// <summary>
/// B侧出料:取料旋转轴SVD13 运动到P8(B下暂存区取料点)
/// </summary>
IO13_MiddleToP8,
/// <summary>
/// B侧出料:取料升降轴SVD12 运动到P13(B下暂存区取料低点)
/// </summary>
IO14_UpdownToP13,
/// <summary>
/// B侧出料:电卡爪夹紧 判断到位
/// </summary>
IO15_ClampWork,
/// <summary>
/// B侧出料:取料升降轴SVD12 运动到P12(B下暂存区取料高点)
/// </summary>
IO16_UpdownToP6,
#endregion
#region 出库到料串
/// <summary>
/// 出库:判断到那个料串,等待料串准备完成
/// </summary>
IO21_WaitShelfReady=1221,
/// <summary>
/// 出库->A料串:批量轴运动到位
/// </summary>
IO22_BatchAxisReady ,
/// <summary>
/// 出库->A料串:取料旋转轴SVD13 运动到P2(A料口取料点)
/// </summary>
IO23_MiddleToP2,
/// <summary>
/// 出库->A料串:取料升降轴SVD12 运动到P2(A料口取料点)
/// </summary>
IO24_UpdownToP2,
/// <summary>
/// 出库->B料串:批量轴运动到位
/// </summary>
IO26_BatchAxisReady,
/// <summary>
/// 出库->B料串:取料旋转轴SVD13 运动到P3(B料口取料点)
/// </summary>
IO27_MiddleToP3,
/// <summary>
/// 出库->B料串:取料升降轴SVD12 运动到P3(B料口取料点)
/// </summary>
IO28_UpdownToP3,
/// <summary>
/// 出库 :电卡爪放松 判断到位
/// </summary>
IO31_ClampRelax,
/// <summary>
/// 出库 :取料升降轴SVD12 运动到P1(待机点)
/// </summary>
IO32_UpdownToP1,
/// <summary>
/// 出库 :取料旋转轴SVD13 运动到P1(待机点)
/// </summary>
IO33_MiddleToP1,
#endregion
#endregion
#region 料串批量轴复位 1500 开始
/// <summary> /// <summary>
/// 入料模块复位:阻挡气缸下降 /// 入料模块复位:阻挡气缸下降
...@@ -335,7 +461,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -335,7 +461,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 入料模块批量轴开始入料 1600 开始 #region 料串批量轴入料 1600 开始
/// <summary> /// <summary>
/// 料串入料:准备取料 /// 料串入料:准备取料
/// </summary> /// </summary>
...@@ -344,12 +470,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -344,12 +470,12 @@ namespace OnlineStore.DeviceLibrary
/// 料串入料:批量轴到待机点P1, 阻挡气缸下降 /// 料串入料:批量轴到待机点P1, 阻挡气缸下降
/// </summary> /// </summary>
IB02_BatchAxisToP1, IB02_BatchAxisToP1,
/// <summary> /// <summary>
/// 料串入料:链条开始转动 /// 料串入料:链条开始转动
/// </summary> /// </summary>
IB04_LineStart, IB04_LineStart,
/// <summary> /// <summary>
/// 料串入料:阻挡气缸上升 /// 料串入料:阻挡气缸上升
/// </summary> /// </summary>
...@@ -389,6 +515,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,6 +515,14 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
IB13_SaveHight, IB13_SaveHight,
/// <summary>
/// 入料结束:入料完成,判断是否直接出库
/// </summary>
IB20_InStoreEnd,
/// <summary> /// <summary>
/// 入料结束:入料完成,批量轴下降到P1 /// 入料结束:入料完成,批量轴下降到P1
/// </summary> /// </summary>
...@@ -402,8 +536,75 @@ namespace OnlineStore.DeviceLibrary ...@@ -402,8 +536,75 @@ namespace OnlineStore.DeviceLibrary
/// 入料结束:通知agv来拉料串 /// 入料结束:通知agv来拉料串
/// </summary> /// </summary>
IB23_ShelfOut, IB23_ShelfOut,
#endregion #endregion
#region 料串批量轴出料 1700 开始
///// <summary>
///// 料串出库:准备出库
///// </summary>
//IS01_Wait = 1701,
///// <summary>
///// 料串出库:批量轴到待机点P1, 阻挡气缸下降
///// </summary>
//IS02_BatchAxisToP1,
///// <summary>
///// 料串出库:链条开始转动
///// </summary>
//IS04_LineStart,
///// <summary>
///// 料串出库:阻挡气缸上升
///// </summary>
//IS05_StopUp,
///// <summary>
///// 料串出库:等待料串稳定
///// </summary>
//IS06_WaitTime,
/// <summary>
/// 料串出库:上料轴开始慢速上升到P2点,等待检测到料盘
/// </summary>
IS07_AxisUpMove,
/// <summary>
/// 料串出库:料串准备完成,可以放料
/// </summary>
IS11_ShelfReady,
/// <summary>
/// 料串出库:料串下降指定的高度(料盘高度X系数)
/// </summary>
IS12_AxisDown,
/// <summary>
/// 料串出库:等待放料结束
/// </summary>
IS13_WaitReel,
/// <summary>
/// 料串出库:放料结束,
/// 如果当前位置<=P1到下个步骤
/// 否则直接到IS11_ShelfReady
/// </summary>
IS14_ReelOK,
/// <summary>
/// 料串出库:如果当前位置<=P1,缓慢上升判断料串是否满,若已经满了,直接离开.
/// </summary>
IS15_AxisUpMove,
/// <summary>
/// 料串出库:入料完成,批量轴下降到P1
/// </summary>
IS21_BatchToP1,
/// <summary>
/// 料串出库:阻挡气缸下降
/// </summary>
IS22_StopDown,
/// <summary>
/// 料串出库:通知agv来拉料串
/// </summary>
IS23_ShelfOut,
#endregion
} }
/// <summary> /// <summary>
/// 料仓运动状态(当料仓状态=busy时,才会有此运动状态) /// 料仓运动状态(当料仓状态=busy时,才会有此运动状态)
/// </summary> /// </summary>
......
...@@ -55,10 +55,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,10 +55,10 @@ namespace OnlineStore.DeviceLibrary
/// 0=未知,1=A侧料串,2=B侧料串 /// 0=未知,1=A侧料串,2=B侧料串
/// </summary> /// </summary>
public int ShelfType{ get; set; }=0; public int ShelfType{ get; set; }=0;
} }
/// <summary> /// <summary>
/// 出入库料盘信息 /// 出入库料盘信息
/// </summary> /// </summary>
public class InOutPosInfo public class InOutPosInfo
{ {
public InOutPosInfo(string barcode, string posId, int platew = 0, int plateh = 0, bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0, bool singleOut = false) public InOutPosInfo(string barcode, string posId, int platew = 0, int plateh = 0, bool urgentReel = false, bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0, bool singleOut = false)
...@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,7 +75,7 @@ namespace OnlineStore.DeviceLibrary
this.singleOut = singleOut; this.singleOut = singleOut;
} }
public static InOutPosInfo NewNgPos(string barcode, string posId, int platew , int plateh, string ngMsg) public static InOutPosInfo NewNgPos(string barcode, string posId, int platew, int plateh, string ngMsg)
{ {
InOutPosInfo inOut = new InOutPosInfo(barcode, posId, platew, plateh); InOutPosInfo inOut = new InOutPosInfo(barcode, posId, platew, plateh);
inOut.IsNG = true; inOut.IsNG = true;
...@@ -132,6 +132,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,6 +132,24 @@ namespace OnlineStore.DeviceLibrary
public bool IsNG { get; set; } = false; public bool IsNG { get; set; } = false;
public string NgMsg { get; set; } = ""; public string NgMsg { get; set; } = "";
public int GetPosType()
{
int startP = 0;
if (String.IsNullOrEmpty(PosId))
{
return 0;
}
if (PosId.Contains("AA"))
{
startP = 1;
}
else if (PosId.Contains("BB"))
{
startP = 2;
}
return startP;
}
} }
/// <summary> /// <summary>
/// 出入库位置信息 /// 出入库位置信息
......
...@@ -385,7 +385,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -385,7 +385,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(moveInfo.Name + " [" + moveInfo.MoveStep + "] CheckWait 出错:", ex); LogUtil.error(moveInfo.Name + " [" + moveInfo.MoveStep + "] CheckWait 出错:", ex);
} }
} }
protected virtual bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait) protected virtual bool CheckWaitResult(DeviceMoveInfo moveInfo, WaitResultInfo wait)
{ {
return false; return false;
...@@ -717,5 +717,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -717,5 +717,12 @@ namespace OnlineStore.DeviceLibrary
} }
return Color.White; return Color.White;
} }
protected void MoveTimeOut(DeviceMoveInfo move, string msg)
{
WarnMsg = move.Name + "[" + move.MoveStep + "] " + msg + " [" + FormUtil.GetSpanStr(move.StepSpan()) + "]";
int logId = DeviceID * 10000 + (int)move.MoveStep;
LogUtil.error(WarnMsg, logId);
Alarm(AlarmType.IoSingleTimeOut);
}
} }
} }
...@@ -4,6 +4,7 @@ using OnlineStore.LoadCSVLibrary; ...@@ -4,6 +4,7 @@ using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -12,17 +13,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -12,17 +13,19 @@ namespace OnlineStore.DeviceLibrary
{ {
public partial class BatchMoveBean public partial class BatchMoveBean
{ {
public string Name = "入料"; public bool ShelfAutoOut = true;
public bool ShelfNeedLeave = false;
public string Name = "料口";
public AxisBean BatchAxis = null; public AxisBean BatchAxis = null;
public int EquipType = 1;//1=左侧A,2=右侧B public int EquipType = 1;//1=左侧A,2=右侧B
public DeviceMoveInfo MoveInfo; public DeviceMoveInfo MoveInfo;
public string WarnMsg = ""; public string WarnMsg = "";
private string CameraName = ""; public string CameraName = "";
private string AgvName = ""; public string AgvName = "";
private string RfidIP = ""; private string RfidIP = "";
public int BatchAxisP1 = 0; public int BatchAxisP1 = 0;
public int BatchAxisP2 = 0; public int BatchAxisP2 = 0;
public List<string> DIList = new List<string>(); public List<string> DIList = new List<string>();
public List<string> DOList = new List<string>(); public List<string> DOList = new List<string>();
private InputEquip Robot private InputEquip Robot
...@@ -37,6 +40,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -37,6 +40,7 @@ namespace OnlineStore.DeviceLibrary
string ioAdd = "_A"; string ioAdd = "_A";
if (EquipType.Equals(1)) if (EquipType.Equals(1))
{ {
Name = "A料口 " ;
this.BatchAxisP1 = config.BatchAxisP1_A; this.BatchAxisP1 = config.BatchAxisP1_A;
this.BatchAxisP2 = config.BatchAxisP2_A; this.BatchAxisP2 = config.BatchAxisP2_A;
ioAdd = "_A"; ioAdd = "_A";
...@@ -46,6 +50,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,6 +50,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
Name = "B料口 " ;
this.BatchAxisP1 = config.BatchAxisP1_B; this.BatchAxisP1 = config.BatchAxisP1_B;
this.BatchAxisP2 = config.BatchAxisP2_B; this.BatchAxisP2 = config.BatchAxisP2_B;
ioAdd = "_B"; ioAdd = "_B";
...@@ -54,9 +59,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -54,9 +59,9 @@ namespace OnlineStore.DeviceLibrary
this.RfidIP = config.PRO_RFIP_B; this.RfidIP = config.PRO_RFIP_B;
} }
Name = "入料 " + ioAdd;
MoveInfo = new DeviceMoveInfo(Name); MoveInfo = new DeviceMoveInfo(Name);
IO_MAxis_Check = IO_MAxis_Check + ioAdd; IO_ReelCheck = IO_ReelCheck + ioAdd;
IO_LineIn_Check = IO_LineIn_Check + ioAdd; IO_LineIn_Check = IO_LineIn_Check + ioAdd;
IO_LineEnd_Check = IO_LineEnd_Check + ioAdd; IO_LineEnd_Check = IO_LineEnd_Check + ioAdd;
IO_Shelf_StopUp = IO_Shelf_StopUp + ioAdd; IO_Shelf_StopUp = IO_Shelf_StopUp + ioAdd;
...@@ -64,11 +69,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -64,11 +69,11 @@ namespace OnlineStore.DeviceLibrary
IO_LineStart = IO_LineStart + ioAdd; IO_LineStart = IO_LineStart + ioAdd;
IO_LineBack = IO_LineBack + ioAdd; IO_LineBack = IO_LineBack + ioAdd;
DIList.Add(IO_MAxis_Check); DIList.Add(IO_ReelCheck);
DIList.Add(IO_LineIn_Check); DIList.Add(IO_LineIn_Check);
DIList.Add(IO_LineEnd_Check); DIList.Add(IO_LineEnd_Check);
DIList.Add(IO_Shelf_StopUp); DIList.Add(IO_Shelf_StopUp);
DIList.Add(IO_Shelf_StopDown); DIList.Add(IO_Shelf_StopDown);
DOList.Add(IO_Shelf_StopUp); DOList.Add(IO_Shelf_StopUp);
DOList.Add(IO_Shelf_StopDown); DOList.Add(IO_Shelf_StopDown);
...@@ -76,7 +81,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -76,7 +81,7 @@ namespace OnlineStore.DeviceLibrary
DOList.Add(IO_LineBack); DOList.Add(IO_LineBack);
} }
internal void TimerProcess() internal void TimerProcess()
{ {
if (MoveInfo.MoveType.Equals(MoveType.None)) if (MoveInfo.MoveType.Equals(MoveType.None))
{ {
if (Robot.MoveInfo.MoveType.Equals(MoveType.Reset) || Robot.MoveInfo.MoveType.Equals(MoveType.RHome)) if (Robot.MoveInfo.MoveType.Equals(MoveType.Reset) || Robot.MoveInfo.MoveType.Equals(MoveType.RHome))
...@@ -85,27 +90,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,27 +90,29 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
if (Robot.AutoInput && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH)) if (Robot.AutoInput && Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.HIGH))
{ {
StartInstore(new InOutParam ()); StartInstore(new InOutParam());
} }
} }
} }
else if (MoveInfo.MoveType.Equals(MoveType.Reset)) else if (MoveInfo.MoveType.Equals(MoveType.Reset))
{ {
ResetProcess(); ResetProcess();
}else if (MoveInfo.MoveType.Equals(MoveType.InStore)) }
else if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
InstoreProcess();
}else if (MoveInfo.MoveType.Equals(MoveType.OutStore)) }
else if (MoveInfo.MoveType.Equals(MoveType.OutStore))
{ {
OutstoreProcess();
} }
//判断是否无料串 //判断是否无料串
if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW) if (Robot.IOValue(IO_LineIn_Check).Equals(IO_VALUE.LOW)
&& Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW) && Robot.IOValue(IO_LineEnd_Check).Equals(IO_VALUE.LOW)
&& Robot.CylinderIsOk(IO_Shelf_StopUp, IO_Shelf_StopDown) ) && Robot.CylinderIsOk(IO_Shelf_StopUp, IO_Shelf_StopDown))
{ {
if (StoreManager.checkWatch(shelfWatch, 10000, true)) if (StoreManager.checkWatch(shelfWatch, 10000, true))
{ {
...@@ -134,7 +141,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -134,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(MoveType.Reset); MoveInfo.NewMove(MoveType.Reset);
MoveInfo.NextMoveStep(StepEnum.IBR01_StopDown); MoveInfo.NextMoveStep(StepEnum.IBR01_StopDown);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
WorkLog("开始复位,定位气缸下降"); WorkLog("开始复位,定位气缸下降");
StopDown(MoveInfo); StopDown(MoveInfo);
} }
else else
...@@ -183,7 +190,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -183,7 +190,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(StepEnum.IBR04_BatchHome)) else if (MoveInfo.IsStep(StepEnum.IBR04_BatchHome))
{ {
MoveInfo.NextMoveStep(StepEnum.IBR05_WaitTime); MoveInfo.NextMoveStep(StepEnum.IBR05_WaitTime);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
} }
else if (MoveInfo.IsStep(StepEnum.IBR05_WaitTime)) else if (MoveInfo.IsStep(StepEnum.IBR05_WaitTime))
{ {
...@@ -228,7 +235,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -228,7 +235,7 @@ namespace OnlineStore.DeviceLibrary
#region 左右入料口共有IO #region 左右入料口共有IO
//伺服料盘检测 //伺服料盘检测
private string IO_MAxis_Check = "MAxis_Check"; private string IO_ReelCheck = "ReelCheck";
//料串前端检测 //料串前端检测
private string IO_LineIn_Check = "LineIn_Check"; private string IO_LineIn_Check = "LineIn_Check";
//料串到位检测 //料串到位检测
...@@ -236,16 +243,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -236,16 +243,16 @@ namespace OnlineStore.DeviceLibrary
//料串阻挡上升 //料串阻挡上升
private string IO_Shelf_StopUp = "Shelf_StopUp"; private string IO_Shelf_StopUp = "Shelf_StopUp";
//料串阻挡下降 //料串阻挡下降
private string IO_Shelf_StopDown = "Shelf_StopDown"; private string IO_Shelf_StopDown = "Shelf_StopDown";
//线体正转 //线体正转
private string IO_LineStart = "LineStart"; private string IO_LineStart = "LineStart";
//线体反转 //线体反转
private string IO_LineBack = "LineBack"; private string IO_LineBack = "LineBack";
#endregion #endregion
#region 气缸操作 #region 气缸操作
public void LineRun(DeviceMoveInfo moveInfo = null) public void LineRun(DeviceMoveInfo moveInfo = null)
{ {
Robot.IOMove(IO_LineBack, IO_VALUE.LOW); Robot.IOMove(IO_LineBack, IO_VALUE.LOW);
...@@ -473,13 +480,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -473,13 +480,37 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(moveInfo.Name + " [" + moveInfo.MoveStep + "] CheckWait 出错:", ex); LogUtil.error(moveInfo.Name + " [" + moveInfo.MoveStep + "] CheckWait 出错:", ex);
} }
} }
/// <summary>
/// 料串准备好出库
/// </summary>
/// <returns></returns>
internal bool ShelfReadyOut(InOutPosInfo posInfo, bool SendShelfOut)
{
if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
{
//TODO 验证料串是否同一个,不是同一个直接送出料串
if (String.IsNullOrEmpty(CurrShelf.XuniRfid))
{
return true;
}
else if (posInfo.rfid.Equals(CurrShelf.XuniRfid))
{
return true;
}
else if (SendShelfOut)
{
SendOutShelfLeave("");
}
}
return false;
}
#region 提升轴匀速上升处理 #region 提升轴匀速上升处理
public bool LastMoveIsTest = true; public bool LastMoveIsTest = true;
public void BatchAxisToP2(bool isFirstMove = true, bool isWait = true, bool IsTest = false)
public void BatchAxisToP2(bool isFirstMove = true, bool isWait = true, bool IsTest = false)
{ {
int targetP2 = BatchAxisP2; int targetP2 = BatchAxisP2;
int targetSpeed = Robot.Config.BatchAxis_P2Speed; int targetSpeed = Robot.Config.BatchAxis_P2Speed;
...@@ -508,22 +539,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -508,22 +539,22 @@ namespace OnlineStore.DeviceLibrary
BatchAxis.Config.TargetPosition = targetP2; BatchAxis.Config.TargetPosition = targetP2;
BatchAxis.AbsMove(null, targetP2, targetSpeed); BatchAxis.AbsMove(null, targetP2, targetSpeed);
//开始检测信号 //开始检测信号
BatchAxis.BatchAxisStartCheck(IO_MAxis_Check, IO_VALUE.HIGH); BatchAxis.BatchAxisStartCheck(IO_ReelCheck, IO_VALUE.HIGH);
LastMoveIsTest = IsTest; LastMoveIsTest = IsTest;
} }
#endregion #endregion
public string GetMoveStr() public string GetMoveStr()
{ {
if (MoveInfo.MoveType.Equals(MoveType.OutStore)) if (MoveInfo.MoveType.Equals(MoveType.OutStore))
{ {
string code = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.ToStr() : ""; string code = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.ToStr() : "";
return "料串:" + CurrShelf .ToStr()+ ", 出料:" + " " + MoveInfo.MoveStep + " \r\n" + code + "\n"; return CurrShelf.ToStr() + ", 出料:" + " " + MoveInfo.MoveStep + " \r\n" + code + "\n";
} }
else if (MoveInfo.MoveType.Equals(MoveType.InStore)) else if (MoveInfo.MoveType.Equals(MoveType.InStore))
{ {
string code = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.ToStr() : ""; string code = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosInfo.ToStr() : "";
return "料串:" + CurrShelf.ToStr() + ", 入料:" + " " + MoveInfo.MoveStep + " " + code + "\n"; return CurrShelf.ToStr() + ", 入料:" + " " + MoveInfo.MoveStep + " \r\n" + code + "\n";
} }
else else
{ {
...@@ -533,11 +564,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -533,11 +564,34 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
return "料串:" + CurrShelf.ShelfRfid; return CurrShelf.ToStr();
}
}
}
public Color GetShowColor()
{
Color color = Robot.GetShowColor();
if (Robot.runStatus > RunStatus.Wait)
{
if (alarmType.Equals(AlarmType.IoSingleTimeOut))
{
color = Color.LightCoral;
}
else if (alarmType.Equals(AlarmType.None).Equals(false))
{
color = Color.Red;
}
else if (MoveInfo.MoveType.Equals(MoveType.InStore) || MoveInfo.MoveType.Equals(MoveType.OutStore))
{
color = Color.LimeGreen;
} }
} }
return color;
} }
protected void WorkLog(string msg) protected void WorkLog(string msg)
{ {
LogUtil.info(Name + " [" + MoveInfo.MoveStep + "]" + msg); LogUtil.info(Name + " [" + MoveInfo.MoveStep + "]" + msg);
......
...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -35,7 +35,7 @@ namespace OnlineStore.DeviceLibrary
baseConfig = config; baseConfig = config;
this.Config = config; this.Config = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = (" " + "料机构" + " ").ToUpper(); Name = (" " + "料机构" + " ").ToUpper();
Init(); Init();
ledProcessTimer.Elapsed += LedProcess; ledProcessTimer.Elapsed += LedProcess;
IoCheckTimer.Elapsed += IoCheckTimerProcess; IoCheckTimer.Elapsed += IoCheckTimerProcess;
...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -136,7 +136,7 @@ namespace OnlineStore.DeviceLibrary
// 1,处于A,B,NG料口是,可以直接回取料升降轴。 // 1,处于A,B,NG料口是,可以直接回取料升降轴。
// 2,处于A, B两个暂存区时,升降轴先运动到该暂存区的取放料高点,旋转轴再回原点或待机点。 // 2,处于A, B两个暂存区时,升降轴先运动到该暂存区的取放料高点,旋转轴再回原点或待机点。
//验证旋转轴位置 TODO //验证旋转轴位置 TODO
if (MiddleAxis.IsInPosition(Config.Middle_P4_AUpper)) if (MiddleAxis.IsInPosition(Config.Middle_P4_AUpper) )
{ {
MoveInfo.NextMoveStep(StepEnum.IR02_UpdownUpMove); MoveInfo.NextMoveStep(StepEnum.IR02_UpdownUpMove);
LogInfo($"复位 {MoveInfo.SLog}:当前旋转轴在 A上暂存区 {Config.Middle_P4_AUpper},升降轴先到P4:{Config.Updown_P4_AUpperH}"); LogInfo($"复位 {MoveInfo.SLog}:当前旋转轴在 A上暂存区 {Config.Middle_P4_AUpper},升降轴先到P4:{Config.Updown_P4_AUpperH}");
...@@ -204,10 +204,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,10 +204,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StepEnum.IR07_ClampRelax); MoveInfo.NextMoveStep(StepEnum.IR07_ClampRelax);
LogInfo($"复位{MoveInfo.SLog}:夹爪气缸放松"); LogInfo($"复位{MoveInfo.SLog}:夹爪气缸放松");
if (Config.UseClampJaw.Equals(1)) ClampRelax(MoveInfo,MoveInfo.MoveParam.PosInfo.barcode);
{
ClampJaw.Relax(MoveInfo);
}
} }
else if (MoveInfo.IsStep(StepEnum.IR07_ClampRelax)) else if (MoveInfo.IsStep(StepEnum.IR07_ClampRelax))
{ {
...@@ -283,35 +280,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -283,35 +280,55 @@ namespace OnlineStore.DeviceLibrary
if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IB10_ScanOK)) if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IB10_ScanOK))
{ {
LogInfo( "A侧开始取料"); LogInfo("A侧开始取料");
string code = BatchMove_A.MoveInfo.MoveParam.PosInfo.barcode; StartInstore(BatchMove_A.GetInstoreParam());
InOutPosInfo posInfo = new InOutPosInfo(code, "");
posInfo.NgMsg = BatchMove_A.MoveInfo.MoveParam.PosInfo.NgMsg;
posInfo.IsNG = BatchMove_A.MoveInfo.MoveParam.PosInfo.IsNG;
InOutParam param = new InOutParam(posInfo);
param.ShelfType = 1;
StartInstore(param);
} }
else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IB10_ScanOK)) else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.InStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IB10_ScanOK))
{ {
LogInfo("B侧开始取料"); LogInfo("B侧开始取料");
string code = BatchMove_B.MoveInfo.MoveParam.PosInfo.barcode; StartInstore(BatchMove_B.GetInstoreParam());
InOutPosInfo posInfo = new InOutPosInfo(code, ""); }
posInfo.NgMsg = BatchMove_B.MoveInfo.MoveParam.PosInfo.NgMsg; //TODO 如果出料暂存区有料,且空料串准备完成,开始出料
posInfo.IsNG = BatchMove_B.MoveInfo.MoveParam.PosInfo.IsNG; else if (BatchMove_A.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_A.MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
InOutParam param = new InOutParam(posInfo);
param.ShelfType = 2;
StartInstore(param);
}else
{ {
//TODO 如果出料暂存区有料,且空料串准备完成,开始出料 if (BufferDataManager.AOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 1;
LogInfo($"A下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
else if (BufferDataManager.BOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 1;
LogInfo($"B下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
}
else if (BatchMove_B.MoveInfo.MoveType.Equals(MoveType.OutStore) && BatchMove_B.MoveInfo.IsStep(StepEnum.IS11_ShelfReady))
{
if (BufferDataManager.AOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 2;
LogInfo($"A下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
else if (BufferDataManager.BOutStoreInfo != null)
{
InOutParam param = new InOutParam(BufferDataManager.AOutStoreInfo);
param.ShelfType = 2;
LogInfo($"B下暂存区物料{param.PosInfo.ToStr()},准备出库到料串{param.ShelfType}");
StartOutstore(param);
}
} }
} }
if (NoErrorAlarm()) if (NoErrorAlarm())
{ {
CheckAxisAlarm(); CheckAxisAlarm();
} }
} }
...@@ -338,7 +355,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -338,7 +355,7 @@ namespace OnlineStore.DeviceLibrary
} }
private DateTime checkAlarmTime = DateTime.Now; private DateTime checkAlarmTime = DateTime.Now;
public void CheckAxisAlarm() private void CheckAxisAlarm()
{ {
if (alarmType.Equals(AlarmType.AxisAlarm) || alarmType.Equals(AlarmType.AxisMoveError)) if (alarmType.Equals(AlarmType.AxisAlarm) || alarmType.Equals(AlarmType.AxisMoveError))
{ {
...@@ -403,6 +420,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -403,6 +420,30 @@ namespace OnlineStore.DeviceLibrary
axis.ServoOff(); axis.ServoOff();
} }
} }
private void ClampWork(DeviceMoveInfo moveInfo,bool isCheck,params string[] codes)
{
if (Config.UseClampJaw.Equals(1))
{
ClampJaw.Push(moveInfo, isCheck, codes);
}
else
{
}
}
private void ClampRelax(DeviceMoveInfo moveInfo ,params string[] codes)
{
if (Config.UseClampJaw.Equals(1))
{
ClampJaw.Relax(moveInfo, codes);
}
else
{
}
}
} }
......
...@@ -92,8 +92,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -92,8 +92,7 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[ConfigProAttribute("BatchAxisP2_A")] [ConfigProAttribute("BatchAxisP2_A")]
public int BatchAxisP2_A { get; set; } public int BatchAxisP2_A { get; set; }
public int Height_ChangeValue_A { get; set; }
/// <summary> /// <summary>
/// PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,, /// PRO,0,提升轴待机点_B侧,BatchAxisP1_B,1000,,,,,,,,,,,,
/// </summary> /// </summary>
......
...@@ -56,7 +56,8 @@ namespace OnlineStore.XLRStore ...@@ -56,7 +56,8 @@ namespace OnlineStore.XLRStore
//tabControl1.TabPages.Remove(tabPage5); //tabControl1.TabPages.Remove(tabPage5);
timer1.Start(); timer1.Start();
} }
private FrmInputEquip inputEquip = null;
private FrmBoxEquip box = null;
private void LoadStoreData() private void LoadStoreData()
{ {
formLineStatus(false); formLineStatus(false);
...@@ -70,9 +71,10 @@ namespace OnlineStore.XLRStore ...@@ -70,9 +71,10 @@ namespace OnlineStore.XLRStore
Application.Exit(); Application.Exit();
return; return;
} }
FrmInputEquip inputEquip = new FrmInputEquip(StoreManager.XLRStore.inputEquip);
inputEquip = new FrmInputEquip(StoreManager.XLRStore.inputEquip);
AddForm(" 入料机构 ", inputEquip); AddForm(" 入料机构 ", inputEquip);
FrmBoxEquip box = new FrmBoxEquip(StoreManager.XLRStore.boxEquip); box = new FrmBoxEquip(StoreManager.XLRStore.boxEquip);
AddForm(" 仓储机构 ", box); AddForm(" 仓储机构 ", box);
托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1); 托盘初始化ToolStripMenuItem.Visible = ConfigAppSettings.GetIntValue(Setting_Init.OpenRFIDWrite).Equals(1);
...@@ -96,9 +98,76 @@ namespace OnlineStore.XLRStore ...@@ -96,9 +98,76 @@ namespace OnlineStore.XLRStore
LogUtil.logBox = this.logBox; LogUtil.logBox = this.logBox;
lastLogTime = DateTime.Now.AddMinutes(-10); lastLogTime = DateTime.Now.AddMinutes(-10);
this.Opacity = 100; this.Opacity = 100;
ReelControlA1.ShowData("A上暂存区物料", BufferDataManager.AInStoreInfo);
ReelControlA2.ShowData("A下暂存区物料", BufferDataManager.AOutStoreInfo);
ReelControlB1.ShowData("B上暂存区物料", BufferDataManager.BInStoreInfo);
ReelControlB2.ShowData("B下暂存区物料", BufferDataManager.BOutStoreInfo);
ReelControlA1.linkClear.Click += LinkClear_ClickA1;
ReelControlA1.linkClear.Click += LinkClear_ClickA2;
ReelControlA1.linkClear.Click += LinkClear_ClickB1;
ReelControlA1.linkClear.Click += LinkClear_ClickB2;
BoxControl.InitData(StoreManager.XLRStore.boxEquip.Name);
InputControl.InitData(StoreManager.XLRStore.inputEquip.Name);
ShelfAControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_A.Name);
ShelfBControl.InitData(StoreManager.XLRStore.inputEquip.BatchMove_B.Name);
LoadOk = true; LoadOk = true;
} }
private void LinkClear_ClickA1(object sender, EventArgs e)
{
if (BufferDataManager.AInStoreInfo == null)
{
return;
}
DialogResult result = MessageBox.Show("确定清除A上暂存区物料:" + BufferDataManager.AInStoreInfo.ToStr(), "", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
LogUtil.info(Name + "手动清除A上暂存区物料:" + BufferDataManager.AInStoreInfo.ToStr());
BufferDataManager.AInStoreInfo = null;
}
}
private void LinkClear_ClickA2(object sender, EventArgs e)
{
if (BufferDataManager.AOutStoreInfo == null)
{
return;
}
DialogResult result = MessageBox.Show("确定清除A下暂存区物料:" + BufferDataManager.AOutStoreInfo.ToStr(), "", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
LogUtil.info(Name + "手动清除A下暂存区物料:" + BufferDataManager.AOutStoreInfo.ToStr());
BufferDataManager.AOutStoreInfo = null;
}
}
private void LinkClear_ClickB1(object sender, EventArgs e)
{
if (BufferDataManager.BInStoreInfo == null)
{
return;
}
DialogResult result = MessageBox.Show("确定清除B上暂存区物料:" + BufferDataManager.BInStoreInfo.ToStr(), "", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
LogUtil.info(Name + "手动清除B上暂存区物料:" + BufferDataManager.BInStoreInfo.ToStr());
BufferDataManager.BInStoreInfo = null;
}
}
private void LinkClear_ClickB2(object sender, EventArgs e)
{
if (BufferDataManager.BOutStoreInfo == null)
{
return;
}
DialogResult result = MessageBox.Show("确定清除B下暂存区物料:" + BufferDataManager.BOutStoreInfo.ToStr(), "", MessageBoxButtons.OKCancel);
if (result.Equals(DialogResult.OK))
{
LogUtil.info(Name + "手动清除B下暂存区物料:" + BufferDataManager.BOutStoreInfo.ToStr());
BufferDataManager.BOutStoreInfo = null;
}
}
private void AddForm(string text, Form form) private void AddForm(string text, Form form)
{ {
//text = text.PadRight(10, ' '); //text = text.PadRight(10, ' ');
...@@ -371,15 +440,14 @@ namespace OnlineStore.XLRStore ...@@ -371,15 +440,14 @@ namespace OnlineStore.XLRStore
} }
lblWarnMsg.Text = warnMsg; lblWarnMsg.Text = warnMsg;
BoxEquip box = StoreManager.XLRStore.boxEquip;
string bufStr = ""; BoxControl.ShowData(box.IsDebug, box.GetRunStr(), box.WarnMsg, box.MoveInfo, box.GetShowColor());
bufStr+="A进料暂存料盘:"+ BufferDataManager.AInStoreInfo?.ToStr()+"\r\n"; InputEquip input = StoreManager.XLRStore.inputEquip;
bufStr += "A出料暂存料盘:" + BufferDataManager.AOutStoreInfo?.ToStr() + "\r\n"; InputControl.ShowData(input.IsDebug, input.GetRunStr(), input.WarnMsg, input.MoveInfo, input.GetShowColor());
bufStr += "A进料暂存料盘:" + BufferDataManager.BInStoreInfo?.ToStr() + "\r\n"; ShelfAControl.ShowData(true, "", input.BatchMove_A.WarnMsg, input.BatchMove_A.MoveInfo, input.BatchMove_A.GetShowColor(), input.BatchMove_A.CurrShelf?.ToStr());
bufStr += "A出料暂存料盘:" + BufferDataManager.BOutStoreInfo?.ToStr() + ""; ShelfBControl.ShowData(true, "", input.BatchMove_B.WarnMsg, input.BatchMove_B.MoveInfo, input.BatchMove_B.GetShowColor(), input.BatchMove_B.CurrShelf?.ToStr());
lblBufferInfo.Text = bufStr;
if (StoreBean.runStatus > RunStatus.Wait) if (StoreBean.runStatus > RunStatus.Wait)
...@@ -579,5 +647,22 @@ namespace OnlineStore.XLRStore ...@@ -579,5 +647,22 @@ namespace OnlineStore.XLRStore
LogUtil.error("FrmCrispTray 出错:" + ex.ToString()); LogUtil.error("FrmCrispTray 出错:" + ex.ToString());
} }
} }
private void timer2_Tick(object sender, EventArgs e)
{
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (!LoadOk)
{
return;
}
if (inputEquip != null)
{
inputEquip.FrmInputEquip_VisibleChanged(null, null);
}
}
} }
} }
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
<Reference Include="UserFromControl"> <Reference Include="UserFromControl">
<HintPath>..\..\dll\UserFromControl.dll</HintPath> <HintPath>..\..\dll\UserFromControl.dll</HintPath>
</Reference> </Reference>
<Reference Include="XLRStore, Version=1.0.7818.19677, Culture=neutral, PublicKeyToken=null" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="FrmBase.cs"> <Compile Include="FrmBase.cs">
...@@ -163,6 +164,12 @@ ...@@ -163,6 +164,12 @@
<Compile Include="useControl\ClampJawControl.Designer.cs"> <Compile Include="useControl\ClampJawControl.Designer.cs">
<DependentUpon>ClampJawControl.cs</DependentUpon> <DependentUpon>ClampJawControl.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="useControl\ReelDataControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="useControl\ReelDataControl.Designer.cs">
<DependentUpon>ReelDataControl.cs</DependentUpon>
</Compile>
<Compile Include="useControl\EquipControl.cs"> <Compile Include="useControl\EquipControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -215,6 +222,9 @@ ...@@ -215,6 +222,9 @@
<EmbeddedResource Include="useControl\ClampJawControl.resx"> <EmbeddedResource Include="useControl\ClampJawControl.resx">
<DependentUpon>ClampJawControl.cs</DependentUpon> <DependentUpon>ClampJawControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="useControl\ReelDataControl.resx">
<DependentUpon>ReelDataControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\EquipControl.resx"> <EmbeddedResource Include="useControl\EquipControl.resx">
<DependentUpon>EquipControl.cs</DependentUpon> <DependentUpon>EquipControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -42,7 +42,7 @@ namespace OnlineStore.XLRStore ...@@ -42,7 +42,7 @@ namespace OnlineStore.XLRStore
} }
lblWarnMsg.Text = moveBean.WarnMsg; lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr(); lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.AgvName + " :" + AgvClient.GetAction(moveBean.AgvName);
} }
catch (Exception ex) catch (Exception ex)
{ {
...@@ -69,12 +69,14 @@ namespace OnlineStore.XLRStore ...@@ -69,12 +69,14 @@ namespace OnlineStore.XLRStore
private void FrmStoreIOStatus_Load(object sender, EventArgs e) private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{ {
this.chbAutoOut.Checked = moveBean.ShelfAutoOut;
axisMoveControl1.LoadData(StoreManager.XLRStore.inputEquip, new AxisBean[] { moveBean.BatchAxis }); axisMoveControl1.LoadData(StoreManager.XLRStore.inputEquip, new AxisBean[] { moveBean.BatchAxis });
lblName.Text = moveBean.Name;
batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.BatchAxisP1); batchAxisP1.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P1Speed, moveBean.BatchAxisP1);
batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.BatchAxisP2 ); batchAxisP2.SetMoveData(moveBean.BatchAxis, StoreManager.XLRStore.inputEquip.Config.BatchAxis_P2Speed, moveBean.BatchAxisP2 );
lblWarnMsg.Text = moveBean.WarnMsg;
lblCurrInfo.Text = moveBean.GetMoveStr();
lblAgvInfo.Text = "AGV " + moveBean.AgvName + " :" + AgvClient.GetAction(moveBean.AgvName);
IsLoad = true; IsLoad = true;
} }
...@@ -204,6 +206,73 @@ namespace OnlineStore.XLRStore ...@@ -204,6 +206,73 @@ namespace OnlineStore.XLRStore
btnTestStop.Enabled = false; btnTestStop.Enabled = false;
} }
} }
private void chbAutoOut_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
moveBean.ShelfAutoOut = chbAutoOut.Checked;
LogUtil.info(moveBean.Name + "用户切换料架入库完成自动出库: " + moveBean.ShelfAutoOut);
}
private void btnShelfOut_Click(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
moveBean.ShelfNeedLeave = true;
LogUtil.info(moveBean.Name + "用户点击:"+btnShelfOut.Text );
}
private void btnScanTest_Click(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
string camera = moveBean.CameraName;
List<string> LastCodeList = CodeManager.CameraScan(camera, moveBean.Name.Trim() + "测试");
string msg = CodeManager.ProcessCode(LastCodeList);
LogUtil.info(moveBean.Name + "[" + camera + "]扫码测试结果:\r\n" + msg);
MessageBox.Show(moveBean.Name + "[" + camera + "]扫码测试结果:" + msg);
}
private void Shelf_StopUp_A_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + Shelf_StopUp_A.Text);
moveBean.StopUp();
}
private void Shelf_StopDown_A_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + Shelf_StopDown_A.Text);
moveBean.StopDown();
}
private void LineStart_A_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + LineStart_A .Text);
moveBean.LineRun ();
}
private void LineBack_A_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + LineBack_A.Text);
moveBean.LineBack ();
}
private void LineStop_A_Click(object sender, EventArgs e)
{
LogUtil.info(moveBean.Name + "点击:" + LineStop_A.Text);
moveBean.LineStop();
}
} }
} }
......
...@@ -201,6 +201,7 @@ namespace OnlineStore.XLRStore ...@@ -201,6 +201,7 @@ namespace OnlineStore.XLRStore
} }
} }
lblThisSta.Text = inputEquip.WarnMsg; lblThisSta.Text = inputEquip.WarnMsg;
lblMoveInfo.Text = inputEquip.GetMoveStr();
string text = ""; string text = "";
} }
...@@ -306,7 +307,7 @@ namespace OnlineStore.XLRStore ...@@ -306,7 +307,7 @@ namespace OnlineStore.XLRStore
FrmBatchMove frmMove2 = new FrmBatchMove(inputEquip.BatchMove_B); FrmBatchMove frmMove2 = new FrmBatchMove(inputEquip.BatchMove_B);
AddForm(tabControl1, " " + inputEquip.BatchMove_B.Name + " ", frmMove2); AddForm(tabControl1, " " + inputEquip.BatchMove_B.Name + " ", frmMove2);
PointEditEnable(false);
LoadPoint(); LoadPoint();
IsLoad = true; IsLoad = true;
} }
...@@ -579,6 +580,48 @@ namespace OnlineStore.XLRStore ...@@ -579,6 +580,48 @@ namespace OnlineStore.XLRStore
{ {
} }
private void PointEditEnable(bool enable)
{
groupBox2.Enabled = enable;
groupBox5.Enabled = enable;
groupBox7.Enabled = enable;
groupBox8.Enabled = enable;
groupBox9.Enabled = enable;
groupBox10.Enabled = enable;
groupBox11.Enabled = enable;
}
private void chbPointEditEnable_CheckedChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
PointEditEnable(chbPointEditEnable.Checked);
}
internal void FrmInputEquip_VisibleChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
chbPointEditEnable.Checked = false;
}
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if (!IsLoad)
{
return;
}
chbPointEditEnable.Checked = false;
}
private void tabPage2_Click(object sender, EventArgs e)
{
}
} }
} }
......
namespace OnlineStore.XLRStore
{
partial class ReelDataControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lblText = new System.Windows.Forms.Label();
this.lblReelInfo = new System.Windows.Forms.Label();
this.panName = new System.Windows.Forms.Panel();
this.linkClear = new System.Windows.Forms.LinkLabel();
this.panName.SuspendLayout();
this.SuspendLayout();
//
// lblText
//
this.lblText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblText.BackColor = System.Drawing.Color.Transparent;
this.lblText.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblText.ForeColor = System.Drawing.Color.Black;
this.lblText.Location = new System.Drawing.Point(-2, 2);
this.lblText.Name = "lblText";
this.lblText.Size = new System.Drawing.Size(154, 19);
this.lblText.TabIndex = 1;
this.lblText.Text = "暂存区物料信息";
this.lblText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblText.MouseEnter += new System.EventHandler(this.lblText_MouseEnter);
this.lblText.MouseLeave += new System.EventHandler(this.lblText_MouseLeave);
//
// lblReelInfo
//
this.lblReelInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblReelInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblReelInfo.ForeColor = System.Drawing.Color.Black;
this.lblReelInfo.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.lblReelInfo.Location = new System.Drawing.Point(0, 31);
this.lblReelInfo.Name = "lblReelInfo";
this.lblReelInfo.Size = new System.Drawing.Size(248, 89);
this.lblReelInfo.TabIndex = 3;
this.lblReelInfo.Text = "暂无物料";
this.lblReelInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblReelInfo.MouseEnter += new System.EventHandler(this.lblText_MouseEnter);
this.lblReelInfo.MouseLeave += new System.EventHandler(this.lblText_MouseLeave);
//
// panName
//
this.panName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panName.BackColor = System.Drawing.Color.Transparent;
this.panName.Controls.Add(this.linkClear);
this.panName.Controls.Add(this.lblText);
this.panName.Location = new System.Drawing.Point(1, 1);
this.panName.Name = "panName";
this.panName.Size = new System.Drawing.Size(248, 28);
this.panName.TabIndex = 7;
this.panName.MouseEnter += new System.EventHandler(this.lblText_MouseEnter);
this.panName.MouseLeave += new System.EventHandler(this.lblText_MouseLeave);
//
// linkClear
//
this.linkClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.linkClear.AutoSize = true;
this.linkClear.Location = new System.Drawing.Point(158, 9);
this.linkClear.Name = "linkClear";
this.linkClear.Size = new System.Drawing.Size(77, 12);
this.linkClear.TabIndex = 2;
this.linkClear.TabStop = true;
this.linkClear.Text = "清除料盘信息";
this.linkClear.MouseEnter += new System.EventHandler(this.lblText_MouseEnter);
this.linkClear.MouseLeave += new System.EventHandler(this.lblText_MouseLeave);
//
// ReelDataControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.White;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Controls.Add(this.panName);
this.Controls.Add(this.lblReelInfo);
this.Name = "ReelDataControl";
this.Size = new System.Drawing.Size(250, 121);
this.Load += new System.EventHandler(this.EquipControl_Load);
this.MouseEnter += new System.EventHandler(this.ReelDataControl_MouseEnter);
this.MouseLeave += new System.EventHandler(this.ReelDataControl_MouseLeave);
this.panName.ResumeLayout(false);
this.panName.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblText;
private System.Windows.Forms.Label lblReelInfo;
private System.Windows.Forms.Panel panName;
public System.Windows.Forms.LinkLabel linkClear;
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OnlineStore.DeviceLibrary;
namespace OnlineStore.XLRStore
{
public partial class ReelDataControl : UserControl
{
public string ReelText
{
get { return lblText.Text; }
set { lblText.Text = value; }
}
public Color ColorStatus
{
get { return this.BackColor; }
set
{
this.BackColor = value;
}
}
public void SelectStyle()
{
panName.BackColor = Color.DeepSkyBlue;
}
public void UnSelectStyle()
{
panName.BackColor = Color.Transparent;
}
public void ShowData(string text, InOutPosInfo posInfo)
{
lblText.Text = text;
if (posInfo == null)
{
lblReelInfo.Text = "";
this.BackColor = Color.White;
linkClear.Visible = false;
}
else
{
lblReelInfo.Text = posInfo.ToStr();
this.BackColor = Color.LimeGreen;
linkClear.Visible = true ;
}
}
public ReelDataControl()
{
InitializeComponent();
}
private void EquipControl_Load(object sender, EventArgs e)
{
}
private void ReelDataControl_MouseEnter(object sender, EventArgs e)
{
SelectStyle();
}
private void ReelDataControl_MouseLeave(object sender, EventArgs e)
{
UnSelectStyle();
}
private void lblText_MouseEnter(object sender, EventArgs e)
{
SelectStyle();
}
private void lblText_MouseLeave(object sender, EventArgs e)
{
UnSelectStyle();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
库位号格式:  库位号格式:
例:05AA03040102 例:05AA03040102
05:表示料仓编号,01-08
AA:存储机构A面或B面,AA或者BB
03:表示抽屉在第几行
04:表示抽屉在第几列
01:表示在抽屉中的第几行
02:表示在抽屉中的第几列
\ No newline at end of file \ No newline at end of file
05:第1和第2位表示料仓编号,01 - 08
AA:第3和第4位存储机构A面或B面,AA或者BB
03:第5和第6位表示抽屉在第几行
04:第7和第8位表示抽屉在第几列
01:第9和第10位表示在抽屉中的第几行
02:第11和第12位表示在抽屉中的第几列
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!