Commit 7e49d1e3 刘韬

1

1 个父辈 2fdcd07b
...@@ -280,10 +280,8 @@ namespace DeviceLibrary ...@@ -280,10 +280,8 @@ namespace DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W008_BatchAxis)) else if (wait.WaitType.Equals(WaitEnum.W008_BatchAxis))
{ {
AxisBean axisBean=null; AxisBean axisBean=null;
//if (wait.AxisInfo.ProName == "Right_Batch_Axis")
// axisBean = Right_Batch_Axis; axisBean = RobotManage.t1Machine.T_Batch_Axis;
//else
// axisBean = Left_Batch_Axis;
//等待信号亮或者走到绝对位置才停止 //等待信号亮或者走到绝对位置才停止
if (IOValue(axisBean.TargetIoType).Equals(axisBean.TargetIoValue)) if (IOValue(axisBean.TargetIoType).Equals(axisBean.TargetIoValue))
......
...@@ -21,7 +21,7 @@ namespace DeviceLibrary ...@@ -21,7 +21,7 @@ namespace DeviceLibrary
public static LabelMachine labelMachine; public static LabelMachine labelMachine;
public static FilterMachine filterMachine; public static FilterMachine filterMachine;
public static T1Machine t1Machine; public static T1Machine t1Machine;
public static XRay XRay=new XRay("XRay"); public static XRay XRay=new XRay("XRay", XRayType.Spellman_RS232);
public static XrayImage xrayImage = new Asa.XrayImage("XrayImage", XrayImage.DeviceType.HAOBO_V2); public static XrayImage xrayImage = new Asa.XrayImage("XrayImage", XrayImage.DeviceType.HAOBO_V2);
public static Config_XRay Config; public static Config_XRay Config;
public static bool IsLoadOk = true; public static bool IsLoadOk = true;
......
...@@ -82,8 +82,9 @@ ...@@ -82,8 +82,9 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="X-Ray"> <Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\DLL\X-Ray.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\X-Ray\X-Ray\bin\Debug\X-Ray.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -28,6 +28,7 @@ namespace AutoCountMachine ...@@ -28,6 +28,7 @@ namespace AutoCountMachine
public Form1() public Form1()
{ {
InitializeComponent(); InitializeComponent();
databaseProc.Current.LoadDISTINCTPn();
//MsgEventHandler = new EventHandler<List<Msg>>(SetMsg); //MsgEventHandler = new EventHandler<List<Msg>>(SetMsg);
t1.Interval = 1000; t1.Interval = 1000;
t1.Tick += T1_Tick; t1.Tick += T1_Tick;
......
...@@ -28,7 +28,7 @@ namespace AutoCountMachine ...@@ -28,7 +28,7 @@ namespace AutoCountMachine
//ServerConn.inputCounterDataByXRayMachine("20.K0784.008-615313|1KQ-2111|5000|A2061531315212446|PANASONIC", 9); //ServerConn.inputCounterDataByXRayMachine("20.K0784.008-615313|1KQ-2111|5000|A2061531315212446|PANASONIC", 9);
//return; //return;
//databaseProc.Current.InsertOrUpdateRI(1, "123", "234", true, "abc", 345, "asd", "fgh", "try"); //databaseProc.Current.InsertOrUpdateRI(1, "123", "234", true, "abc", 345, "asd", "fgh", "try");
//bool x; //bool x;
//x=IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH, OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH,3); //x=IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH, OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH,3);
//x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH, 3); //x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.HIGH, 3);
...@@ -39,7 +39,9 @@ namespace AutoCountMachine ...@@ -39,7 +39,9 @@ namespace AutoCountMachine
//x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3); //x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3);
//x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3); //x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3);
//x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3); //x = IODebounce.Test("123", OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, OnlineStore.LoadCSVLibrary.IO_VALUE.LOW, 3);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
_ = new Mutex(true, Application.ProductName, out bool ret); _ = new Mutex(true, Application.ProductName, out bool ret);
...@@ -52,13 +54,11 @@ namespace AutoCountMachine ...@@ -52,13 +54,11 @@ namespace AutoCountMachine
return; return;
} }
Environment.CurrentDirectory = Application.StartupPath; Environment.CurrentDirectory = Application.StartupPath;
CheckConfigFile(); //CheckConfigFile();
XmlConfigurator.Configure(); XmlConfigurator.Configure();
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException; //
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
databaseProc.Current.LoadDISTINCTPn();
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); Application.Run(new Form1());
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="X-Ray, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\X-Ray\X-Ray\bin\Debug\X-Ray.dll</HintPath> <HintPath>..\..\..\X-Ray\X-Ray\bin\Debug\X-Ray.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -361,7 +361,7 @@ namespace AutoCountMachine ...@@ -361,7 +361,7 @@ namespace AutoCountMachine
RobotManage.xrayMachine.IOMove(IO_XRay_Type.Xray_Lock, IO_VALUE.HIGH); RobotManage.xrayMachine.IOMove(IO_XRay_Type.Xray_Lock, IO_VALUE.HIGH);
Task.Delay(1000).Wait(); Task.Delay(1000).Wait();
RobotManage.XRay.Start(); RobotManage.XRay.Start();
Task.Delay(2000).Wait(); Task.Delay(5000).Wait();
var b = RobotManage.xrayImage.GenerateTemplate(2); var b = RobotManage.xrayImage.GenerateTemplate(2);
b.Wait(); b.Wait();
if (b.Result) if (b.Result)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!