Commit 48ff972a LN

入库调试

1 个父辈 19012230
......@@ -40,7 +40,7 @@
<!--AGV调度服务器地址-->
<add key="AgvServerIp" value="192.168.103.22" />
<!--IO配置-->
<add key ="DIMS" value ="120"/>
<add key ="DIMS" value ="60"/>
<add key ="DOMS" value ="300"/>
<add key ="LineRunTest" value ="1"/>
<!--ABB机器人服务器-->
......@@ -49,7 +49,7 @@
<add key ="OpenRFIDWrite" value ="1"/>
<add key="DefaultPWD" value ="123456"/>
<!--当前调试的设备ID,分号分割-->
<add key ="DebugDeviceId" value ="104"/>
<add key ="DebugDeviceId" value ="103"/>
<add key ="NeedScanCode" value ="1"/>
</appSettings>
<log4net>
......
......@@ -40,7 +40,7 @@
//
// timer1
//
this.timer1.Interval = 3000;
this.timer1.Interval = 10000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// lblConInfo
......
......@@ -40,8 +40,8 @@ namespace OnlineStore.AssemblyLine
lblRFID.Text = "RFID信息:\r\n";
msg = "";
List<string> rfidList = new List<string>(DeviceConfig.ProRFIpMap.Values);
foreach (string ip in tList)
List<string> rfidList = new List<string>(LineManager.Line. rfidList);
foreach (string ip in rfidList)
{
string con = TrayManager.ReadRFID(ip) .ToStr() ;
msg += ("RFID[" + ip + "]:").PadLeft(26, ' ') + con + "\n";
......
......@@ -255,7 +255,7 @@ namespace OnlineStore.AssemblyLine
lineBean.StopRun();
}
IOManager.instance.CloseAllDO();
// IOManager.instance.CloseAllDO();
IOManager.instance.CloseAllConnection();
//AIManager.CloseConnect();
ACServerManager.CloseAllPort();
......@@ -730,5 +730,17 @@ namespace OnlineStore.AssemblyLine
}
LogUtil.info("-------------------结束打印托盘信息");
}
private void btnClearTray_Click(object sender, EventArgs e)
{
List<TrayInfo> tray = TrayManager.getTrayList();
LogUtil.info("-------------------点击:清空托盘。清空前打印托盘信息:");
foreach (TrayInfo t in tray)
{
LogUtil.info(t.ToStr());
}
TrayManager.ClearTrayInfo();
LogUtil.info("-------------------点击:清空托盘。托盘内容已清空");
}
}
}
......@@ -55,10 +55,10 @@ PRO,0,出料移栽1-托盘-RFID-IP,PRO_RFIP_201,192.168.210.119,,,,,
PRO,0,出料移栽2-托盘-RFID-IP,PRO_RFIP_202,192.168.210.122,,,,,
PRO,0,出料移栽3-托盘-RFID-IP,PRO_RFIP_203,192.168.210.127,,,,,
PRO,0,出料移栽4-托盘-RFID-IP,PRO_RFIP_204,192.168.210.130,,,,,
PRO,0,入料流水线1-托盘-RFID-IP,PRO_RFIP_101,192.168.210.101,,,,,
,0,入料流水线1-托盘-RFID-IP,PRO_RFIP_101,192.168.210.101,,,,,
PRO,0,入料流水线2-托盘-RFID-IP,PRO_RFIP_102,192.168.210.110,,,,,
PRO,0,入料流水线3-托盘-RFID-IP,PRO_RFIP_103,192.168.210.116,,,,,
PRO,0,入料流水线4-托盘-RFID-IP,PRO_RFIP_104,192.168.210.117,,,,,
,0,入料流水线4-托盘-RFID-IP,PRO_RFIP_104,192.168.210.117,,,,,
PRO,0,入料流水线1-上料模块-RFID-IP,PRO_RFIP_101-1,192.168.210.102,,,,,
PRO,0,入料流水线2-上料模块-RFID-IP,PRO_RFIP_102-1,192.168.210.109,,,,,
PRO,0,入料流水线3-上料模块-RFID-IP,PRO_RFIP_103-1,192.168.210.115,,,,,
......
......@@ -29,7 +29,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 当前正在通过的托盘号
/// </summary>
protected int currTrayNum = 0;
internal int currTrayNum = 0;
/// <summary>
/// 升降轴
/// </summary>
......
......@@ -348,7 +348,7 @@ namespace OnlineStore.DeviceLibrary
StartOutStoreP();
}
}
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None) && alarmType.Equals(LineAlarmType.None))
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None) &&( isInSuddenDown.Equals(false)&&isNoAirCheck.Equals(false)))
{
StartCheckFixture();
}
......@@ -481,21 +481,21 @@ namespace OnlineStore.DeviceLibrary
IsInProcess = true;
if (IOValue(TargetIoType).Equals(TargetIoValue))
{
if (!isOk)
{
isOk = true;
lastOkTime = DateTime.Now;
}
else
{
TimeSpan span = DateTime.Now - lastOkTime;
if (span.TotalMilliseconds > 200)
//if (!isOk)
//{
// isOk = true;
// lastOkTime = DateTime.Now;
//}
//else
//{
//TimeSpan span = DateTime.Now - lastOkTime;
//if (span.TotalMilliseconds > 100)
{
LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",可以停止运动");
BatchAxis.SuddenStop();
BatchAxisStopCheck();
}
}
//}
}
else
......
......@@ -47,15 +47,17 @@ namespace OnlineStore.DeviceLibrary
{
return;
}
if (Config.SidesWayNum > 0)
{
int num = TrayManager.GetTrayNum(DeviceID);
bool isTestNeed = (LineManager.Line.runStatus <= LineRunStatus.Wait);
bool isNeedTray = (num > 0) && (LineManager.Line.SwNoProcess(Config.SidesWayNum));
bool isNeedTray = (LineManager.Line.SwNoProcess(Config.SidesWayNum));
if (IOValue(IO_Type.SW_TrayCheck).Equals(IO_VALUE.HIGH) && (isTestNeed || isNeedTray))
{
int num = TrayManager.GetTrayNum(DeviceID);
//判断是否是需要的托盘
if (CurrTrayIsNeed(true))
if (CurrTrayIsNeed(num, true))
{
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
TrayManager.UpdateSWState(Config.SidesWayNum, 2);
......@@ -64,38 +66,41 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
}
else
{
preTrayNum = num;
{
preTrayNum = currTrayNum;
currTrayNum = num;
TrayManager.UpdateSWState(Config.SidesWayNum, 1);
}
}
else if (Config.SidesWayNum.Equals(2) && IOValue(IO_Type.SW_StopCheck).Equals(IO_VALUE.HIGH) && (isTestNeed || isNeedTray))
{
//判断是否是需要的托盘
if (CurrTrayIsNeed(true))
{
////判断是否是需要的托盘
//if (CurrTrayIsNeed(num, true))
//{
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
TrayManager.UpdateSWState(Config.SidesWayNum, 2);
CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,最多等待1秒");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_01_StopCylinder1Down);
IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_StopDown, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
}
else
{
preTrayNum = num;
TrayManager.UpdateSWState(Config.SidesWayNum, 1);
}
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//}
//else
//{
// preTrayNum = currTrayNum;
// currTrayNum = num;
// TrayManager.UpdateSWState(Config.SidesWayNum, 1);
//}
}
}
else
{
if (IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.FL_StopCheck).Equals(IO_VALUE.HIGH))
{
int num = TrayManager.GetTrayNum(DeviceID);
// int num = TrayManager.GetTrayNum(DeviceID);
//托盘在两个阻挡内
if (num > 0 && IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH))
if ( IOValue(IO_Type.FL_TrayCheck).Equals(IO_VALUE.HIGH))
{
SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
CheckLog("检测到FL_TrayCheck:" + SecondMoveInfo.SLog + " FL阻挡1上升)");
......@@ -111,7 +116,7 @@ namespace OnlineStore.DeviceLibrary
CheckLog(" 检测到FL_StopCheck:" + SecondMoveInfo.SLog + " FL阻挡1下降 ,最多等待1秒)");
IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1500));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
}
}
......@@ -170,7 +175,7 @@ namespace OnlineStore.DeviceLibrary
currTrayNum = TrayManager.GetTrayNum(DeviceID);
//出料中,需要拦盘
if (CurrTrayIsNeed(true))
if (CurrTrayIsNeed(currTrayNum, true))
{
SecondMoveInfo.MoveParam = CheckParam;
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopCylinderUp);
......@@ -397,7 +402,9 @@ namespace OnlineStore.DeviceLibrary
{
//定位工位有料架,等待1秒后再次检测
MoveInfo.NextMoveStep(LineMoveStep.FI_04_WaitTime);
InLog("定位工位检测到料架: " + MoveInfo.SLog + " 等待1秒再次检测");
InLog("定位工位检测到料架: " + MoveInfo.SLog + ",进料阻挡上升,缓冲阻挡上升, 等待1秒再次检测");
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
......@@ -609,7 +616,7 @@ namespace OnlineStore.DeviceLibrary
{
InLog("料盘移栽" + MoveInfo.SLog + ":记录高度尺寸 高度【" + LastHeight + "】宽度【" + LastWidth + "】,已经没有料盘,提升轴开始回下降待机点P2");
MoveInfo.ShelfNoTray = true;
BatchAxis.AbsMove(MoveInfo, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
BatchAxis.AbsMove(null, Config.BatchAxisP2, Config.BatchAxis_P2Speed);
}
else
{
......@@ -837,7 +844,7 @@ namespace OnlineStore.DeviceLibrary
StartMovePosition = BatchAxis.GetAclPosition();
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, Config.BatchAxisP3, Config.BatchAxis_P3Speed));
Config.Batch_Axis.TargetPosition = Config.BatchAxisP3;
BatchAxis.AbsMove( MoveInfo, Config.BatchAxisP3, Config.BatchAxis_P3Speed);
BatchAxis.AbsMove( null, Config.BatchAxisP3, Config.BatchAxis_P3Speed);
//开始检测信号
BatchAxisStartCheck();
}
......@@ -895,12 +902,8 @@ namespace OnlineStore.DeviceLibrary
}
#endregion
/// <summary>
/// 是否需要拦截当前托盘进行处理
/// </summary>
/// <returns></returns>
internal bool CurrTrayIsNeed(bool NeedSaveParam )
internal bool CurrTrayIsNeed(int trayNum, bool NeedSaveParam )
{
try
{
......@@ -908,8 +911,10 @@ namespace OnlineStore.DeviceLibrary
{
return false;
}
int trayNum = TrayManager.GetTrayNum(Config.Id);
if (trayNum <= 0)
{
return false;
}
TrayInfo info = TrayManager.GetTrayInfo(trayNum);
InOutParam param = new InOutParam(trayNum, info.WareCode, info.PosId, info.PlateH, info.PlateW);
......@@ -917,7 +922,7 @@ namespace OnlineStore.DeviceLibrary
if (Config.IsCanOut.Equals(1))
{
//此托盘是紧急出料盘,需要通过料架出库
bool debugNeed = IsDebug && runStatus >= LineRunStatus.Runing;
bool debugNeed = IsDebug && runStatus >= LineRunStatus.Runing&&info.IsFull&&info.InOrOutStore.Equals(2);
if (info.PosId.Equals(""))
{
param = new InOutParam(trayNum, "紧急出料测试", "1#AC1_3_2", 12, 7);
......@@ -964,11 +969,16 @@ namespace OnlineStore.DeviceLibrary
}
}
}
if (NeedSaveParam)
{
LogInfo(" 托盘【" + info.ToStr() + "】不需要出入库" );
}
}
catch (Exception ex)
{
LogUtil.error(Name + "CurrTrayIsNeed出错:" + ex.StackTrace);
}
return false;
}
......
......@@ -82,8 +82,10 @@ namespace OnlineStore.DeviceLibrary
{
//定位工位有料架,等待1秒后再次检测
MoveInfo.NextMoveStep(LineMoveStep.FO_04_WaitTime);
OutLog("准备出库料架 " + MoveInfo.SLog + "定位工位检测到料架:进料阻挡上升, 等待1秒再次检测");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);
OutLog("准备出库料架 " + MoveInfo.SLog + "定位工位检测到料架: 等待1秒再次检测");
IOMove(IO_Type.SL_Entry_StopDown, IO_VALUE.LOW);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
private void LineOutStoreProcess()
......@@ -163,7 +165,7 @@ namespace OnlineStore.DeviceLibrary
//定位工位有料架,直接开始入料
MoveInfo.NextMoveStep(LineMoveStep.FO_05_LocationCylinder_Up);
OutLog("定位工位检测到料架: " + MoveInfo.SLog + " 缓冲阻挡下降, 定位气缸上升");
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
IOMove(IO_Type.SL_Buffer_StopDown, IO_VALUE.LOW);//缓冲阻挡下降
CylinderMove(MoveInfo, IO_Type.SL_LocationCylinder_Down, IO_Type.SW4_LocationCylinder_Up);
}
else
......@@ -228,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.CanWhileCount = 0;
MoveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxis(Config.Batch_Axis, tp, Config.BatchAxis_P3Speed));
Config.Batch_Axis.TargetPosition = tp;
BatchAxis.AbsMove(MoveInfo, tp, Config.BatchAxis_P3Speed);
BatchAxis.AbsMove(null, tp, Config.BatchAxis_P3Speed);
//开始检测信号
BatchAxisStartCheck(IO_Type.SL_AxisLocationCheck, IO_VALUE.LOW);
}
......
......@@ -47,6 +47,7 @@ namespace OnlineStore.DeviceLibrary
#region 初始化
public List<string> cioList = new List<string>( );
public List<string> rfidList = new List<string>();
private bool canStart = false;
public LineBean(Line_Config lineConfig, Dictionary<int, MoveEquip_Config> configList, Dictionary<int, FeedingEquip_Config> feedMap,
......@@ -120,8 +121,13 @@ namespace OnlineStore.DeviceLibrary
cioList = new List<string>(ioList);
string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId);
rfidList = new List<string>(DeviceConfig.ProRFIpMap.Values);
if (IsDebug)
{
rfidList = new List<string>() {
"192.168.210.116","192.168.210.120","192.168.210.121"
};
try
{
cioList = new List<string>();
......@@ -177,11 +183,11 @@ namespace OnlineStore.DeviceLibrary
{
IOManager.instance.ConnectionIOList(cioList);
Thread.Sleep(5);
// if (!IsDebug)
if (!IsDebug)
{
Task.Factory.StartNew(delegate
{
string[] rfidArray = new List<string>(DeviceConfig.ProRFIpMap.Values).ToArray();
string[] rfidArray = rfidList.ToArray();
//连接rfip
TrayManager.RfidReader.Open(rfidArray);
});
......@@ -267,6 +273,12 @@ namespace OnlineStore.DeviceLibrary
}
else
{
ledProcessTimer.Enabled = false ;
IoCheckTimer.Enabled = false ;
mainTimer.Enabled = false ;
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.HomeMoving;
StartTime = DateTime.Now;
LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString());
//连接AGV调度
......@@ -274,9 +286,6 @@ namespace OnlineStore.DeviceLibrary
{
AgvClient.Init();
}
lineStatus = LineStatus.ResetMove;
runStatus = LineRunStatus.HomeMoving;
StartTime = DateTime.Now;
LineServer.StartServer(ConfigAppSettings.GetIntValue(Setting_Init.TCPServerPort));
RHomeOp();
......@@ -306,6 +315,7 @@ namespace OnlineStore.DeviceLibrary
}
private void RHomeOp()
{
TrayManager.SidesWayStateMap = new System.Collections.Concurrent.ConcurrentDictionary<int, int>() ;
alarmType = LineAlarmType.None;
mainTimer.Enabled = false;
......@@ -912,6 +922,7 @@ namespace OnlineStore.DeviceLibrary
//所有原点重置完成
runStatus = LineRunStatus.Runing;
lineStatus = LineStatus.StoreOnline;
MoveInfo.EndMove();
LogUtil.info(Name + "所有设备重置完成,打开流水线,开始运转!");
}
}
......@@ -921,13 +932,13 @@ namespace OnlineStore.DeviceLibrary
public string GetMoveStr()
{
string msg = "";
// int tLength = 20;
//msg += "preTrayNum:".PadRight(tLength, ' ') + preTrayNum + "\n";
//msg += "currTrayNum:".PadRight(tLength, ' ') + currTrayNum + "\n";
// int tLength = 20;
msg += "Sw41TrayNum: " + Sw41TrayNum + "\n";
msg += "Sw23TrayNum:" + Sw23TrayNum + "\n";
msg += "runStatus: "+ runStatus + "\n";
msg += "lineStatus: "+ lineStatus + "\n";
msg += "MoveType: " + MoveInfo.MoveType + "\n";
msg += "lineStatus: "+ lineStatus + "\n";
msg += "MoveType: " + MoveInfo.MoveType + "\n";
msg += "MoveStep: " + MoveInfo.SLog + "\n";
msg += "SW41_Move: "+ SW41_MoveInfo.MoveType + " "+ SW41_MoveInfo.MoveStep + "\n";
msg += "SW23_Move: " + SW23_MoveInfo.MoveType + " " + SW23_MoveInfo.MoveStep + "\n";
......
......@@ -473,7 +473,7 @@ namespace OnlineStore.DeviceLibrary
bool isNeed = false;
//此处先对托盘号进行验证
preTrayNum = currTrayNum;
currTrayNum = TrayManager.GetTrayNum(DeviceID);
currTrayNum = TrayManager.GetTrayNum(DeviceID,true);
bool isFull = TrayManager.TrayIsFull(currTrayNum);
if (TrayManager.RightTrayCode(currTrayNum, preTrayNum, false))
{
......
......@@ -31,11 +31,11 @@ namespace OnlineStore.DeviceLibrary
private void StartCheckFixture()
{
int num = TrayManager.GetTrayNum(DeviceID);
//int num = TrayManager.GetTrayNum(DeviceID);
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{
//托盘在两个阻挡内
if (num > 0&& LineManager.Line.SwNoProcess(Config.SidesWayNum))
if ( LineManager.Line.SwNoProcess(Config.SidesWayNum))
{
TrayManager.UpdateSWState(Config.SidesWayNum, 2);
SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
......@@ -104,7 +104,7 @@ namespace OnlineStore.DeviceLibrary
{
//此处先对托盘号进行验证
preTrayNum = currTrayNum;
currTrayNum = TrayManager.GetTrayNum(DeviceID);
currTrayNum = TrayManager.GetTrayNum(DeviceID,true);
if (TrayManager.RightTrayCode(currTrayNum, preTrayNum, false))
{
if (TrayManager.ErrorDeviceId.Equals(DeviceID))
......
......@@ -173,25 +173,44 @@ namespace OnlineStore.DeviceLibrary
TrayErrorMsg = errorMsg;
ErrorDeviceId = errorStoreID;
}
public static void ClearTrayInfo()
{
TrayInfoMap = new ConcurrentDictionary<int, TrayInfo>();
}
/// <summary>
/// 获取托盘编码
/// </summary>
public static int GetTrayNum(int subType)
public static int GetTrayNum(int subType, bool isClear = false)
{
return 9;
if (subType.Equals(104))
{
return LineManager.Line.Sw23TrayNum;
}
else if (subType.Equals(101))
{
return LineManager.Line.Sw41TrayNum;
}
string ip = GetRFIP(subType);
//获取盘号
RFIDData data = ReadRFID(ip);
if (data != null)
{
if (data.RFType.Equals("E"))
if (data.RFType.Equals((byte)'E'))
{
return data.Num;
}
else
{
LogUtil.error("读取托盘RFID[" + subType + "][" + ip + "]的数据出错:" + data.ToStr());
}
return 0;
//else
//{
// LogUtil.error("读取托盘RFID[" + subType + "][" + ip + "]的数据出错:" + data.ToStr());
//}
}
if (isClear)
{
RfidReader.Clear(ip);
}
return 0;
}
......@@ -206,21 +225,24 @@ namespace OnlineStore.DeviceLibrary
{
try
{
//获取盘号
byte[] data = RfidReader.Read(ip);
if (data != null && data.Length >= 2)
if (String.IsNullOrEmpty(ip).Equals(false)&&LineManager.Line.rfidList.Contains(ip))
{
RFIDData d = new RFIDData(data);
return d;
//获取盘号
byte[] data = RfidReader.Read(ip);
if (data != null && data.Length >= 2)
{
RFIDData d = new RFIDData(data);
return d;
}
}
}catch(Exception ex)
{
//LogUtil.error("ReadRFID["+ip+"]出错:" + ex.ToString());
}
return new RFIDData(-1,'X');
return new RFIDData(-1,-1);
}
public static string GetRFIP(int subType, int rtType = 0)
private static string GetRFIP(int subType, int rtType = 0)
{
string ip = "";
string rtName = DeviceConfig.RFIP_Str + "_" + subType.ToString().PadLeft(3, '0');
......@@ -238,25 +260,30 @@ namespace OnlineStore.DeviceLibrary
#region 横移状态缓存
internal static ConcurrentDictionary<int, int> SidesWayStateMap = new ConcurrentDictionary<int, int>();
internal static bool CanMoveSidesWay(int swNum)
internal static int GetSwStatus(int swNum)
{
int status = 0;
if (SidesWayStateMap.ContainsKey(swNum))
{
status = SidesWayStateMap[swNum];
if (SidesWayStateMap[swNum].Equals(1))
return SidesWayStateMap[swNum];
}
return 0;
}
internal static bool CanMoveSidesWay(int swNum)
{
int status = GetSwStatus(swNum);
if (status.Equals(1))
{
return true;
}
else if (swNum.Equals(1) || swNum.Equals(3))
{
if (SidesWayStateMap[swNum].Equals(0))
if (status.Equals(0))
{
return true;
}
}
}
//若此横移对应的设备未启动,直接可处理
foreach (FeedingEquip equip in LineManager.Line.FeedingEquipMap.Values)
{
......@@ -307,6 +334,8 @@ namespace OnlineStore.DeviceLibrary
SidesWayStateMap.TryAdd(swNum, value);
}
}
#endregion
}
......@@ -314,15 +343,15 @@ namespace OnlineStore.DeviceLibrary
public class RFIDData
{
/// <summary>
/// RFID类型,区分是料架还是托盘,托盘=E
/// RFID类型,区分是料架还是托盘,托盘E=69,A=65
/// </summary>
public char RFType = 'E';
public int RFType=0;
/// <summary>
/// 托盘编号,从1-32
/// </summary>
public int Num = 0;
public RFIDData(int num, char t = 'E')
public RFIDData(int num, int t )
{
this.RFType = t;
this.Num = num;
......@@ -332,8 +361,8 @@ namespace OnlineStore.DeviceLibrary
{
try
{
RFType = (char)data[0];
Num = Convert.ToInt32(data[1]);
RFType = data[1];
Num = Convert.ToInt32(data[2]);
}
catch (Exception ex)
{
......
......@@ -140,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
aioBox.SetOutput(Asa.IOModule.Box_Type.DO, DOLength);
//DI主动上传
aioBox.AutoReadInput(true,DIMS);
aioBox.AutoReadOutput(true, DOMS);
aioBox.AutoReadOutput(false, DOMS);
aioBox.DI_Changed_Event += AioBox_DI_Changed_Event; ;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!