示例#1
0
        public EpsonRC90()
        {
            Rc90In  = new bool[100];
            Rc90Out = new bool[100];
            try
            {
                Scan.ini("COM1");
                IP                  = Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonIp", "192.168.1.2");
                TestSentPort        = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonTestSendPort", "2000"));
                TestSentFlexPort    = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonTestSendFlexPort", "2004"));
                TestReceivePort     = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonTestReceivePort", "2001"));
                IOReceivePort       = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonIOReceivePort", "2007"));
                TestReceiveFlexPort = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonTestReceiveFlexPort", "2005"));
                MsgReceivePort      = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonMsgReceivePort", "2002"));
                CtrlPort            = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Epson", "EpsonRemoteControlPort", "5000"));
                BarcodeMode         = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "BarcodeMode", "BarcodeMode", "True"));
                BarcodeItemNum      = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "BarcodeItem", "BarcodeItemNum", "3"));

                PickBracodeA_1 = Inifile.INIGetStringValue(iniParameterPath, "Barcode", "PickBracodeA_1", "Unknow");
                PickBracodeA_2 = Inifile.INIGetStringValue(iniParameterPath, "Barcode", "PickBracodeA_2", "Unknow");
                PickBracodeB_1 = Inifile.INIGetStringValue(iniParameterPath, "Barcode", "PickBracodeB_1", "Unknow");
                PickBracodeB_2 = Inifile.INIGetStringValue(iniParameterPath, "Barcode", "PickBracodeB_2", "Unknow");

                if (BarcodeMode)
                {
                    ScanVisionScriptFileName = Inifile.INIGetStringValue(iniParameterPath, "Camera", "ScanVisionScriptFileName", @"C:\test.hdev");
                }
                else
                {
                    ScanVisionScriptFileName = Inifile.INIGetStringValue(iniParameterPath, "Camera", "ScanVisionScriptFileNameP3", @"C:\test.hdev");
                }



                TestPcIPA         = Inifile.INIGetStringValue(iniParameterPath, "Mac", "TestPcIPA", "192.168.1.101");
                TestPcIPB         = Inifile.INIGetStringValue(iniParameterPath, "Mac", "TestPcIPB", "192.168.1.102");
                TestPcRemotePortA = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Mac", "TestPcRemotePortA", "8000"));
                TestPcRemotePortB = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "Mac", "TestPcRemotePortB", "8000"));

                TestCheckedAL = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "Tester", "TestCheckedAL", "True"));
                TestCheckedAR = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "Tester", "TestCheckedAR", "True"));
                TestCheckedBL = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "Tester", "TestCheckedBL", "True"));
                TestCheckedBR = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "Tester", "TestCheckedBR", "True"));

                sIMTester[0]        = new SIMTester(0);
                sIMTester[1]        = new SIMTester(1);
                TestRecordSavePath  = Inifile.INIGetStringValue(iniParameterPath, "SavePath", "TestRecordSavePath", "C:\\");
                isCheckUpload       = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "Upload", "IsCheckUploadStatus", "False"));
                PassLowLimitStop    = double.Parse(Inifile.INIGetStringValue(iniParameterPath, "PassYield", "PassLowLimitStop", "85"));
                PassLowLimitStopNum = int.Parse(Inifile.INIGetStringValue(iniParameterPath, "PassYield", "PassLowLimitStopNum", "100"));
                IsPassLowLimitStop  = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "PassYield", "IsPassLowLimitStop", "False"));
                IsCheckINI          = bool.Parse(Inifile.INIGetStringValue(iniParameterPath, "CheckINI", "IsCheckINI", "False"));
                //isCheckUpload = true;
                //for (int i = 0; i < 4; i++)
                //{
                //    uploadSoftwareStatus[i] = new UploadSoftwareStatus(i);
                //}
                Async.RunFuncAsync(checkCtrlNet, null);
                Async.RunFuncAsync(checkTestSentNet, null);
                Async.RunFuncAsync(checkTestReceiveNet, null);
                Async.RunFuncAsync(checkIOReceiveNet, null);
                Async.RunFuncAsync(checkTestSentFlexNet, null);
                Async.RunFuncAsync(checkTestReceiveFlexNet, null);
                Async.RunFuncAsync(checkMsgReceiveNet, null);

                Async.RunFuncAsync(GetStatus, null);
                Async.RunFuncAsync(TestRevAnalysis, null);
                Async.RunFuncAsync(TestRevFlexAnalysis, null);
                Async.RunFuncAsync(MsgRevAnalysis, null);
                Async.RunFuncAsync(IORevAnalysis, null);
                Async.RunFuncAsync(EpsonRC90Init, null);
            }
            catch (Exception ex)
            {
                Log.Default.Error("EpsonRC90.EpsonRC90()", ex.Message);
            }
        }