Commit 8b174bb9 LN

界面 调整

1 个父辈 2c839675
......@@ -103,5 +103,7 @@ namespace OnlineStore.Common
public static string CodeCount = "CodeCount";
public static string AutoShelfInstore = "AutoShelfInstore";
public static string UseDoor = "UseDoor";
public static string InoutDefaultPosition = "InoutDefaultPosition";
}
}
......@@ -60,6 +60,8 @@
<add key="UseDoor" value="1" />
<add key="Agv_Log_Open" value="1" />
<add key="AutoShelfInstore" value="1" />
<!--进出轴位置-->
<add key ="InoutDefaultPosition" value ="3000"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
......@@ -23,7 +23,7 @@ using UserFromControl;
namespace OnlineStore.DUOStore
{
public partial class FrmAxisMove : FrmBase
{
{
public FrmAxisMove()
{
Control.CheckForIllegalCrossThreadCalls = false;
......@@ -34,32 +34,149 @@ namespace OnlineStore.DUOStore
private bool LoadOk = false;
private void FrmTest_Load(object sender, EventArgs e)
{
}
{
axisMoveControl1.LoadData(null, new AxisBean[] { StoreManager.Store.T1_BatchAxis, StoreManager.Store.T2_MiddleAxis, StoreManager.Store.T3_UpdownAxis });
LoadPostion();
}
private void LoadPostion()
{
txtBatchP1.Text = StoreManager.Store.Config.BatchAxis_P1.ToString();
txtBatchP2.Text = StoreManager.Store.Config.BatchAxis_P2.ToString();
txtMiddleP1.Text = StoreManager.Store.Config.MiddleAxis_P1.ToString();
txtMiddleP3.Text = StoreManager.Store.Config.MiddleAxis_P3.ToString();
txtMiddleP2.Text = StoreManager.Store.Config.MiddleAxis_P2.ToString();
txtUpdownP1.Text = StoreManager.Store.Config.UpdownAxis_P1.ToString();
txtUpdownP2.Text = StoreManager.Store.Config.UpdownAxis_P2.ToString();
txtUpdownP3.Text = StoreManager.Store.Config.UpdownAxis_P3.ToString();
txtUpdownP4.Text = StoreManager.Store.Config.UpdownAxis_P4.ToString();
txtUpdownP5.Text = StoreManager.Store.Config.UpdownAxis_P5.ToString();
txtUpdownP6.Text = StoreManager.Store.Config.UpdownAxis_P6.ToString();
}
internal void DebugStatus(bool isDebug)
{
axisMoveControl1.Enabled = isDebug;
groupInout.Enabled = isDebug;
}
#endregion
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
{
return;
}
}
private void LoadPostion()
{
private void AxisABSMove(AxisBean moveAxis, TextBox txtValue, int targetSpeed)
{
int targetPosition = FormUtil.GetIntValue(txtValue);
moveAxis.Config.TargetPosition = targetPosition;
moveAxis.AbsMove(null, targetPosition, targetSpeed);
}
private void btnBatchP1_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T1_BatchAxis, txtBatchP1, StoreManager.Store.Config.BatchAxis_P1Speed);
}
private void btnBatchP2_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T1_BatchAxis, txtBatchP2, StoreManager.Store.Config.BatchAxis_P2Speed);
}
private void btnMiddleP1_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T2_MiddleAxis, txtMiddleP1, StoreManager.Store.Config.MiddleAxis_P1Speed);
}
private void btnMiddleP2_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T2_MiddleAxis, txtMiddleP2, StoreManager.Store.Config.MiddleAxis_P2Speed);
}
private void btnMiddleP3_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T2_MiddleAxis, txtMiddleP3, StoreManager.Store.Config.MiddleAxis_P3Speed);
}
private void btnUpdownP1_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP1, StoreManager.Store.Config.UpdownAxis_P1Speed);
}
private void btnUpdownP2_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP2, StoreManager.Store.Config.UpdownAxis_P2Speed);
}
private void btnUpdownP3_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP3, StoreManager.Store.Config.UpdownAxis_P3Speed);
}
private void btnUpdownP4_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP4, StoreManager.Store.Config.UpdownAxis_P4Speed);
}
private void btnUpdownP5_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP5, StoreManager.Store.Config.UpdownAxis_P5Speed);
}
private void btnUpdownP6_Click(object sender, EventArgs e)
{
AxisABSMove(StoreManager.Store.T3_UpdownAxis, txtUpdownP6, StoreManager.Store.Config.UpdownAxis_P6Speed);
}
private void btnSavePosition_Click(object sender, EventArgs e)
private void btnSaveP_Click(object sender, EventArgs e)
{
Store_Config config = StoreManager.Config;
config.BatchAxis_P1 = FormUtil.GetIntValue(txtBatchP1);
config.BatchAxis_P2 = FormUtil.GetIntValue(txtBatchP2);
config.MiddleAxis_P1 = FormUtil.GetIntValue(txtMiddleP1);
config.MiddleAxis_P2 = FormUtil.GetIntValue(txtMiddleP2);
config.MiddleAxis_P3 = FormUtil.GetIntValue(txtMiddleP3);
config.UpdownAxis_P1 = FormUtil.GetIntValue(txtUpdownP1);
config.UpdownAxis_P2 = FormUtil.GetIntValue(txtUpdownP2);
config.UpdownAxis_P3 = FormUtil.GetIntValue(txtUpdownP3);
config.UpdownAxis_P4 = FormUtil.GetIntValue(txtUpdownP4);
config.UpdownAxis_P5 = FormUtil.GetIntValue(txtUpdownP5);
config.UpdownAxis_P6 = FormUtil.GetIntValue(txtUpdownP6);
bool result = StoreManager.UpdateStoreConfig(config);
if (result)
{
MessageBox.Show("保存成功");
}
else
{
MessageBox.Show("保存失败");
}
}
private void btnAxisOn_Click(object sender, EventArgs e)
{
btnAxisOn.Enabled = false;
LogUtil.info( " 点击: " + btnAxisOn.Text);
StoreManager.Store.OpenAllAxis();
btnAxisOn.Enabled = true;
}
private void btnAxisOff_Click(object sender, EventArgs e)
{
btnAxisOff.Enabled = false;
LogUtil.info(" 点击: " + btnAxisOff.Text);
StoreManager.Store.CloseAllAxis();
btnAxisOff.Enabled = true;
}
}
}
......@@ -50,7 +50,7 @@ namespace OnlineStore.DUOStore
}
// this.groupBox3.Text = "设备[" + BoxBean.CID + "]状态";
this.Text = BoxBean.Name;
axisMoveControl1.LoadData(new AxisBean[] { });
axisMoveControl1.LoadData(BoxBean, new AxisBean[] {BoxBean.MiddleAxis,BoxBean.UpdownAxis,BoxBean.InoutAxis,BoxBean.ComAxis });
ACBoxPosition acPosition = null;
if (BoxBean.PositionNumList.Count > 0)
{
......@@ -119,11 +119,11 @@ namespace OnlineStore.DUOStore
lblWarnMsg.Text = BoxBean.GetWarnMsg();
lblMoveInfo.Text = BoxBean.GetMoveStr();
if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.InStore))
if (BoxBean.MoveInfo.MoveType.Equals(MoveType.InStore))
{
lblMoveEquipInfo.Text = "入库:" + BoxBean.MoveInfo.MoveParam.ToStr();
}
else if (BoxBean.MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
else if (BoxBean.MoveInfo.MoveType.Equals(MoveType.OutStore))
{
lblMoveEquipInfo.Text = "出库:" + BoxBean.MoveInfo.MoveParam.ToStr();
}
......@@ -146,7 +146,7 @@ namespace OnlineStore.DUOStore
if (btnSotreReset.Enabled == false)
{
if ((BoxBean.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || BoxBean.storeRunStatus.Equals(StoreRunStatus.Reset))
&& BoxBean.alarmType.Equals(StoreAlarmType.None))
&& BoxBean.alarmType.Equals(AlarmType.None))
{
}
else
......@@ -160,7 +160,7 @@ namespace OnlineStore.DUOStore
else
{
if ((BoxBean.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || BoxBean.storeRunStatus.Equals(StoreRunStatus.Reset))
&& BoxBean.alarmType.Equals(StoreAlarmType.None))
&& BoxBean.alarmType.Equals(AlarmType.None))
{
if (btnStoreStart.Enabled)
{
......@@ -625,16 +625,16 @@ namespace OnlineStore.DUOStore
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Enabled = false;
BoxBean.RunAxis(false);
this.Enabled = true;
LogUtil.info("料仓运转ON完成");
btnAxisOn.Enabled = false;
LogUtil.info(BoxBean.Name + "点击:" + btnAxisOn.Text);
BoxBean.OpenAllAxis(false);
btnAxisOn.Enabled = true;
}
private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e)
{
BoxBean.CloseAllAxis();
LogUtil.info("料仓运转OFF完成");
LogUtil.info(BoxBean.Name + "点击:" + btnAxisOff.Text);
BoxBean.CloseAllAxis();
}
......
......@@ -100,7 +100,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(524, 3);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(323, 565);
this.groupBox1.Size = new System.Drawing.Size(323, 544);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......
......@@ -451,9 +451,13 @@ namespace OnlineStore.DUOStore
{
FrmBox frm = (FrmBox)con;
frm.DebugStatus(isopen);
find = true;
} else if(con is FrmAxisMove)
{
FrmAxisMove frm = (FrmAxisMove)con;
frm.DebugStatus(isopen);
find = true;
break;
}
}
}
}
if (find)
......
......@@ -18,7 +18,7 @@ namespace OnlineStore.DUOStore
public partial class AxisMoveControl : UserControl
{
private List<AxisBean> axisList = new List<AxisBean>();
// private EquipBase equipBase = null;
private BoxBean boxBean = null;
private string PortName = "";
private int SlvAddr = 0;
......@@ -26,8 +26,9 @@ namespace OnlineStore.DUOStore
{
InitializeComponent();
}
public void LoadData(params AxisBean[] moveAxis)
public void LoadData(BoxBean box, params AxisBean[] moveAxis)
{
this.boxBean = box;
axisList = new List<AxisBean>(moveAxis);
if (axisList.Count > 0)
......@@ -52,23 +53,26 @@ namespace OnlineStore.DUOStore
private bool CanMove()
{
////如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
//if (RobotManager.robot.inputEquip.UpdownAxis.Config.IsSameAxis(PortName, SlvAddr)
// || (RobotManager.robot.inputEquip.MiddleAxis.Config.IsSameAxis(PortName, SlvAddr)))
//{
// int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InoutDefaultPosition);
// int currValue = RobotManager.robot.inputEquip.InOutAxis.GetAclPosition();
// if (currValue <= InOutDefaultPosition)
// {
// return true;
// }
// MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Error);
// return false;
//}
//else
//{
// return true;
//}
//如果是取料升降轴,取料旋转轴,如果进出轴不在待机点,不能运动
if (boxBean != null)
{
if (boxBean.Config.UpDown_Axis.IsSameAxis(PortName, SlvAddr)
|| (boxBean.Config.Middle_Axis.IsSameAxis(PortName, SlvAddr)))
{
int InOutDefaultPosition = ConfigAppSettings.GetIntValue(Setting_Init.InoutDefaultPosition);
int currValue = boxBean.InoutAxis.GetAclPosition();
if (currValue <= InOutDefaultPosition)
{
return true;
}
MessageBox.Show("叉子不在待机位,请先将叉子退回待机位(" + InOutDefaultPosition + ")", "警告(叉子在待机位时,才能移动升降轴和旋转轴) ", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
else
{
return true;
}
}
return true;
}
private void btnOpenAxis_Click(object sender, EventArgs e)
......
 // 机器状态 顶灯显示
// 绿 黄 红
//机器复位中 闪 灭 灭
//机器待机中 亮 灭 灭
//机器出入库中 闪 闪 灭
//温湿度超限报警中 亮 闪 灭
//温湿度超限报警中超过30分钟 亮 闪 闪
//机器未启动 灭 灭 灭
//机器设备故障(非温湿度)报警 亮 灭 闪
新建分支RC1250-ACPackingStore,作为佳世达流水线单台包装料料仓软件
同一个客户端有两个box软件。
位置重定义:
旋转轴(轴1)P1 :待机原位点/NG料口位置
新增料架位置配置:
旋转轴位置P101:料架库位旋转轴位置
升降轴低点P101:料架库位升降轴低点
升降轴高点P102:料架库位升降轴高点
进出轴位置P101:料架库位进出轴位置
20191220点位配置修改:
NG门口位置 升降轴(轴2)P11-NG放料低点 UpDownAxis_P11
升降轴(轴2)P12-NG放料高点缓冲点 UpDownAxis_P12
旋转轴(轴1)P11-NG放料点 MiddleAxis_P11
进出轴(轴3)P11-NG放料点 InOutAxis_P11_Position
待机点/扫码点 升降轴(轴2)P1待机点/扫码放料低点 UpDownAxis_P1
升降轴(轴2)P2扫码放料高点缓冲点 UpDownAxis_P2
旋转轴(轴1)P1待机点/扫码放料点 MiddleAxis_P1
进出轴(轴3)P1待机点 InOutAxis_P1_Position
进出轴(轴3)P2-扫码放料点 InOutAxis_P2_Position
压紧轴(轴4)P1待机点 CompAxis_P1_Position
压紧轴(轴4)P3压紧前点 CompAxis_P3_Position
压紧轴(轴4)P4目标压紧点 CompAxis_P4_Position
压紧轴(轴4)压紧确认信号收到之后下降的位置 CompAxis_Down_Position
压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#) CompAxis_P2_List
料架位置 旋转轴位置P101
升降轴低点P101
升降轴高点P102
进出轴位置P101
20191220移门操作修改:移门到位后需要马上关闭DO.
扫码入库逻辑修改,先去扫码库位点,放下料盘后扫码,扫码后再把料盘拿走。
20200113需要修改:
出库时如果当前料架不是指定的料架,需要把料架送出,然后通知agv准备指定料架
20200220
agvclien增加cancelState的参数设置
BI_03_LineRun超时报警改为40秒
20200221
agv客户端启动时需要设置状态为none。
区分是入库结束出空料架还是出库完成的有料料架,当入库完成出空料架时,mark="0"。
增加AgvClient_EnterShelf事件处理。
20200222
修改:出库时没有给agv发mark
20200223
增加料架的目标位置。
//包装料会发往分盘区, 紧急料区, 包装线区
// urgentReel 这个为true是紧急料 出到紧急料区
// cutReel 为true是分盘料,AGV会拉到到分盘区
//料串会发到分盘区和紧急料区
//两个都为false 包装料默认拉到包装线体, 料串默认拉到紧急料区
20200224
增加agv的cancelState的修改功能。
20200225
出库送料架逻辑修改,出库增加参数:taskCount
20200228
出料料架修改,增加 realRfid ,表示真实的料架号
20200303
httpPost方法增加验证,若ping不同则不再发送。
20200307
shelfLoc问题修改。
20200308
扫码问题优化。
出库未结束时,去掉:检测到料架自动入库功能。
20200310
出库mark参数修改
20200311
扫码修改
20200409修改
压紧轴压紧前点P3-压紧轴压紧点P2的差值,7寸盘和其他的分开配置。
BoxConfig_1.csv 和 BoxConfig_2.csv 需要增加一行配置:
PRO,压紧轴(轴4)七寸盘压紧前点相对压紧点的位置,CompAxis7_P3_P2_Value,-50000,,,,,,,
20200410
修改问题:
料架号不一致,送出料架时料架信息使用上次的。
出库时发现料架对不上,送出料架时发的mark应该用原来的
agv到达时,根据rfid判断是否有料架
20200411
出库时未读到料架号,直接送出料架
紧急料分盘料料架送出逻辑修改。
分盘料/紧急料放上料串或料架时调用
/rest/api/qisda/device/afterPutCut
参数:
cid: 料仓cid,流水线可传入空
barcode : 条码
rfid : RFID
rfidLoc: 料架位置,流水线可传-1
> 返回:
>>` {"code": 0, "msg":"ok", "data":{"cutPackageTask":"0","urgentPackageTask":"20","cutTask":"21","urgentTask":"22"}} `
>>
>> - code: 0为正常,其他为异常,
>> - msg:消息,
>> - data:为包装料仓的空闲仓位数(key为与客户端一致的料仓标识,value为空闲仓位)
>> - cutPackageTask: 表示当前包装仓的分盘任务数
>> - urgentPackageTask: 表示当前包装仓的紧急料任务数
>> - cutTask: 表示流水线分盘任务数
>> - urgentTask: 表示流水线紧急料任务数
20200429
调试模式时不发needEnter
SecMoveInfo
多料仓软件。
......
......@@ -78,6 +78,7 @@
<Compile Include="duoStore\BoxBean.cs" />
<Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\HoisterCylinder.cs" />
<Compile Include="duoStore\HumitureBean.cs" />
<Compile Include="duoStore\DUOStoreBean.cs" />
......
......@@ -249,7 +249,7 @@ namespace OnlineStore.DeviceLibrary
string mark = GetMarkInfo();
string moveName = "送出空料架[" + CurrShelfID + "]";
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
if (MoveInfo.MoveType.Equals(MoveType.OutStore))
{
moveName = "送出[" + CurrShelfID + "][" + mark + "]";
}
......@@ -478,7 +478,7 @@ namespace OnlineStore.DeviceLibrary
}
lineOperation.boxStatus.Add(1, boxStatus);
if (!alarmType.Equals(StoreAlarmType.None))
if (!alarmType.Equals(AlarmType.None))
{
lineOperation.alarmList.Add(alarmInfo);
}
......@@ -579,7 +579,7 @@ namespace OnlineStore.DeviceLibrary
try
{
//判断是否接收过此库位的出库信息
if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore) && MoveInfo.MoveParam.PosID.Equals(posId))
if (MoveInfo.MoveType.Equals(MoveType.OutStore) && MoveInfo.MoveParam.PosID.Equals(posId))
{
LogUtil.error(Name + " 出库命令【" + inoutParam.ToStr() + "】重复,正在【" + posId + "】出库中");
continue;
......
......@@ -13,15 +13,9 @@ using System.Threading.Tasks;
using System.Timers;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 流水线自动料仓-流水线类
/// </summary>
{
public partial class DUOStoreBean : KTK_Store
{
/// <summary>
/// 灯闪烁定时器
/// </summary>
{
private System.Timers.Timer ledProcessTimer = null;
public Dictionary<int, BOX_Config> BoxConfigMap { get; set; }
......@@ -56,6 +50,7 @@ namespace OnlineStore.DeviceLibrary
Name = (" DUO料仓_" + Config.CID + " ").ToUpper();
List<string> ioList = new List<string>();
AddDeviceName(ioList, Config.IOIPList);
foreach (BOX_Config config in configList.Values)
{
BoxBean equip = new BoxBean(config);
......@@ -145,7 +140,7 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false;
isInSuddenDown = false;
isNoAirCheck = false;
alarmType = StoreAlarmType.None;
alarmType = AlarmType.None;
WarnMsg = "";
foreach (BoxBean box in this.BoxMap.Values)
......@@ -172,12 +167,12 @@ namespace OnlineStore.DeviceLibrary
mainTimer.Enabled = false;
isInSuddenDown = false;
isNoAirCheck = false;
alarmType = StoreAlarmType.None;
alarmType = AlarmType.None;
WarnMsg = "";
foreach (BoxBean equip in BoxMap.Values)
{
if (!equip.alarmType.Equals(StoreAlarmType.None))
if (!equip.alarmType.Equals(AlarmType.None))
{
LogUtil.info(Name + "收到复位信号," + equip.Name + " 需要复位");
equip.Reset();
......@@ -219,11 +214,11 @@ namespace OnlineStore.DeviceLibrary
foreach (BoxBean box in BoxMap.Values)
{
if (!box.alarmType.Equals(StoreAlarmType.None))
if (!box.alarmType.Equals(AlarmType.None))
{
isNeedAlarmLed = true;
}
if (box.MoveInfo.MoveType.Equals(StoreMoveType.InStore) || box.MoveInfo.MoveType.Equals(StoreMoveType.OutStore))
if (box.MoveInfo.MoveType.Equals(MoveType.InStore) || box.MoveInfo.MoveType.Equals(MoveType.OutStore))
{
isInOut = true;
}
......@@ -253,7 +248,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
}
}
if (alarmType.Equals(StoreAlarmType.None).Equals(false) || isNoAirCheck || isInSuddenDown )
if (alarmType.Equals(AlarmType.None).Equals(false) || isNoAirCheck || isInSuddenDown )
{
isNeedAlarmLed = true;
}
......@@ -304,9 +299,7 @@ namespace OnlineStore.DeviceLibrary
return IOValue(ioType).Equals(ioValue);
}
#endregion
/// <summary>
/// 定时处理,监听信号,监听IO
/// </summary>
protected override void timersTimer_Elapsed(object sender, ElapsedEventArgs e)
{
BusyMoveProcess();
......@@ -333,7 +326,7 @@ namespace OnlineStore.DeviceLibrary
if ((box.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || box.storeRunStatus.Equals(StoreRunStatus.Reset)) )
//if ((box.storeRunStatus.Equals(StoreRunStatus.HomeMoving) || box.storeRunStatus.Equals(StoreRunStatus.Reset)) && box.IsDebug.Equals(false))
{
if (box.alarmType.Equals(StoreAlarmType.None))
if (box.alarmType.Equals(AlarmType.None))
{
isOk = false;
break;
......@@ -353,38 +346,8 @@ namespace OnlineStore.DeviceLibrary
}
}
private void SetWarnMsg(string msg)
{
if (String.IsNullOrEmpty(WarnMsg).Equals(false))
{
if (WarnMsg.Equals(msg))
{
if (msg.StartsWith(Name))
{
LogUtil.error(msg, 105);
}
else
{
LogUtil.error(Name + msg, 105);
}
}
else
{
if (msg.StartsWith(Name))
{
LogUtil.error(msg);
}
else
{
LogUtil.error(Name + msg);
}
}
}
WarnMsg = msg;
}
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
public override void Alarm(AlarmType alarmType, string alarmDetial = "", string alarmMsg = "", MoveType storeMoveType = MoveType.None)
{
}
......@@ -411,27 +374,26 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
#region 出库
public override bool StartOutStoreMove(InOutParam param)
public bool OpenAllAxis(bool isCheck = true)
{
return true;
}
protected override void OutStoreProcess()
{
if (RunMultiAxis(isCheck, IO_Type.MoveAxis_Run, IO_Type.MoveAxis_Break, new AxisBean []{ T3_UpdownAxis,T2_MiddleAxis}))
{
if (RunAxis(isCheck, T1_BatchAxis) )
{
return true;
}
}
return false;
}
#endregion
#region 入库
public override void StartInStoreMove(InOutParam param)
public void CloseAllAxis()
{
}
protected override void InStoreProcess()
{
}
IOMove(IO_Type.MoveAxis_Break, IO_VALUE.LOW);
IOMove(IO_Type.BatchAxis_Break, IO_VALUE.LOW);
#endregion
CloseMultiAxis(IO_Type.MoveAxis_Run, IO_Type.MoveAxis_Break, new AxisBean[] { T3_UpdownAxis, T2_MiddleAxis });
CloseAxis(T1_BatchAxis);
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
partial class DUOStoreBean
{
#region 出库
public override bool StartOutStoreMove(InOutParam param)
{
return true;
}
protected override void OutStoreProcess()
{
}
#endregion
#region 入库
public override void StartInStoreMove(InOutParam param)
{
}
protected override void InStoreProcess()
{
}
#endregion
}
}
......@@ -126,8 +126,7 @@ namespace OnlineStore.DeviceLibrary
string appPath = Application.StartupPath;
string configFile = appPath + ConfigAppSettings.GetValue(Setting_Init.BOX_ConfigPath);
if (!Directory.Exists(configFile))
{
{
configFile = configFile.Replace(".csv", "_" + storeConfig.Id + ".csv");
}
bool result = CSVConfigReader.SaveBoxPosition(configFile, storeConfig);
......@@ -148,7 +147,33 @@ namespace OnlineStore.DeviceLibrary
}
return false;
}
public static bool UpdateStoreConfig(Store_Config storeConfig)
{
try
{
//位置配置到文件中
string appPath = Application.StartupPath;
string configFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_ConfigPath);
if (!Directory.Exists(configFile))
{
configFile = configFile.Replace(".csv", "_" + storeConfig.Id + ".csv");
}
bool result = CSVConfigReader.SaveBoxPosition(configFile, storeConfig);
if (!result)
{
LogUtil.error("保存配置文件失败:" + configFile);
}
StoreManager.Config = storeConfig;
StoreManager.Store.Config = storeConfig;
return true;
}
catch (Exception ex)
{
LogUtil.error("出错:" + ex.ToString());
}
return false;
}
#endregion
#region 位置加载
......
......@@ -44,7 +44,7 @@ namespace OnlineStore.DeviceLibrary
autoNext = false;
}
internal void InOutEndProcess(BoxBean boxBean, StoreMoveType storeMoveType)
internal void InOutEndProcess(BoxBean boxBean, MoveType storeMoveType)
{
try
{
......@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
{
return;
}
if (storeMoveType.Equals(StoreMoveType.InStore))
if (storeMoveType.Equals(MoveType.InStore))
{
int newIndex = positionIndex - 1;
if (newIndex < 0)
......@@ -96,7 +96,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
else if (storeMoveType.Equals(StoreMoveType.OutStore))
else if (storeMoveType.Equals(MoveType.OutStore))
{
int newIndex = positionIndex - Jiange;
if (newIndex < 0)
......
......@@ -466,7 +466,7 @@ namespace OnlineStore.DeviceLibrary
}
public enum StoreAlarmType
public enum AlarmType
{
/// <summary>
/// 没有报警
......
......@@ -21,7 +21,7 @@ namespace OnlineStore.DeviceLibrary
public int TimeOutSeconds = 60;
public StoreMoveInfo(int storeId)
{
moveType = StoreMoveType.None;
moveType = MoveType.None;
MoveParam = new InOutParam();
this.storeId = storeId;
......@@ -48,9 +48,9 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// 操作类型
/// </summary>
private StoreMoveType moveType = StoreMoveType.None;
private MoveType moveType = MoveType.None;
public StoreMoveType MoveType
public MoveType MoveType
{
get { return moveType; }
}
......@@ -115,7 +115,7 @@ namespace OnlineStore.DeviceLibrary
// // MoveNum++;
// currShelfIndex = -1;
//}
public void NewMove(StoreMoveType type, InOutParam param = null)
public void NewMove(MoveType type, InOutParam param = null)
{
moveStep = StoreMoveStep.Wait;
this.moveType = type;
......@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
}
public void EndMove()
{
this.moveType = StoreMoveType.None;
this.moveType = MoveType.None;
this.MoveParam = null;
moveStep = StoreMoveStep.Wait;
LastSetpTime = DateTime.Now;
......@@ -467,7 +467,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
internal static int W011_DoorCloseEvent = 11;
}
public enum StoreMoveType
public enum MoveType
{
/// <summary>
/// 没有任何操作
......
......@@ -112,6 +112,14 @@ namespace OnlineStore.LoadCSVLibrary
}
return false;
}
public bool IsSameAxis(string devName,int axis)
{
if (DeviceName.Equals(devName) && ((short)axis).Equals(GetAxisValue()))
{
return true;
}
return false;
}
public string DisplayStr
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!