Commit d01a881f LN

界面调整

1 个父辈 2b40314a
正在显示 37 个修改的文件 包含 383 行增加258 行删除
...@@ -82,6 +82,12 @@ ...@@ -82,6 +82,12 @@
<Compile Include="FrmBase.Designer.cs"> <Compile Include="FrmBase.Designer.cs">
<DependentUpon>FrmBase.cs</DependentUpon> <DependentUpon>FrmBase.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FrmAxisMove.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAxisMove.Designer.cs">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</Compile>
<Compile Include="FrmStore.cs"> <Compile Include="FrmStore.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -130,6 +136,9 @@ ...@@ -130,6 +136,9 @@
<EmbeddedResource Include="FrmBase.resx"> <EmbeddedResource Include="FrmBase.resx">
<DependentUpon>FrmBase.cs</DependentUpon> <DependentUpon>FrmBase.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FrmAxisMove.resx">
<DependentUpon>FrmAxisMove.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmStore.resx"> <EmbeddedResource Include="FrmStore.resx">
<DependentUpon>FrmStore.cs</DependentUpon> <DependentUpon>FrmStore.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
...@@ -8,7 +8,7 @@ using System.Text; ...@@ -8,7 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public class FormManager public class FormManager
{ {
......
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
partial class FrmAbout partial class FrmAbout
{ {
......
...@@ -10,7 +10,7 @@ using System.Text; ...@@ -10,7 +10,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmAbout : FrmBase public partial class FrmAbout : FrmBase
{ {
......
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
partial class FrmAxisDebug partial class FrmAxisDebug
{ {
......
...@@ -14,7 +14,7 @@ using System.Text; ...@@ -14,7 +14,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmAxisDebug : FrmBase public partial class FrmAxisDebug : FrmBase
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.CompilerServices;
using System.Threading;
using System.IO;
using System.Runtime.InteropServices;
using OnlineStore.Common;
using System.Reflection;
using log4net;
using OnlineStore.DeviceLibrary;
using System.IO.Ports;
using OnlineStore.LoadCSVLibrary;
using CodeLibrary;
using DeviceLib;
using UserFromControl;
namespace OnlineStore.DUOStore
{
public partial class FrmAxisMove : FrmBase
{
public FrmAxisMove()
{
Control.CheckForIllegalCrossThreadCalls = false;
InitializeComponent();
}
#region "初始化界面数据"
private bool LoadOk = false;
private void FrmTest_Load(object sender, EventArgs e)
{
}
#endregion
private void timer1_Tick(object sender, EventArgs e)
{
if (!this.Visible)
{
return;
}
}
private void LoadPostion()
{
}
private void btnSavePosition_Click(object sender, EventArgs e)
{
}
}
}
此文件的差异太大,无法显示。
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
partial class FrmBase partial class FrmBase
{ {
......
...@@ -9,7 +9,7 @@ using System.Text; ...@@ -9,7 +9,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmBase : Form public partial class FrmBase : Form
{ {
......
此文件的差异太大,无法显示。
...@@ -18,7 +18,7 @@ using OnlineStore.LoadCSVLibrary; ...@@ -18,7 +18,7 @@ using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common; using OnlineStore.Common;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmIOStatus : FrmBase public partial class FrmIOStatus : FrmBase
{ {
...@@ -204,30 +204,19 @@ namespace OnlineStore.ACPackingStore ...@@ -204,30 +204,19 @@ namespace OnlineStore.ACPackingStore
private void btnLocationUp_Click(object sender, EventArgs e) private void btnLocationUp_Click(object sender, EventArgs e)
{ {
StoreManager.Store.hoisterCylinder.StartForward(null);
// StoreManager.Store.CylinderMove(null, IO_Type.LocationCylinder_Down, IO_Type.LocationCylinder_Up);
} }
private void btnLocationDown_Click(object sender, EventArgs e) private void btnLocationDown_Click(object sender, EventArgs e)
{ {
// StoreManager.Store.CylinderMove(null, IO_Type.LocationCylinder_Up, IO_Type.LocationCylinder_Down); StoreManager.Store.hoisterCylinder.StartBack(null);
} }
private void FrmIOStatus_Shown(object sender, EventArgs e) private void FrmIOStatus_Shown(object sender, EventArgs e)
{ {
timer1.Start(); timer1.Start();
} }
private void btnOpenAxisBreak_Click(object sender, EventArgs e)
{
// BtnMove(btnOpenAxisBreak, "打开刹车", "关闭刹车", IO_Type.Axis_Brake);
}
private void btnCloseAxisBreak_Click(object sender, EventArgs e)
{
// StoreManager.Store.IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
}
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
this.Close(); this.Close();
...@@ -266,39 +255,15 @@ namespace OnlineStore.ACPackingStore ...@@ -266,39 +255,15 @@ namespace OnlineStore.ACPackingStore
private void btnTopDown_Click(object sender, EventArgs e) private void btnTopDown_Click(object sender, EventArgs e)
{ {
StoreManager.Store.CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down); StoreManager.Store.CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
private void btnNGDoorUp_Click(object sender, EventArgs e)
{
// StoreManager.Store.CylinderMove(null, IO_Type.NGDoorCylinder_Down, IO_Type.NGDoowCylinder_Up);
}
private void btnNGDoorDown_Click(object sender, EventArgs e)
{
// StoreManager.Store.CylinderMove(null, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
}
private void btnCamerLed_Click(object sender, EventArgs e) private void btnCamerLed_Click(object sender, EventArgs e)
{ {
BtnMove(btnCamerLed, "打开光源", "关闭光源", IO_Type.Camera_Led); BtnMove(btnCamerLed, "打开相机光源", "关闭相机光源", IO_Type.Camera_Led);
} }
private void button4_Click(object sender, EventArgs e)
{
}
private void btnStopMove_Click(object sender, EventArgs e)
{
}
private void btnStoreOn_Click(object sender, EventArgs e) private void btnStoreOn_Click(object sender, EventArgs e)
{ {
// BtnMove(btnStoreOn, "料仓运转ON", "料仓运转OFF", IO_Type.Run_Signal); BtnMove(btnCamerLed, "打开设备电源", "关闭设备电源", IO_Type.Device_Led);
}
private void btnBlow_Click(object sender, EventArgs e)
{
// BtnMove(btnBlow, "开始吹气", "停止吹气", IO_Type.StartOrStopBlow);
} }
private void btnCloseCyDo_Click(object sender, EventArgs e) private void btnCloseCyDo_Click(object sender, EventArgs e)
...@@ -312,20 +277,40 @@ namespace OnlineStore.ACPackingStore ...@@ -312,20 +277,40 @@ namespace OnlineStore.ACPackingStore
// StoreManager.Store.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW); // StoreManager.Store.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
// StoreManager.Store.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW); // StoreManager.Store.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
} }
private void btnNgLine_Click(object sender, EventArgs e) private void btnClamp_Click(object sender, EventArgs e)
{ {
// StoreManager.Store.IOMove(IO_Type.NGLine_Run, IO_VALUE.HIGH); StoreManager.Store.CylinderMove(null, IO_Type.ClampCylinder_Relax, IO_Type.ClampCylinder_Clamp);
} }
private void btnNGlineStop_Click(object sender, EventArgs e) private void btnRelax_Click(object sender, EventArgs e)
{ {
// StoreManager.Store.IOMove(IO_Type.NGLine_Run, IO_VALUE.LOW); StoreManager.Store.CylinderMove(null, IO_Type.ClampCylinder_Clamp, IO_Type.ClampCylinder_Relax);
} }
private void btnLineBack_Click(object sender, EventArgs e) private void btnLDoorUp_Click(object sender, EventArgs e)
{
StoreManager.Store.BoxMap[1].CylinderMove(null, IO_Type.OutDoor_Down, IO_Type.OutDoor_Up);
}
private void btnLDoorDown_Click(object sender, EventArgs e)
{ {
StoreManager.Store.BoxMap[1].CylinderMove(null, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
}
private void btnRDoorUp_Click(object sender, EventArgs e)
{
StoreManager.Store.BoxMap[2].CylinderMove(null, IO_Type.OutDoor_Down, IO_Type.OutDoor_Up);
}
private void btnRDoorDown_Click(object sender, EventArgs e)
{
StoreManager.Store.BoxMap[2].CylinderMove(null, IO_Type.OutDoor_Up, IO_Type.OutDoor_Down);
}
private void btnCloseDO_Click(object sender, EventArgs e)
{
WriteDO(IO_VALUE.LOW);
} }
} }
} }
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
partial class FrmPwd partial class FrmPwd
{ {
......
...@@ -10,7 +10,7 @@ using System.Text; ...@@ -10,7 +10,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmPwd : FrmBase public partial class FrmPwd : FrmBase
{ {
......
...@@ -17,7 +17,7 @@ using System.Threading.Tasks; ...@@ -17,7 +17,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using UserFromControl; using UserFromControl;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
internal partial class FrmStore : Form internal partial class FrmStore : Form
{ {
...@@ -36,31 +36,40 @@ namespace OnlineStore.ACPackingStore ...@@ -36,31 +36,40 @@ namespace OnlineStore.ACPackingStore
private void FrmMain_Load(object sender, EventArgs e) private void FrmMain_Load(object sender, EventArgs e)
{ {
FrmBase.GetVersion(); try
store = StoreManager.InitStore();
if (store == null)
{ {
this.Close(); FrmBase.GetVersion();
return; store = StoreManager.InitStore();
if (store == null)
{
this.Close();
return;
}
foreach (BoxBean box in store.BoxMap.Values)
{
FrmBox frm = new FrmBox();
frm.BoxBean = box;
AddForm(box.Name, frm);
}
AddForm(" 取料提升机构 ", new FrmAxisMove());
AddForm(" IO状态查看 ", new FrmIOStatus());
chbAutoRun.Checked = store.UseBuzzer;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
chbAutoRun.Checked = (ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1));
chbDoorCanMove.Checked = (ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1));
// LogUtil.logBox = this.logBox;
// HideForm();
LoadOk = true;
LogUtil.logBox = this.logBox;
this.timer1.Start();
} }
AddForm(" IO状态查看 ", new FrmIOStatus()); catch (Exception ex)
foreach (BoxBean box in store.BoxMap.Values)
{ {
FrmBox frm = new FrmBox(); LogUtil.error(ex.ToString());
frm.BoxBean = box; MessageBox.Show(ex.ToString());
AddForm(box.Name, frm);
} }
chbAutoRun.Checked = store.UseBuzzer;
this.Text = ConfigAppSettings.GetValue(Setting_Init.App_Title);
chbAutoRun.Checked =( ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun).Equals(1));
chbDoorCanMove.Checked =( ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1));
// LogUtil.logBox = this.logBox;
// HideForm();
LoadOk = true;
LogUtil.logBox = this.logBox;
this.timer1.Start();
} }
private void AddForm(string text, Form form) private void AddForm(string text, Form form)
......
...@@ -5,7 +5,7 @@ using System.Text; ...@@ -5,7 +5,7 @@ using System.Text;
using System.Windows; using System.Windows;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public class ManagerUtil public class ManagerUtil
{ {
......
using log4net; using log4net;
using log4net.Config; using log4net.Config;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.ACPackingStore; using OnlineStore.DUOStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
...@@ -10,7 +10,7 @@ using System.Runtime.InteropServices; ...@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
static class Program static class Program
{ {
......
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
partial class FrmPositionTool partial class FrmPositionTool
{ {
......
...@@ -16,7 +16,7 @@ using System.Threading; ...@@ -16,7 +16,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace OnlineStore.ACPackingStore namespace OnlineStore.DUOStore
{ {
public partial class FrmPositionTool : FrmBase public partial class FrmPositionTool : FrmBase
{ {
......
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<Compile Include="duoStore\BoxBean.cs" /> <Compile Include="duoStore\BoxBean.cs" />
<Compile Include="duoStore\BoxBean_Partial.cs" /> <Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" /> <Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\EnteryDoorBean.cs" /> <Compile Include="duoStore\HoisterCylinder.cs" />
<Compile Include="duoStore\HumitureBean.cs" /> <Compile Include="duoStore\HumitureBean.cs" />
<Compile Include="duoStore\DUOStoreBean.cs" /> <Compile Include="duoStore\DUOStoreBean.cs" />
<Compile Include="duoStore\StoreManager.cs" /> <Compile Include="duoStore\StoreManager.cs" />
......
...@@ -5,9 +5,9 @@ AXIS,,L3_进出轴,InOut_Axis,3,COM1,,100,300,300,20,60,200,10,1000,0,0 ...@@ -5,9 +5,9 @@ AXIS,,L3_进出轴,InOut_Axis,3,COM1,,100,300,300,20,60,200,10,1000,0,0
AXIS,,L4_压紧轴,Comp_Axis,4,COM1,,100,300,300,20,60,200,10,1000,0,0 AXIS,,L4_压紧轴,Comp_Axis,4,COM1,,100,300,300,20,60,200,10,1000,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P1待机点/扫码放料低点,UpDownAxis_P1,585000,,,,,,,,,,,, PRO,,L2_上下轴_P1待机点/入料口低点,UpDownAxis_P1,585000,,,,,,,,,,,,
PRO,,L2_上下轴_P2扫码放料高点缓冲点,UpDownAxis_P2,604500,,,,,,,,,,,, PRO,,L2_上下轴_P2入料口高点,UpDownAxis_P2,604500,,,,,,,,,,,,
PRO,,L1_旋转轴_P1待机点/扫码放料点,MiddleAxis_P1,307200,,,,,,,,,,,, PRO,,L1_旋转轴_P1待机点/入料口位置,MiddleAxis_P1,307200,,,,,,,,,,,,
PRO,,L3_进出轴_P1待机点,InOutAxis_P1,1000,,,,,,,,,,,, PRO,,L3_进出轴_P1待机点,InOutAxis_P1,1000,,,,,,,,,,,,
PRO,,L4_压紧轴_P1待机点,CompAxis_P1,140000,,,,,,,,,,,, PRO,,L4_压紧轴_P1待机点,CompAxis_P1,140000,,,,,,,,,,,,
PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,180000,,,,,,,,,,,, PRO,,L4_压紧轴_P3压紧前点,CompAxis_P3,180000,,,,,,,,,,,,
...@@ -36,10 +36,10 @@ PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,400,,,,,,,,,,,, ...@@ -36,10 +36,10 @@ PRO,,L4_压紧轴_P1速度,CompAxis_P1_Speed,400,,,,,,,,,,,,
PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,400,,,,,,,,,,,, PRO,,L4_压紧轴_P2速度,CompAxis_P2_Speed,400,,,,,,,,,,,,
PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,400,,,,,,,,,,,, PRO,,L4_压紧轴_P3速度,CompAxis_P3_Speed,400,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,L2_上下轴_P101速度,UpDownAxis_P101_Speed,600,,,,,,,,,,,, PRO,,L2_上下轴_P11速度,UpDownAxis_P11_Speed,600,,,,,,,,,,,,
PRO,,L2_上下轴_P102速度,UpDownAxis_P102_Speed,600,,,,,,,,,,,, PRO,,L2_上下轴_P12速度,UpDownAxis_P12_Speed,600,,,,,,,,,,,,
PRO,,L3_进出轴_P101速度,InOutAxis_P101_Speed,300,,,,,,,,,,,, PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,300,,,,,,,,,,,,
PRO,,L1_旋转轴_P101速度,MiddleAxis_P101_Speed,300,,,,,,,,,,,, PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,300,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,, PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,, PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
...@@ -36,10 +36,10 @@ PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,400,,,,,,,,,,,, ...@@ -36,10 +36,10 @@ PRO,,R4_压紧轴_P1速度,CompAxis_P1_Speed,400,,,,,,,,,,,,
PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,400,,,,,,,,,,,, PRO,,R4_压紧轴_P2速度,CompAxis_P2_Speed,400,,,,,,,,,,,,
PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,400,,,,,,,,,,,, PRO,,R4_压紧轴_P3速度,CompAxis_P3_Speed,400,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,R2_上下轴_P101速度,UpDownAxis_P101_Speed,600,,,,,,,,,,,, PRO,,R2_上下轴_P11速度,UpDownAxis_P11_Speed,600,,,,,,,,,,,,
PRO,,R2_上下轴_P102速度,UpDownAxis_P102_Speed,600,,,,,,,,,,,, PRO,,R2_上下轴_P12速度,UpDownAxis_P12_Speed,600,,,,,,,,,,,,
PRO,,R3_进出轴_P101速度,InOutAxis_P101_Speed,300,,,,,,,,,,,, PRO,,R3_进出轴_P11速度,InOutAxis_P11_Speed,300,,,,,,,,,,,,
PRO,,R1_旋转轴_P101速度,MiddleAxis_P101_Speed,300,,,,,,,,,,,, PRO,,R1_旋转轴_P11速度,MiddleAxis_P11_Speed,300,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,, PRO,,温湿度端口号,Humiture_Port,COM5,,,,,,,,,,,,
PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,, PRO,,是否是调试状态,IsInDebug,0,,,,,,,,,,,,
...@@ -96,6 +96,32 @@ DO,0,设备内部照明ON,Device_Led,2,PRO_AIO_IP_3,Y43,,,,,,,,,, ...@@ -96,6 +96,32 @@ DO,0,设备内部照明ON,Device_Led,2,PRO_AIO_IP_3,Y43,,,,,,,,,,
,0,,,5,PRO_AIO_IP_3,Y46,,,,,,,,,, ,0,,,5,PRO_AIO_IP_3,Y46,,,,,,,,,,
,0,,,6,PRO_AIO_IP_3,Y47,,,,,,,,,, ,0,,,6,PRO_AIO_IP_3,Y47,,,,,,,,,,
,0,,,7,PRO_AIO_IP_3,Y48,,,,,,,,,, ,0,,,7,PRO_AIO_IP_3,Y48,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,T1_提升轴待机点 P1,BatchAxis_P1,5000,,,,, ,,,,,,,
PRO,0,T1_提升轴上升目标点_P2,BatchAxis_P2,4000,,,,, ,,,,,,,
PRO,0,T1_提升轴P1速度,BatchAxis_P1Speed,4000,,,,,,,,,,,,
PRO,0,T1_提升轴P2速度,BatchAxis_P2Speed,500,,,,, ,,,,,,,
PRO,0,T1_提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,11000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,T2_旋转轴待机点/取放料点 P1,MiddleAxis_P1,5000,,,,,,,,,,,,
PRO,0,T2_旋转轴左侧料仓取放料点_P2,MiddleAxis_P2,59000,,,,,,,,,,,,
PRO,0,T2_旋转轴右侧料仓取放料点_P3,MiddleAxis_P3,59000,,,,,,,,,,,,
PRO,0,T2_旋转轴P1速度,MiddleAxis_P1Speed,500,,,,,,,,,,,,
PRO,0,T2_旋转轴P2速度,MiddleAxis_P2Speed,500,,,,,,,,,,,,
PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,500,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,5000,,,,,,,,,,,,
PRO,0,T3_升降轴料串取放料高点 P2,UpdownAxis_P2,5001,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,5002,,,,,,,,,,,,
PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,5003,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,5004,,,,,,,,,,,,
PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,5005,,,,,,,,,,,,
PRO,0,T2_升降轴P1速度,UpdownAxis_P1Speed,500,,,,,,,,,,,,
PRO,0,T2_升降轴P2速度,UpdownAxis_P2Speed,501,,,,,,,,,,,,
PRO,0,T2_升降轴P3速度,UpdownAxis_P3Speed,502,,,,,,,,,,,,
PRO,0,T2_升降轴P4速度,UpdownAxis_P4Speed,503,,,,,,,,,,,,
PRO,0,T2_升降轴P5速度,UpdownAxis_P5Speed,504,,,,,,,,,,,,
PRO,0,T2_升降轴P6速度,UpdownAxis_P6Speed,505,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,, PRO,,预警温度,WarnTemperate,80,,,,,,,,,,,,
......
...@@ -18,9 +18,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -18,9 +18,7 @@ namespace OnlineStore.DeviceLibrary
/// 流水线自动料仓-Box类 /// 流水线自动料仓-Box类
/// </summary> /// </summary>
public partial class BoxBean : KTK_Store public partial class BoxBean : KTK_Store
{ {
private TaskData taskData = null;
public HoisterCylinder DoorBean = null;
private bool IsIntSlvBlock = false; private bool IsIntSlvBlock = false;
public AutoInoutInfo AutoInout = new AutoInoutInfo(); public AutoInoutInfo AutoInout = new AutoInoutInfo();
public string CID = ""; public string CID = "";
...@@ -28,24 +26,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,24 +26,12 @@ namespace OnlineStore.DeviceLibrary
public string lastPosId = ""; public string lastPosId = "";
public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline; public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline;
public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>(); public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>();
/// <summary>
/// 所有料仓库位列表
/// </summary>
public List<string> PositionNumList = new List<string>();
/// <summary>
/// 所有料架库位列表
/// </summary>
public List<string> ShelfPosList = new List<string>();
public List<string> PositionNumList = new List<string>();
public HumitureBean humBean = null; public HumitureBean humBean = null;
private System.Timers.Timer serverConnectTimer = new System.Timers.Timer(); private System.Timers.Timer serverConnectTimer = new System.Timers.Timer();
private System.Timers.Timer IoCheckTimer = new System.Timers.Timer(); private System.Timers.Timer IoCheckTimer = new System.Timers.Timer();
/// <summary>
/// 是否有料架在来的路上
/// </summary>
public bool WaitShelfEnter=false;
private int logType = 1000; private int logType = 1000;
public BoxBean(BOX_Config config) public BoxBean(BOX_Config config)
{ {
...@@ -62,18 +48,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -62,18 +48,15 @@ namespace OnlineStore.DeviceLibrary
IoCheckTimer.AutoReset = true; IoCheckTimer.AutoReset = true;
IoCheckTimer.Enabled = false; IoCheckTimer.Enabled = false;
IoCheckTimer.Elapsed += IoCheckTimer_Elapsed; IoCheckTimer.Elapsed += IoCheckTimer_Elapsed;
logType = 1000 * config.Id;
logType = config.Id * 1000;
//添加调试 //添加调试
IsDebug = config.IsInDebug.Equals(1); IsDebug = config.IsInDebug.Equals(1);
Name = (" BOX_" + config.Id + " ").ToUpper(); Name = (" BOX_" + config.Id + " ").ToUpper();
this.ID = config.Id; ; this.ID = config.Id; ;
this.Config = config; this.Config = config;
DoorBean = new HoisterCylinder(ID);
//温湿度 //温湿度
humBean = new HumitureBean(config.Humiture_Port, Name); humBean = new HumitureBean(config.Humiture_Port, Name);
// humBean.Init();
moveAxisList = new List<ConfigMoveAxis>();
MoveAxisConfig(); MoveAxisConfig();
List<ACBoxPosition> positionList = CSVPositionReader<ACBoxPosition>.getPositionList(); List<ACBoxPosition> positionList = CSVPositionReader<ACBoxPosition>.getPositionList();
PositionNumList = new List<string>(); PositionNumList = new List<string>();
...@@ -116,8 +99,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,8 +99,10 @@ namespace OnlineStore.DeviceLibrary
/// 配置速度,加减速时间 /// 配置速度,加减速时间
/// </summary> /// </summary>
public void MoveAxisConfig() public void MoveAxisConfig()
{ {
moveAxisList = new List<ConfigMoveAxis>(); Config.UpDown_Axis.BreakOnDO = IO_Type.UpdownAxis_Break;
moveAxisList = new List<ConfigMoveAxis>();
moveAxisList.Add(Config.Middle_Axis); moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis); moveAxisList.Add(Config.UpDown_Axis);
moveAxisList.Add(Config.InOut_Axis); moveAxisList.Add(Config.InOut_Axis);
...@@ -204,8 +189,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -204,8 +189,7 @@ namespace OnlineStore.DeviceLibrary
#region 原点返回和复位处理 #region 原点返回和复位处理
private void ReturnHome() private void ReturnHome()
{ {
CurrShelfID = ""; CurrShelfID = "";
WaitShelfEnter = false;
lastPosId = ""; lastPosId = "";
lastPosIdStatus = StoreStatus.ResetMove; lastPosIdStatus = StoreStatus.ResetMove;
AutoInout.ClearCount(); AutoInout.ClearCount();
...@@ -248,8 +232,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -248,8 +232,7 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = ""; WarnMsg = "";
isInSuddenDown = false; isInSuddenDown = false;
isNoAirCheck = false; isNoAirCheck = false;
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
DoorBean.Stop();
//开始复位动作 //开始复位动作
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H01_InOutBack); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H01_InOutBack);
...@@ -806,8 +789,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -806,8 +789,7 @@ namespace OnlineStore.DeviceLibrary
/// 停止所有运行 /// 停止所有运行
/// </summary> /// </summary>
public override void StopMove() public override void StopMove()
{ {
DoorBean.Stop();
IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW); IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
MoveInfo.EndMove(); MoveInfo.EndMove();
IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW); IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
......
...@@ -355,8 +355,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -355,8 +355,8 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition); MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":" + str + ",走到料架位置,旋转轴至P101,升降轴至P102"); InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":" + str + ",走到料架位置,旋转轴至P101,升降轴至P102");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_HP102, Config.UpDownAxis_P102_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_HP102, Config.UpDownAxis_P12_Speed);
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P101, Config.MiddleAxis_P101_Speed); ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P101, Config.MiddleAxis_P11_Speed);
} }
protected override void InStoreProcess() protected override void InStoreProcess()
{ {
...@@ -415,21 +415,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -415,21 +415,21 @@ namespace OnlineStore.DeviceLibrary
//{ //{
// MoveInfo.NextMoveStep(StoreMoveStep.BI_12_MoveToShelf); // MoveInfo.NextMoveStep(StoreMoveStep.BI_12_MoveToShelf);
// InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴到P101低点,旋转轴到P101点,压紧轴到压紧前点"); // InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴到P101低点,旋转轴到P101点,压紧轴到压紧前点");
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed); // ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P11_Speed);
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed); // ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P11_Speed);
// ACAxisMove(Config.Comp_Axis, Config.CompAxis_Max_P3, Config.CompAxis_P3_Speed); // ACAxisMove(Config.Comp_Axis, Config.CompAxis_Max_P3, Config.CompAxis_P3_Speed);
//} //}
//else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_12_MoveToShelf)) //else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_12_MoveToShelf))
//{ //{
// MoveInfo.NextMoveStep(StoreMoveStep.BI_13_InoutToP101); // MoveInfo.NextMoveStep(StoreMoveStep.BI_13_InoutToP101);
// InOutStoreLog("料架取料 " + MoveInfo.SLog + ":叉子前进到P101点"); // InOutStoreLog("料架取料 " + MoveInfo.SLog + ":叉子前进到P101点");
// ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed); // ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P11_Speed);
//} //}
//else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_13_InoutToP101)) //else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_13_InoutToP101))
//{ //{
// MoveInfo.NextMoveStep(StoreMoveStep.BI_14_UpdownToP102); // MoveInfo.NextMoveStep(StoreMoveStep.BI_14_UpdownToP102);
// InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴上升到P102点"); // InOutStoreLog("料架取料 " + MoveInfo.SLog + ":升降轴上升到P102点");
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed); // ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P12_Speed);
//} //}
//else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_14_UpdownToP102)) //else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_14_UpdownToP102))
//{ //{
...@@ -707,7 +707,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -707,7 +707,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf); MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf);
InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101"); InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P11_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf) else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf)
...@@ -715,7 +715,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -715,7 +715,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel); MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel);
InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空 taskData=null "); InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空 taskData=null ");
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P11_Speed);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_12_PutReel) else if (MoveInfo.MoveStep == StoreMoveStep.SO_12_PutReel)
...@@ -782,18 +782,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -782,18 +782,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,忙碌或报警中 ,storeStatus:" + storeRunStatus + ",MoveType:" + MoveInfo.MoveType + ",isInSuddenDown:" + isInSuddenDown + ",isNoAirCheck:" + isNoAirCheck); LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,忙碌或报警中 ,storeStatus:" + storeRunStatus + ",MoveType:" + MoveInfo.MoveType + ",isInSuddenDown:" + isInSuddenDown + ",isNoAirCheck:" + isNoAirCheck);
return false; return false;
} }
if (WaitShelfEnter)
{
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】失败,WaitShelfEnter=true ,需要等待入库结束才能出库");
return false;
}
if (!StoreManager.LoadInoutParam(param, false, this)) if (!StoreManager.LoadInoutParam(param, false, this))
{ {
LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】出错,找不到库位信息"); LogUtil.error(Name + " 启动出库【" + param.ToStr() + "】出错,找不到库位信息");
return false; return false;
} }
taskData = null;
storeStatus = StoreStatus.OutStoreExecute; storeStatus = StoreStatus.OutStoreExecute;
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
MoveInfo.NewMove(StoreMoveType.OutStore, param); MoveInfo.NewMove(StoreMoveType.OutStore, param);
...@@ -931,8 +926,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -931,8 +926,8 @@ namespace OnlineStore.DeviceLibrary
// CompressSigTimeOut = false; // CompressSigTimeOut = false;
// MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition); // MoveInfo.NextMoveStep(StoreMoveStep.SO_08_ToShelfPosition);
// InOutStoreLog("出库 " + MoveInfo.SLog + ":走到料架位置,旋转轴至P101,升降轴至P102 "); // InOutStoreLog("出库 " + MoveInfo.SLog + ":走到料架位置,旋转轴至P101,升降轴至P102 ");
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P102_Speed); // ACAxisMove(Config.UpDown_Axis, moveP.UpDown_HP102, Config.UpDownAxis_P12_Speed);
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P101_Speed); // ACAxisMove(Config.Middle_Axis, moveP.Middle_P101, Config.MiddleAxis_P11_Speed);
// } // }
//} //}
//else if (MoveInfo.MoveStep == StoreMoveStep.SO_08_ToShelfPosition) //else if (MoveInfo.MoveStep == StoreMoveStep.SO_08_ToShelfPosition)
...@@ -949,7 +944,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -949,7 +944,7 @@ namespace OnlineStore.DeviceLibrary
//{ //{
// MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf); // MoveInfo.NextMoveStep(StoreMoveStep.SO_11_ToShelf);
// InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101"); // InOutStoreLog("出库 " + MoveInfo.SLog + ":叉子进出料口,进出轴至P101");
// ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P101_Speed); // ACAxisMove(Config.InOut_Axis, moveP.InOut_P101, Config.InOutAxis_P11_Speed);
//} //}
//else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf) //else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_ToShelf)
...@@ -957,7 +952,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -957,7 +952,7 @@ namespace OnlineStore.DeviceLibrary
// MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel); // MoveInfo.NextMoveStep(StoreMoveStep.SO_12_PutReel);
// InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空 taskData=null "); // InOutStoreLog("出库 " + MoveInfo.SLog + ":放下物品,压紧轴到P1,升降轴至P101,清空 taskData=null ");
// ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed); // ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed); // ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P11_Speed);
// MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
// taskData = null; // taskData = null;
// Task.Factory.StartNew(delegate // Task.Factory.StartNew(delegate
......
...@@ -376,81 +376,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -376,81 +376,7 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
#region AGV
internal bool ProcessAGVAction(string name, string rfid, ClientAction action)
{
string logN = name + "收到调度" + name + "=" + action + ",RFID[" + rfid + "]";
//Arrive收到后打开门
if (!action.Equals(ClientAction.Arrive))
{
LogUtil.info(Name + logN + " ,未找到相关处理");
return false;
}
//出库处理中不处理
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_WaitEmptyAgv))
{
if (!rfid.Equals(""))
{
string mark = GetMarkInfo();
LogUtil.error(Name + logN + " 当前 BS_03_WaitEmptyAgv,RFID[" + rfid + "]不是空车,不处理agv,重发 NeedLeave [" + mark + "][" + CurrShelfID + "]");
// AgvClient.SetStatus(Config.AgvNodeName, mark, CurrShelfID, ClientAction.NeedLeave, ClientLevel.High, true);
return false;
}
//等待空车到达
LogUtil.info(Name + logN + ",当前 BS_03_WaitEmptyAgv,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_DoorOpen);
InOutStoreLog("送出料架等待空车" + MoveInfo.SLog + ":agv到达,打开入料口移门");
DoorBean.StartBack(MoveInfo);
return true;
}
else if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore) && MoveInfo.MoveStep.Equals(StoreMoveStep.BI_00_ReadyShelf))
{
if (rfid.Equals(""))
{
string mark = GetMarkInfo();
// LogUtil.error(Name + logN + " 当前出库中 BI_00_ReadyShelf,RFID无效,不处理agv,重发 NeedEnter [" + mark + "][" + MoveInfo.MoveParam.rfid + "]");
// AgvClient.SetStatus(Config.AgvNodeName, mark, MoveInfo.MoveParam.rfid, ClientAction.NeedEnter, ClientLevel.High, true);
return false;
}
//出库等待料架到达
LogUtil.info(Name + logN + ",当前出库中 BI_00_ReadyShelf,正在等待料架到达");
MoveInfo.NextMoveStep(StoreMoveStep.BI_01_DoorOpen);
InOutStoreLog("出库等待料架" + MoveInfo.SLog + " agv已到达,打开入料口移门");
DoorBean.StartBack(MoveInfo);
return true;
}
//else if (storeRunStatus.Equals(StoreRunStatus.Runing) &&
// MoveInfo.MoveType.Equals(StoreMoveType.None) &&
// IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.LOW))
//{
// //agv到达,开始处理
// if (rfid.Equals(""))
// {
// LogUtil.error(Name + logN + " ,RFID无效,不需要入库处理");
// return false;
// }
// LogUtil.info(Name + logN + " ,检测到料架,开始料架入库");
// StartShelfInStore();
// return true;
//}
//else
//{
// LogUtil.error(Name + logN + " ,[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]未找到相关处理");
//}
return false;
}
#endregion
#region 与服务器通信定时器,每1秒向服务器通知一次状态,同时执行出库操作 #region 与服务器通信定时器,每1秒向服务器通知一次状态,同时执行出库操作
private string CodeMsg = ""; private string CodeMsg = "";
...@@ -638,8 +564,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -638,8 +564,7 @@ namespace OnlineStore.DeviceLibrary
{ {
index++; index++;
string plateW = plateWArray[index]; string plateW = plateWArray[index];
string plateH = plateHArray[index]; string plateH = plateHArray[index];
string shelfPosID = StoreManager.GetShelfIDByLoc(rfidLoc, ShelfPosList);
InOutParam inoutParam = new InOutParam(barcode, posId, plateW, plateH); InOutParam inoutParam = new InOutParam(barcode, posId, plateW, plateH);
//根据发送的posId获取位置列表 //根据发送的posId获取位置列表
......
...@@ -29,7 +29,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,7 +29,12 @@ namespace OnlineStore.DeviceLibrary
public Store_Config Config { get; set; } public Store_Config Config { get; set; }
public bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1); public bool UseBuzzer = ConfigAppSettings.GetIntValue(Setting_Init.UseBuzzer).Equals(1);
public bool AutoShelfInstore = ConfigAppSettings.GetIntValue(Setting_Init.AutoShelfInstore).Equals(1); public bool AutoShelfInstore = ConfigAppSettings.GetIntValue(Setting_Init.AutoShelfInstore).Equals(1);
public HoisterCylinder hoisterCylinder = new HoisterCylinder(0);
public AxisBean T1_BatchAxis = null;
public AxisBean T2_MiddleAxis = null;
public AxisBean T3_UpdownAxis = null;
#region 初始化 #region 初始化
internal bool canStart = false; internal bool canStart = false;
...@@ -46,32 +51,31 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,32 +51,31 @@ namespace OnlineStore.DeviceLibrary
baseConfig = lineConfig; baseConfig = lineConfig;
this.Config = lineConfig; this.Config = lineConfig;
this.ID = lineConfig.Id; this.ID = lineConfig.Id;
MoveInfo = new StoreMoveInfo(ID );
Name = (" Store_" + Config.CID + " ").ToUpper();
List<string> ioList = new List<string>();
MoveInfo = new StoreMoveInfo(ID);
Name = (" DUO料仓_" + Config.CID + " ").ToUpper();
List<string> ioList = new List<string>();
AddDeviceName(ioList, Config.IOIPList); AddDeviceName(ioList, Config.IOIPList);
foreach (BOX_Config config in configList.Values) foreach (BOX_Config config in configList.Values)
{ {
BoxBean equip = new BoxBean(config); BoxBean equip = new BoxBean(config);
AddDeviceName(ioList, config.IOIPList); AddDeviceName(ioList, config.IOIPList);
BoxMap.Add(config.Id, equip); BoxMap.Add(config.Id, equip);
BoxConfigMap.Add(config.Id, config); BoxConfigMap.Add(config.Id, config);
} }
Config.T3_Updown_Axis.BreakOnDO = IO_Type.MoveAxis_Break;
Config.T1_Batch_Axis.BreakOnDO = IO_Type.MoveAxis_Break;
T1_BatchAxis = new AxisBean(Config.T1_Batch_Axis, Name);
T2_MiddleAxis = new AxisBean(Config.T2_Middle_Axis,Name);
T3_UpdownAxis = new AxisBean(Config.T3_Updown_Axis,Name);
IOManager.Init(); IOManager.Init();
//先初始化设备
//初始化摄像机配置
CodeManager.LoadConfig(); CodeManager.LoadConfig();
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
// RFIDManager.RfidReader.Open(rfidList.ToArray()); // RFIDManager.RfidReader.Open(rfidList.ToArray());
IOManager.instance.ConnectionIOList(ioList); IOManager.instance.ConnectionIOList(ioList);
addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check)); addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check));
addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN)); addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN));
...@@ -79,9 +83,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -79,9 +83,9 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW); IOMove(IO_Type.Alarm_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW); IOMove(IO_Type.AutoRun_HddLed, IO_VALUE.LOW);
IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW); IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
mainTimer.Enabled = true; mainTimer.Enabled = true;
canStart = true; canStart = true;
}); });
} }
......
...@@ -85,6 +85,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,6 +85,7 @@ namespace OnlineStore.DeviceLibrary
string storeIdConfig = Setting_Init.Store_CID + "_" + i; string storeIdConfig = Setting_Init.Store_CID + "_" + i;
string boxCid = ConfigAppSettings.GetValue(storeIdConfig); string boxCid = ConfigAppSettings.GetValue(storeIdConfig);
BOX_Config moveConfig = CSVConfigReader.LoadBoxConfig(i, boxCid, "BOX", config); BOX_Config moveConfig = CSVConfigReader.LoadBoxConfig(i, boxCid, "BOX", config);
moveConfig.SetIO(i);
AllConfigMap.Add(i, moveConfig); AllConfigMap.Add(i, moveConfig);
storeConfig.Add(i, moveConfig); storeConfig.Add(i, moveConfig);
} }
......
...@@ -104,9 +104,9 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -104,9 +104,9 @@ namespace OnlineStore.LoadCSVLibrary
{ {
return DeviceName + "_" + GetAxisValue(); return DeviceName + "_" + GetAxisValue();
} }
public bool IsSameAxis(string portName, int slv) public bool IsSameAxis(ConfigMoveAxis axis)
{ {
if (DeviceName.Equals(portName) && slv.Equals(GetAxisValue())) if (DeviceName.Equals(axis.DeviceName) && axis.GetAxisValue().Equals(GetAxisValue()))
{ {
return true; return true;
} }
......
...@@ -34,8 +34,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -34,8 +34,6 @@ namespace OnlineStore.LoadCSVLibrary
public BaseConfig() public BaseConfig()
{ {
SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
} }
public BaseConfig(int id, string CID, string type, string filepath) public BaseConfig(int id, string CID, string type, string filepath)
...@@ -44,12 +42,18 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -44,12 +42,18 @@ namespace OnlineStore.LoadCSVLibrary
this.Id = id; this.Id = id;
this.DType = type; this.DType = type;
this.ConfigFilePath = filepath; this.ConfigFilePath = filepath;
SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
} }
public virtual void LoadConfig(List<ConfigBase> configList) public virtual void LoadConfig(List<ConfigBase> configList)
{ {
if (SubDIList == null)
{
SubDIList = new Dictionary<int, Dictionary<string, ConfigIO>>();
}
if (SubDOList == null)
{
SubDOList = new Dictionary<int, Dictionary<string, ConfigIO>>();
}
List<string> ioTypeList = IO_Type.GetTypeList(); List<string> ioTypeList = IO_Type.GetTypeList();
StringBuilder builder = new StringBuilder("\r\n"); StringBuilder builder = new StringBuilder("\r\n");
......
...@@ -179,25 +179,25 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -179,25 +179,25 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("CompAxis_P3_Speed")] [ConfigProAttribute("CompAxis_P3_Speed")]
public int CompAxis_P3_Speed { get; set; } public int CompAxis_P3_Speed { get; set; }
/// <summary> /// <summary>
/// PRO,,L2_上下轴_P101速度,UpDownAxis_P101_Speed,600 /// PRO,,L2_上下轴_P11速度,UpDownAxis_P11_Speed,600
/// </summary> /// </summary>
[ConfigProAttribute("UpDownAxis_P101_Speed")] [ConfigProAttribute("UpDownAxis_P11_Speed")]
public int UpDownAxis_P101_Speed { get; set; } public int UpDownAxis_P11_Speed { get; set; }
/// <summary> /// <summary>
/// PRO,,L2_上下轴_P102速度,UpDownAxis_P102_Speed,600 /// PRO,,L2_上下轴_P12速度,UpDownAxis_P12_Speed,600
/// </summary> /// </summary>
[ConfigProAttribute("UpDownAxis_P102_Speed")] [ConfigProAttribute("UpDownAxis_P12_Speed")]
public int UpDownAxis_P102_Speed { get; set; } public int UpDownAxis_P12_Speed { get; set; }
/// <summary> /// <summary>
/// PRO,,L3_进出轴_P101速度,InOutAxis_P101_Speed,300 /// PRO,,L3_进出轴_P11速度,InOutAxis_P11_Speed,300
/// </summary> /// </summary>
[ConfigProAttribute("InOutAxis_P101_Speed")] [ConfigProAttribute("InOutAxis_P11_Speed")]
public int InOutAxis_P101_Speed { get; set; } public int InOutAxis_P11_Speed { get; set; }
/// <summary> /// <summary>
/// PRO,,L1_旋转轴_P101速度,MiddleAxis_P101_Speed,300 /// PRO,,L1_旋转轴_P11速度,MiddleAxis_P11_Speed,300
/// </summary> /// </summary>
[ConfigProAttribute("MiddleAxis_P101_Speed")] [ConfigProAttribute("MiddleAxis_P11_Speed")]
public int MiddleAxis_P101_Speed { get; set; } public int MiddleAxis_P11_Speed { get; set; }
/// <summary> /// <summary>
/// PRO,,温湿度端口号,Humiture_Port,COM5 /// PRO,,温湿度端口号,Humiture_Port,COM5
/// </summary> /// </summary>
......
...@@ -124,6 +124,126 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -124,6 +124,126 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("CameraNameList")] [ConfigProAttribute("CameraNameList")]
public string CameraNameList { get; set; } public string CameraNameList { get; set; }
/// <summary>
/// PRO,0,T1_提升轴待机点 P1,BatchAxis_P1,5000,, ,
/// </summary>
[ConfigProAttribute("BatchAxis_P1")]
public int BatchAxis_P1 { get; set; }
/// <summary>
/// PRO,0,T1_提升轴上升目标点_P2,BatchAxis_P2,4000,, ,
/// </summary>
[ConfigProAttribute("BatchAxis_P2")]
public int BatchAxis_P2 { get; set; }
/// <summary>
/// PRO,0,T1_提升轴P1速度,BatchAxis_P1Speed,4000
/// </summary>
[ConfigProAttribute("BatchAxis_P1Speed")]
public int BatchAxis_P1Speed { get; set; }
/// <summary>
/// PRO,0,T1_提升轴P2速度,BatchAxis_P2Speed,500,, ,
/// </summary>
[ConfigProAttribute("BatchAxis_P2Speed")]
public int BatchAxis_P2Speed { get; set; }
/// <summary>
/// PRO,0,T1_提升轴高度转换系数(1mm对应的脉冲),BatchAxis_ChangeValue,11000
/// </summary>
[ConfigProAttribute("BatchAxis_ChangeValue")]
public int BatchAxis_ChangeValue { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴待机点/取放料点 P1,MiddleAxis_P1,5000
/// </summary>
[ConfigProAttribute("MiddleAxis_P1")]
public int MiddleAxis_P1 { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴左侧料仓取放料点_P2,MiddleAxis_P2,59000
/// </summary>
[ConfigProAttribute("MiddleAxis_P2")]
public int MiddleAxis_P2 { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴右侧料仓取放料点_P3,MiddleAxis_P3,59000
/// </summary>
[ConfigProAttribute("MiddleAxis_P3")]
public int MiddleAxis_P3 { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴P1速度,MiddleAxis_P1Speed,500
/// </summary>
[ConfigProAttribute("MiddleAxis_P1Speed")]
public int MiddleAxis_P1Speed { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴P2速度,MiddleAxis_P2Speed,500
/// </summary>
[ConfigProAttribute("MiddleAxis_P2Speed")]
public int MiddleAxis_P2Speed { get; set; }
/// <summary>
/// PRO,0,T2_旋转轴P3速度,MiddleAxis_P3Speed,500
/// </summary>
[ConfigProAttribute("MiddleAxis_P3Speed")]
public int MiddleAxis_P3Speed { get; set; }
/// <summary>
/// PRO,0,T3_升降轴料串取放料低点 P1,UpdownAxis_P1,5000
/// </summary>
[ConfigProAttribute("UpdownAxis_P1")]
public int UpdownAxis_P1 { get; set; }
/// <summary>
/// PRO,0,T3_升降轴料串取放料高点 P2,UpdownAxis_P2,5001
/// </summary>
[ConfigProAttribute("UpdownAxis_P2")]
public int UpdownAxis_P2 { get; set; }
/// <summary>
/// PRO,0,T3_升降轴左侧料仓取放料低点 P3,UpdownAxis_P3,5002
/// </summary>
[ConfigProAttribute("UpdownAxis_P3")]
public int UpdownAxis_P3 { get; set; }
/// <summary>
/// PRO,0,T3_升降轴左侧料仓取放料高点 P4,UpdownAxis_P4,5003
/// </summary>
[ConfigProAttribute("UpdownAxis_P4")]
public int UpdownAxis_P4 { get; set; }
/// <summary>
/// PRO,0,T3_升降轴右侧料仓取放料低点 P5,UpdownAxis_P5,5004
/// </summary>
[ConfigProAttribute("UpdownAxis_P5")]
public int UpdownAxis_P5 { get; set; }
/// <summary>
/// PRO,0,T3_升降轴右侧料仓取放料高点 P6,UpdownAxis_P6,5005
/// </summary>
[ConfigProAttribute("UpdownAxis_P6")]
public int UpdownAxis_P6 { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P1速度,UpdownAxis_P1Speed,500
/// </summary>
[ConfigProAttribute("UpdownAxis_P1Speed")]
public int UpdownAxis_P1Speed { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P2速度,UpdownAxis_P2Speed,501
/// </summary>
[ConfigProAttribute("UpdownAxis_P2Speed")]
public int UpdownAxis_P2Speed { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P3速度,UpdownAxis_P3Speed,502
/// </summary>
[ConfigProAttribute("UpdownAxis_P3Speed")]
public int UpdownAxis_P3Speed { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P4速度,UpdownAxis_P4Speed,503
/// </summary>
[ConfigProAttribute("UpdownAxis_P4Speed")]
public int UpdownAxis_P4Speed { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P5速度,UpdownAxis_P5Speed,504
/// </summary>
[ConfigProAttribute("UpdownAxis_P5Speed")]
public int UpdownAxis_P5Speed { get; set; }
/// <summary>
/// PRO,0,T2_升降轴P6速度,UpdownAxis_P6Speed,505
/// </summary>
[ConfigProAttribute("UpdownAxis_P6Speed")]
public int UpdownAxis_P6Speed { get; set; }
private List<string> CameraList = new List<string>(); private List<string> CameraList = new List<string>();
public List<string> GetCameraList() public List<string> GetCameraList()
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!