public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section + "/Sort" + SortName);
     xml.Write("MinSpec", MinSpec);
     xml.Write("MaxSpec", MaxSpec);
     xml.CloseSection();
 }
 public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section + "/DetectCondition" + Name);
     xml.Write("RowTopic", RowTopic);
     xml.Write("ColTopic", ColTopic);
     xml.CloseSection();
 }
 public void Save()
 {
     xml.OpenSection("Counter");
     xml.Write("InputEEDycemCleaningCount", inputEEDycemCleaningCount.ToString());
     xml.Write("OutputEEDycemCleaningCount", outputEEDycemCleaningCount.ToString());
     xml.Write("StartDateTime", startDateTime.ToString());
     xml.CloseSection();
     xml.Save();
 }
        /// <summary>
        /// Saves to an xml obejct
        /// </summary>
        /// <param name="section"></param>
        /// <param name="xml"></param>
        public void Save(string section, SettingsXml xml)
        {
            xml.OpenSection(section + "/" + _name);
            xml.Write("Exposure", _exposure);
            xml.Write("Brightness", _brightness);
            xml.Write("Contrast", _contrast);
            xml.Write("RingLightIntensity", _ringLightIntensity);
            xml.Write("ThruLightIntensity", _thruLightIntensity);
            xml.CloseSection();

            _imageGraphics.Save(section + "/" + _name, xml);
        }
 public void Save()
 {
     foreach (KeyValuePair <string, FormPosition> kvp in _fromLayoutTalbe)
     {
         _xml.OpenSection(kvp.Key);
         _xml.Write("X", kvp.Value.X);
         _xml.Write("Y", kvp.Value.Y);
         _xml.Write("Width", kvp.Value.Width);
         _xml.Write("Height", kvp.Value.Height);
         _xml.Write("WindowState", kvp.Value.WindowState);
         _xml.CloseSection();
     }
     _xml.Save();
 }
Beispiel #6
0
 public void Save()
 {
     _xml.Write("LastRunRecipeName", CommonFunctions.Instance.ProductRecipeName);
     AxesProfile.Save("MoveProfile", _xml);
     DelayTimer.Save("DelayTimer", _xml);
     _xml.Save();
 }
        public void Save()
        {
            if (OnSettingsChanged != null)
            {
                OnSettingsChanged(this, null);
            }

            _xml.OpenSection("TestProbe");
            _xml.Write("COMPort", TestProbe.COMPort.ToString());
            _xml.Write("BaudRate", TestProbe.BaudRate.ToString());
            _xml.Write("StopBits", TestProbe.StopBits.ToString());
            _xml.Write("Parity", TestProbe.Parity.ToString());
            _xml.Write("DataBits", TestProbe.DataBits.ToString());
            _xml.CloseSection();

            _xml.Save();
        }
Beispiel #8
0
 public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section);
     xml.Write("LastCheckByHourActive", _lastCheckByHourActive);
     xml.Write("LastCheckByPartCountActive", _lastCheckByPartCountActive);
     xml.Write("EnabledResistanceCheck", _enabledCheck);
     xml.Write("OverallTestResult", _overallTestResult);
     xml.Write("CheckByHourCounter", _checkByHourCounter);
     xml.Write("CheckByPartCounter", _checkByPartCounter);
     xml.Write("ResistanceCriticalActivated", _resistanceCriticalAtivated);
     xml.Write("IsRetestProcessRequired", _isRetestProcessRequired);
     xml.Write("Type", _checkType.ToString());
     xml.CloseSection();
 }
        public void Save(SettingsXml xml, string section)
        {
            int pid = 0;

            foreach (HGAProductType item in HGAProduct)
            {
                pid++;
                var pidname = string.Format("PID{0}", pid.ToString());
                xml.OpenSection(section);
                xml.Write(pidname + "/ProductName", item.Name);
                xml.Write(pidname + "/ConversionBoardID", item.ConversionBoardID.ToString());
                xml.Write(pidname + "/HGAProductTailType", item.HGATailType.ToString());
                xml.Write(pidname + "/TestProbeType", item.TestProbeType);
                xml.Write(pidname + "/GlobalPath", item.RecipeGlobalPath);
                xml.CloseSection();
            }
            xml.Save();
        }
Beispiel #10
0
        public static void SaveHelper(string section, SettingsXml xml, object obj)
        {
            xml.OpenSection(section);
            // Loop through all properties of this type and read from
            // config based on property's name.

            foreach (PropertyInfo pi in obj.GetType().GetProperties())
            {
                if (pi.PropertyType == typeof(String))
                {
                    xml.Write(pi.Name, (String)pi.GetValue(obj, null));
                }

                if (pi.PropertyType == typeof(Int32))
                {
                    xml.Write(pi.Name, (Int32)pi.GetValue(obj, null));
                }

                if (pi.PropertyType == typeof(Double))
                {
                    xml.Write(pi.Name, (Double)pi.GetValue(obj, null));
                }

                if (pi.PropertyType == typeof(Boolean))
                {
                    xml.Write(pi.Name, (Boolean)pi.GetValue(obj, null));
                }

                if (pi.PropertyType == typeof(MoveProfileBase) && pi.CanWrite)
                {
                    MoveProfileBase mp = (MoveProfileBase)pi.GetValue(obj, null);
                    xml.Write(pi.Name + "/" + "Acceleration", (Double)mp.Acceleration);
                    xml.Write(pi.Name + "/" + "Deceleration", (Double)mp.Deceleration);
                    xml.Write(pi.Name + "/" + "Velocity", (Double)mp.Velocity);
                }
            }
            xml.CloseSection();
        }
        public void Save()
        {
            if (OnSettingsChanged != null)
            {
                OnSettingsChanged(this, null);
            }

            _xml.OpenSection("Config");

            // Loop through all properties of this type and read from
            // config based on property's name.
            foreach (PropertyInfo pi in this.GetType().GetProperties())
            {
                if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe
                {
                    continue;
                }

                if (pi.PropertyType == typeof(String))
                {
                    _xml.Write(pi.Name, (String)pi.GetValue(this, null));
                }
                if (pi.PropertyType == typeof(Int32))
                {
                    _xml.Write(pi.Name, (Int32)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Double))
                {
                    _xml.Write(pi.Name, (Double)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Boolean))
                {
                    _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null));
                }
                if (pi.PropertyType.IsEnum == true)
                {
                    _xml.Write(pi.Name, (int)pi.GetValue(this, null));
                }
            }


            _xml.OpenSection("MoveProfile/InputEEZ/");
            _xml.Write("Acceleration", MoveProfile.InputEEZ.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.InputEEZ.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.InputEEZ.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MoveProfile/PrecisorX/");
            _xml.Write("Acceleration", MoveProfile.PrecisorX.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.PrecisorX.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.PrecisorX.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MoveProfile/PrecisorY/");
            _xml.Write("Acceleration", MoveProfile.PrecisorY.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.PrecisorY.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.PrecisorY.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MoveProfile/PrecisorTheta/");
            _xml.Write("Acceleration", MoveProfile.PrecisorTheta.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.PrecisorTheta.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.PrecisorTheta.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MoveProfile/TestProbeZ/");
            _xml.Write("Acceleration", MoveProfile.TestProbeZ.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.TestProbeZ.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.TestProbeZ.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MoveProfile/OutputEEZ/");
            _xml.Write("Acceleration", MoveProfile.OutputEEZ.Acceleration.ToString());
            _xml.Write("Deceleration", MoveProfile.OutputEEZ.Deceleration.ToString());
            _xml.Write("Velocity", MoveProfile.OutputEEZ.Velocity.ToString());
            _xml.CloseSection();

            _xml.OpenSection("DelayTimer");
            _xml.Write("VacuumOnDelay", Delay.VacuumOnDelay.ToString());
            _xml.Write("VacuumOffDelay", Delay.VacuumOffDelay.ToString());
            _xml.CloseSection();


            _xml.Save();

            HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility();
        }
Beispiel #12
0
        public void Save(string section, SettingsXml xml)
        {
            xml.OpenSection(section);
            xml.Write("TicFailCounter", TicFailCounter);
            xml.Write("HstFailCounter", HstFailCounter);
            xml.Write("TicDefactCounter", TicDefactCounter);
            xml.Write("HstDefactCounter", HstDefactCounter);
            xml.Write("TicGoodPartCounter", TicGoodPartCounter);
            xml.Write("HstGoodPartCounter", HstGoodPartCounter);
            xml.Write("AdaptivePartRunCounter", AdaptivePartRunCounter);
            xml.Write("AdaptiveDefectCounter", AdaptiveDefectCounter);
            xml.Write("LastSaveLogTime", LastSaveLogTime.ToString("dd-MMM-yy:HH:mm:ss"));
            xml.Write("MCDownTriggering", MCDownTriggering);
            xml.Write("TicHighPercentTriggeringCounter", TicHighPercentTriggeringCounter);
            xml.Write("HstHighPercentTriggeringCounter", HstHighPercentTriggeringCounter);
            xml.Write("InternalTriggerCounter", InternalTriggerCounter);
            xml.Write("uTICMachineName", uTICMachineName);

            xml.CloseSection();
        }
Beispiel #13
0
 public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section);
     xml.Write("Enabled", Enabled);
     xml.Write("EnableAlertMag", EnableAlertMsg);
     xml.Write("YeildTarget", YeildTarget);
     xml.Write("YeildLimit", YeildLimit);
     xml.Write("Alpha", Alpha);
     xml.Write("DefectCounterLimit", DefectCounterLimit);
     xml.Write("TestRunGroup", TestRunGroup);
     xml.Write("TimeToIgnoreAfterRepair", TimeToIgnoreAfterRepair);
     xml.Write("PartCounterYieldPerShortPeriod", PartCounterYieldPerShortPeriod);
     xml.Write("PartCounterYieldPerLongPeriod", PartCounterYieldPerLongPeriod);
     xml.Write("DelayForReleaseCarrier", DelayForReleaseCarrier);
     xml.CloseSection();
 }
        public void Save()
        {
            if (OnSettingsChanged != null)
            {
                OnSettingsChanged(this, null);
            }

            File.Create(HSTMachine.Workcell.HSTSettings.CalibrationSettingsFilePath).Dispose();

            _xml = new SettingsXml(HSTMachine.Workcell.HSTSettings.CalibrationSettingsFilePath);
            _xml.OpenSection("Config");

            // Loop through all properties of this type and read from
            // config based on property's name.
            foreach (PropertyInfo pi in this.GetType().GetProperties())
            {
                if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe
                {
                    continue;
                }

                if (pi.PropertyType == typeof(String))
                {
                    _xml.Write(pi.Name, (String)pi.GetValue(this, null));
                }
                if (pi.PropertyType == typeof(Int32))
                {
                    _xml.Write(pi.Name, (Int32)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Double))
                {
                    _xml.Write(pi.Name, (Double)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Boolean))
                {
                    _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null));
                }
                if (pi.PropertyType.IsEnum == true)
                {
                    _xml.Write(pi.Name, (int)pi.GetValue(this, null));
                }
            }

            _xml.OpenSection("RFID");
            _xml.Write("RFIDCOMPort", RFID.RFIDCOMPort.ToString());
            _xml.Write("RFIDBaudRate", RFID.RFIDBaudRate.ToString());
            _xml.Write("RFIDStopBits", RFID.RFIDStopBits.ToString());
            _xml.Write("RFIDParity", RFID.RFIDParity.ToString());
            _xml.Write("RFIDDataBits", RFID.RFIDDataBits.ToString());
            _xml.CloseSection();

            _xml.OpenSection("MeasurementTest");
            _xml.Write("COMPort", MeasurementTest.COMPort.ToString());
            _xml.Write("BaudRate", MeasurementTest.BaudRate.ToString());
            _xml.Write("StopBits", MeasurementTest.StopBits.ToString());
            _xml.Write("Parity", MeasurementTest.Parity.ToString());
            _xml.Write("DataBits", MeasurementTest.DataBits.ToString());
            _xml.Write("CurrentInstalledTestProbeType", MeasurementTest.CurrentInstalledTestProbeType.ToString());

            int i = 0;

            foreach (TestProbeType TestProbeType in MeasurementTest.TestProbeTypes)
            {
                string CurrentTestProbe = "TestProbe" + (i++);

                _xml.Write(CurrentTestProbe + "TestProbeName", TestProbeType.Name);
            }
            _xml.CloseSection();

            _xml.OpenSection("Camera");
            _xml.Write("InputCamera_Recipe", Vision.InputCamera.Recipe.ToString());
            _xml.Write("InputCamera_ImagesOutputPath", Vision.InputCamera.ImagesOutputPath.ToString());
            _xml.Write("InputCamera_SaveAllImages", Vision.InputCamera.SaveAllImages.ToString());
            _xml.Write("InputCamera_SaveImagesLessThanTenHGAs", Vision.InputCamera.SaveImagesLessThanTenHGAs.ToString());
            _xml.Write("InputCamera_SerialNumber", Vision.InputCamera.CameraSerialNumber.ToString());
            _xml.Write("Input_TotalDayToStoreImage", Vision.InputCamera.TotalDayToStoreImage.ToString());

            _xml.Write("OutputCamera_Recipe", Vision.OutputCamera.Recipe.ToString());
            _xml.Write("OutputCamera_ImagesOutputPath", Vision.OutputCamera.ImagesOutputPath.ToString());
            _xml.Write("OutputCamera_SaveAllImages", Vision.OutputCamera.SaveAllImages.ToString());
            _xml.Write("OutputCamera_SaveImagesLessThanTenHGAs", Vision.OutputCamera.SaveImagesLessThanTenHGAs.ToString());
            _xml.Write("OutputCamera_SerialNumber", Vision.OutputCamera.CameraSerialNumber.ToString());
            _xml.Write("Output_TotalDayToStoreImage", Vision.OutputCamera.TotalDayToStoreImage.ToString());
            _xml.CloseSection();

            _xml.OpenSection("SafetyController");
            _xml.Write("COMPort", SafetyController.COMPort.ToString());
            _xml.Write("BaudRate", SafetyController.BaudRate.ToString());
            _xml.Write("StopBits", SafetyController.StopBits.ToString());
            _xml.Write("Parity", SafetyController.Parity.ToString());
            _xml.Write("DataBits", SafetyController.DataBits.ToString());
            _xml.CloseSection();

            _xml.CloseSection();
            _xml.Save();

            HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility();
        }
Beispiel #15
0
 public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section);
     xml.Write("TrigerByCarrierEnable", _triggeringByCarrierEnable);
     xml.Write("TrigerByCarrierCount", _triggerByCarrierCount);
     xml.Write("TriggerByCarrierHour", _triggerByCarrierHour);
     xml.Write("FailurePhase1Min", _failurePhase1Min);
     xml.Write("FailurePhase2Min", _failurePhase2Min);
     xml.Write("PerCarrierCounter", _perCarrierCounter);
     xml.Write("PerHourCounter", _perHourCounter);
     xml.Write("TotalCarrierForBuyOff", _totalBuyoffCarrier);
     xml.Write("TriggerByErrorCodeEnabled", _triggeringByErrorCodeEnable);
     xml.Write("TriggerByErrorCodePercent", _errorCodeFailurePercent);
     xml.Write("TriggerByErrorCodePartRunCounter", _errorCodePartRunCounter);
     xml.Write("TriggerByErrorCodeFailureCounter", _errorCodeFailureCounter);
     xml.Write("ErrorCodeTriggeringActivate", _errorCodeTriggeringActivate);
     xml.Write("TriggerByErrorCodePartPerPeriod", _errorCodePartPerPeriod);
     xml.Write("DoubleTestDelayTime", _doubletestdelayTime);
     xml.CloseSection();
 }
Beispiel #16
0
        private void btnSaveRecipe_Click(object sender, EventArgs e)
        {
            string FunctionalTestsRecipeFilePath = string.Format("{0}FunctionalTestsRecipe.rcp", CommonFunctions.Instance.RecipeFileDirectory);

            if (!Directory.Exists(CommonFunctions.Instance.RecipeFileDirectory))
            {
                Directory.CreateDirectory(CommonFunctions.Instance.RecipeFileDirectory);
            }

            Log.Info("Startup", "Saving recipe for functional tests to {0}.", FunctionalTestsRecipeFilePath);

            SettingsXml _xml = new SettingsXml(FunctionalTestsRecipeFilePath);

            _xml.OpenSection("ZeroOhm");
            // 0Ohm
            _xml.Write("Ch1WriterResistance0Ohm", txtFunctionalTests0CH1.Text);
            _xml.Write("Ch2TAResistance0Ohm", txtFunctionalTests0CH2.Text);
            _xml.Write("Ch3WHResistance0Ohm", txtFunctionalTests0CH3.Text);
            _xml.Write("Ch4RHResistance0Ohm", txtFunctionalTests0CH4.Text);
            _xml.Write("Ch5R1Resistance0Ohm", txtFunctionalTests0CH5.Text);
            _xml.Write("Ch6R2Resistance0Ohm", txtFunctionalTests0CH6.Text);
            _xml.CloseSection();

            _xml.OpenSection("TenOhm");
            // 10Ohm
            _xml.Write("Ch1WriterResistance10Ohm", txtFunctionalTests10CH1.Text);
            _xml.Write("Ch2TAResistance10Ohm", txtFunctionalTests10CH2.Text);
            _xml.Write("Ch3WHResistance10Ohm", txtFunctionalTests10CH3.Text);
            _xml.Write("Ch4RHResistance10Ohm", txtFunctionalTests10CH4.Text);
            _xml.Write("Ch5R1Resistance10Ohm", txtFunctionalTests10CH5.Text);
            _xml.Write("Ch6R2Resistance10Ohm", txtFunctionalTests10CH6.Text);
            _xml.CloseSection();

            _xml.OpenSection("OneHundredOhm");
            // 100Ohm
            _xml.Write("Ch1WriterResistance100Ohm", txtFunctionalTests100CH1.Text);
            _xml.Write("Ch2TAResistance100Ohm", txtFunctionalTests100CH2.Text);
            _xml.Write("Ch3WHResistance100Ohm", txtFunctionalTests100CH3.Text);
            _xml.Write("Ch4RHResistance100Ohm", txtFunctionalTests100CH4.Text);
            _xml.Write("Ch5R1Resistance100Ohm", txtFunctionalTests100CH5.Text);
            _xml.Write("Ch6R2Resistance100Ohm", txtFunctionalTests100CH6.Text);
            _xml.CloseSection();

            _xml.OpenSection("FiveHundredOhm");
            // 500Ohm
            _xml.Write("Ch1WriterResistance500Ohm", txtFunctionalTests500CH1.Text);
            _xml.Write("Ch2TAResistance500Ohm", txtFunctionalTests500CH2.Text);
            _xml.Write("Ch3WHResistance500Ohm", txtFunctionalTests500CH3.Text);
            _xml.Write("Ch4RHResistance500Ohm", txtFunctionalTests500CH4.Text);
            _xml.Write("Ch5R1Resistance500Ohm", txtFunctionalTests500CH5.Text);
            _xml.Write("Ch6R2Resistance500Ohm", txtFunctionalTests500CH6.Text);
            _xml.CloseSection();

            _xml.OpenSection("OneThousandOhm");
            // 1000Ohm
            _xml.Write("Ch1WriterResistance1000Ohm", txtFunctionalTests1000CH1.Text);
            _xml.Write("Ch2TAResistance1000Ohm", txtFunctionalTests1000CH2.Text);
            _xml.Write("Ch3WHResistance1000Ohm", txtFunctionalTests1000CH3.Text);
            _xml.Write("Ch4RHResistance1000Ohm", txtFunctionalTests1000CH4.Text);
            _xml.Write("Ch5R1Resistance1000Ohm", txtFunctionalTests1000CH5.Text);
            _xml.Write("Ch6R2Resistance1000Ohm", txtFunctionalTests1000CH6.Text);
            _xml.CloseSection();

            _xml.OpenSection("TenThousandOhm");
            // 10000Ohm
            _xml.Write("Ch1WriterResistance10000Ohm", txtFunctionalTests10000CH1.Text);
            _xml.Write("Ch2TAResistance10000Ohm", txtFunctionalTests10000CH2.Text);
            _xml.Write("Ch3WHResistance10000Ohm", txtFunctionalTests10000CH3.Text);
            _xml.Write("Ch4RHResistance10000Ohm", txtFunctionalTests10000CH4.Text);
            _xml.Write("Ch5R1Resistance10000Ohm", txtFunctionalTests10000CH5.Text);
            _xml.Write("Ch6R2Resistance10000Ohm", txtFunctionalTests10000CH6.Text);
            _xml.CloseSection();


            _xml.OpenSection("Capacitance");
            // Capacitance
            _xml.Write("Capacitance100pF", txtFunctionalTests100Capa.Text);
            _xml.Write("Capacitance270pF", txtFunctionalTests270Capa.Text);
            _xml.Write("Capacitance470pF", txtFunctionalTests470Capa.Text);
            _xml.Write("Capacitance680pF", txtFunctionalTests680Capa.Text);
            _xml.Write("Capacitance820pF", txtFunctionalTests820Capa.Text);
            _xml.Write("Capacitance10nF", txtFunctionalTests10000Capa.Text);
            _xml.CloseSection();

            _xml.OpenSection("Temperature");
            // Temperature
            _xml.Write("Ch1Temperature", txtFunctionalTests0Temp.Text);
            _xml.Write("Ch2Temperature", txtFunctionalTests50Temp.Text);
            _xml.Write("Ch3Temperature", txtFunctionalTests100Temp.Text);
            _xml.CloseSection();

            _xml.Save();
        }
Beispiel #17
0
        public void Save()
        {
            if (OnSettingsChanged != null)
            {
                OnSettingsChanged(this, null);
            }
            if (string.Compare(Directory.TSRRecipeGlobalPath, Directory.TSRRecipLocalPath) == 0)
            {
                Notify.PopUp("WorkOrder Error", "WorkOrder global path and local path should not be the same location, please check directory setting!", "", "OK");
                return;
            }
            File.Create(this.HSTSettingsFilePath).Dispose();

            _xml = new SettingsXml(this.HSTSettingsFilePath);
            _xml.OpenSection("Config");

            // Loop through all properties of this type and read from
            // config based on property's name.
            foreach (PropertyInfo pi in this.GetType().GetProperties())
            {
                if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe
                {
                    continue;
                }

                if (pi.PropertyType == typeof(String))
                {
                    _xml.Write(pi.Name, (String)pi.GetValue(this, null));
                }
                if (pi.PropertyType == typeof(Int32))
                {
                    _xml.Write(pi.Name, (Int32)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Double))
                {
                    _xml.Write(pi.Name, (Double)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Boolean))
                {
                    _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null));
                }
                if (pi.PropertyType.IsEnum == true)
                {
                    _xml.Write(pi.Name, (int)pi.GetValue(this, null));
                }
            }

            _xml.Write("OperatorGID", OperatorGID);
            _xml.CloseSection();
            // Any other types goes here.

            _xml.OpenSection("Install");
            _xml.Write("EquipmentID", Install.EquipmentID);
            _xml.Write("LocationID", Install.LocationID);
            _xml.Write("CellID", Install.CellID);
            _xml.Write("Factory", Install.Factory.ToString());

            if (Install.LocationID.Length > 7)
            {
                Install.LocationID = Install.LocationID.Substring(0, 7);
            }
            if (Install.CellID.Length > 7)
            {
                Install.CellID = Install.CellID.Substring(0, 7);
            }
            // Disable simulation if vision is enabled
            if (Install.EnableVision == true)
            {
                if (Install.OperationMode == OperationMode.Simulation)
                {
                    Install.OperationMode             = OperationMode.Auto;
                    HSTMachine.Workcell.OperationMode = OperationMode.Auto;
                }
            }

            _xml.Write("OperationMode", HSTMachine.Workcell.OperationMode.ToString());
            _xml.Write("EnableDebugLog", Install.EnableDebugLog);
            _xml.Write("AudibleAlarmEnabled", Install.AudibleAlarmEnabled);
            _xml.Write("DataLoggingFileSavingEnabled", Install.DataLoggingFileSavingEnabled);
            _xml.Write("ProcessStepCheckingEnabled", Install.ProcessStepCheckingEnabled);
            _xml.Write("DataLoggingForRFIDAndSeatrackRecordUpdateEnabled", Install.DataLoggingForRFIDAndSeatrackRecordUpdateEnabled);
            _xml.Write("SeatrackRecordUpdateEnabled", Install.SeatrackRecordUpdateEnabled);
            _xml.Write("ClearImproperShutDownMessage", Install.ClearImproperShutDownMessage);
            _xml.Write("EnableRunTestScriptButton", Install.EnableRunTestScriptButton);
            _xml.Write("TestScript", Install.TestScript);
            _xml.Write("LogIOChangeState", Install.LogIOChangeState);
            _xml.Write("HGADetectionUsingVision", Install.HGADetectionUsingVision);
            _xml.Write("EnableVision", Install.EnableVision);
            _xml.Write("ConveyorCongestionToleranceTimeLimit", Install.ConveyorCongestionToleranceTimeLimit);
            _xml.Write("MeasurementTestTimeOutLimit", Install.MeasurementTestTimeOutLimit);
            _xml.Write("HGAPurgingDurationInms", Install.HGAPurgingDurationInms);
            _xml.Write("TICFailHGAsInBoatLimit", Install.TICFailHGAsInBoatLimit);
            _xml.Write("TICConsecutiveFailBoatsLimit", Install.TICConsecutiveFailBoatsLimit);
            _xml.Write("TICFailHGAsTotalLimit", Install.TICFailHGAsTotalLimit);
            _xml.Write("TICErrorCountingTimeInterval", Install.TICErrorCountingTimeInterval);
            _xml.Write("ConsecutiveFailBoatsFailPickupByInputEE", Install.ConsecutiveFailBoatsFailPickupByInputEE);
            _xml.Write("FlattenerDeployBeforePrecisorVaccumON", Install.FlattenerDeployBeforePrecisorVaccumON);
            _xml.Write("FlattenerDeployDuration", Install.FlattenerDeployDuration);
            _xml.Write("EnableFlattener", Install.EnableFlattenerAsPrecisor);
            _xml.Write("EnableFlattenerAsInput", Install.EnableFlattenerAsInput);
            _xml.Write("EnableMaintenanceSpeedForManualMove", Install.EnableMaintenanceSpeedForManualMove);
            _xml.Write("RFIDUpdateOption", Install.RFIDUpdateOption.ToString());
            _xml.Write("InputEETouchingOnDycemDuration", Install.InputEETouchingOnDycemDuration);
            _xml.Write("OutputEETouchingOnDycemDuration", Install.OutputEETouchingOnDycemDuration);
            _xml.Write("TotalNumberOfInputEETouchingOnDycem", Install.TotalNumberOfInputEETouchingOnDycem);
            _xml.Write("TotalNumberOfOutputEETouchingOnDycem", Install.TotalNumberOfOutputEETouchingOnDycem);
            _xml.Write("CapacitanceTestSamplingSize", Install.CapacitanceTestSamplingSize);
            _xml.Write("EnabledTDFSystem", Install.EnabledTDFFileSystem);
            _xml.Write("EnabledSaveTDFFileOnly", Install.EnabledSaveTDFFileOnly);
            _xml.Write("EnabledSaveTDFBackupFile", Install.EnabledSaveTDFBackupFile);
            _xml.Write("EnabledUserAccessControl", Install.EnabledUserAccessControl);
            _xml.Write("DataRecordDisplayCounter", Install.DataRecordDisplayCounter);
            _xml.Write("ANCGraphCounterMaximum", Install.ANCGraphCounterMaximum);

            _xml.CloseSection();


            _xml.OpenSection("Directories");
            _xml.Write("LocalRecipePath", Directory.WorkorderLocalPath);
            _xml.Write("GlobalRecipePath", Directory.WorkorderGlobalPath);
            _xml.Write("LogFilePath", Directory.LogFilePath);
            _xml.Write("WorkOrderPath", Directory.TSRRecipLocalPath);
            _xml.Write("DataPath", Directory.DataPath);
            _xml.Write("ErrorHandlingPath", Directory.ErrorHandlingPath);
            _xml.Write("ServerDirectoryForWorkOrder", Directory.TSRRecipeGlobalPath);
            _xml.Write("IOChangeStatePath", Directory.IOChangeStatePath);
            _xml.Write("McConfigGlobalPath", Directory.McConfigGlobalPath);
            _xml.Write("MachineRobotPointPath", Directory.MachineRobotPointPath);

            _xml.CloseSection();

            _xml.OpenSection("SimulatedPart");

            int i = 0;

            foreach (CarrierSettings CurrentCarrier in SimulatedPart.Carriers)
            {
                string CurrentCarrierLabel = "Carrier" + (i++);

                _xml.Write(CurrentCarrierLabel + "CarrierID", CurrentCarrier.CarrierID);
                _xml.Write(CurrentCarrierLabel + "Name", CurrentCarrier.Name);
                _xml.Write(CurrentCarrierLabel + "ImageFileName", CurrentCarrier.ImageFileName);
                _xml.Write(CurrentCarrierLabel + "RFIDFileName", CurrentCarrier.RFIDFileName);
                _xml.Write(CurrentCarrierLabel + "IsPassThroughMode", CurrentCarrier.IsPassThroughMode);
                _xml.Write(CurrentCarrierLabel + "HGA1Status", CurrentCarrier.Hga1.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA2Status", CurrentCarrier.Hga2.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA3Status", CurrentCarrier.Hga3.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA4Status", CurrentCarrier.Hga4.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA5Status", CurrentCarrier.Hga5.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA6Status", CurrentCarrier.Hga6.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA7Status", CurrentCarrier.Hga7.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA8Status", CurrentCarrier.Hga8.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA9Status", CurrentCarrier.Hga9.Hga_Status.ToString());
                _xml.Write(CurrentCarrierLabel + "HGA10Status", CurrentCarrier.Hga10.Hga_Status.ToString());
            }

            _xml.CloseSection();


            Install.BypassInputAndOutputEEsPickAndPlace = HSTMachine.Workcell.getPanelSetup().chkBypassInputAndOutputEEsPickAndPlace.Checked;
            Install.BypassMeasurementTestAtTestProbe    = HSTMachine.Workcell.getPanelSetup().chkBypassMeasurementTestAtTestProbe.Checked;
            Install.BypassRFIDReadAtInput = HSTMachine.Workcell.getPanelSetup().chkBypassRFIDReadAtInputStation.Checked;
            Install.BypassRFIDAndSeatrackWriteAtOutput = HSTMachine.Workcell.getPanelSetup().chkBypassRFIDAndSeatrackWriteAtOutputStation.Checked;
            Install.BypassVisionAtInputTurnStation     = HSTMachine.Workcell.getPanelSetup().chkBypassVisionAtInputTurnStation.Checked;
            Install.BypassVisionAtOutput = HSTMachine.Workcell.getPanelSetup().chkBypassVisionAtOutputStation.Checked;
            Install.DryRunWithoutBoat    = HSTMachine.Workcell.getPanelSetup().rdoWithoutBoat.Checked;

            _xml.OpenSection("Bypass");
            _xml.Write("BypassInputAndOutputEEsPickAndPlace", Install.BypassInputAndOutputEEsPickAndPlace);
            _xml.Write("BypassMeasurementTestAtTestProbe", Install.BypassMeasurementTestAtTestProbe);
            _xml.Write("BypassRFIDReadAtInput", Install.BypassRFIDReadAtInput);
            _xml.Write("BypassRFIDAndSeatrackWriteAtOutput", Install.BypassRFIDAndSeatrackWriteAtOutput);
            _xml.Write("BypassVisionAtInputTurnStation", Install.BypassVisionAtInputTurnStation);
            _xml.Write("BypassVisionAtOutput", Install.BypassVisionAtOutput);
            _xml.Write("WorkOrderFilePath", Install.WorkOrderFilePath);
            _xml.CloseSection();

            _xml.OpenSection("DryRun");
            _xml.Write("DryRunWithoutBoat", Install.DryRunWithoutBoat);
            _xml.CloseSection();

            _xml.CloseSection();

            _configPerformance.Save("PerformanceConfig", _xml);
            _triggeringConfig.Save("TriggeringConfig", _xml);
            _resistanceCheckingConfig.Save("ResistanceChecking", _xml);
            _cccParameterSetting.Save("CCCParameterSetting", _xml);
            _cccCrdlParameterSetting.Save("CccCrdlParameterSetting", _xml);

            if (HSTMachine.Workcell.TICCccControl != null)
            {
                _hstCCCCounter.CCCCounterAllMc.CCCCounterForHst  = HSTMachine.Workcell.TICCccControl.CCCControlAllMc.CccResult.OutputCounter;
                _hstCCCCounter.CCCCounterTicMc1.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc1.CccResult.OutputCounter;
                _hstCCCCounter.CCCCounterTicMc2.CCCCounterForHst = HSTMachine.Workcell.TICCccControl.CCCControlTicMc2.CccResult.OutputCounter;
                _hstCCCCounter.Save("TicCounter", _xml);
            }
            _xml.Save();

            Install.OperationMode       = HSTMachine.Workcell.OperationMode;
            HSTMachine.Workcell.RunMode = HSTMachine.Workcell.OperationMode;
            HSTMachine.Instance.MainForm.getPanelCommand().DebugButtonsVisibility();
        }
        public void Save(string section, SettingsXml xml)
        {
            xml.OpenSection(section + "/Marker");
            xml.Write("markerType", (int)_markerType);
            xml.Write("markerWidth", _markerWidth);
            xml.Write("markerHeight", _markerHeight);
            xml.Write("XYAxesHatchSize", _xyAxesHatchSize);
            xml.Write("XYAxesHatchInc", _xyAxesHatchInc);
            xml.Write("ShowCrossHair", _showCrossHair);
            xml.Write("ShowAxes", _showAxes);
            xml.CloseSection();

            xml.OpenSection(section + "/Measurement");
            xml.Write("DistMeasureLineStartX", _distMeasureLineStartX);
            xml.Write("DistMeasureLineStartY", _distMeasureLineStartY);
            xml.Write("DistMeasureLineEndX", _distMeasureLineEndX);
            xml.Write("DistMeasureLineEndY", _distMeasureLineEndY);
            xml.Write("ShowMeasurementLine", _showMeasurementLine);
            xml.CloseSection();
        }
        public void Save()
        {
            File.Create(this.GompertzSettingFilePath).Dispose();

            _xml = new SettingsXml(this.GompertzSettingFilePath);
            _xml.OpenSection("Settings");

            // Loop through all properties of this type and read from
            // config based on property's name.
            foreach (PropertyInfo pi in this.GetType().GetProperties())
            {
                if (!pi.CanWrite) // Avoid saving readonly property to config file such as IsAutoRecipe
                {
                    continue;
                }

                if (pi.PropertyType == typeof(String))
                {
                    _xml.Write(pi.Name, (String)pi.GetValue(this, null));
                }
                if (pi.PropertyType == typeof(Int32))
                {
                    _xml.Write(pi.Name, (Int32)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Double))
                {
                    _xml.Write(pi.Name, (Double)pi.GetValue(this, null));
                }

                if (pi.PropertyType == typeof(Boolean))
                {
                    _xml.Write(pi.Name, (Boolean)pi.GetValue(this, null));
                }
                if (pi.PropertyType.IsEnum == true)
                {
                    _xml.Write(pi.Name, (int)pi.GetValue(this, null));
                }
            }


            //   _xml.Write("SSEInitial", SSEInitial.ToString());
            //    _xml.Write("RSQInitial", RSQInitial.ToString());
            _xml.Write("amin", amin.ToString());
            _xml.Write("amax", amax.ToString());
            _xml.Write("bmin", bmin.ToString());
            _xml.Write("bmax", bmax.ToString());

            _xml.Write("cmin", cmin.ToString());
            _xml.Write("cmax", cmax.ToString());
            _xml.Write("dmin", dmin.ToString());
            _xml.Write("dmax", dmax.ToString());
            //    _xml.Write("randomscale", randomscale.ToString());
            //    _xml.Write("weight", weight.ToString());

            //    _xml.Write("adaptiveSearch_A", adaptiveSearch_A.ToString());
            //    _xml.Write("adaptiveSearch_B", adaptiveSearch_B.ToString());
            //    _xml.Write("adaptiveSearch_C", adaptiveSearch_C.ToString());
            //    _xml.Write("adaptiveSearch_D", adaptiveSearch_D.ToString());
            //    _xml.Write("HardLimit_RSQ", HardLimit_RSQ.ToString());
            //    _xml.Write("HardLimit_SSE", HardLimit_SSE.ToString());

            //   _xml.Write("MaxTest", MaxTest.ToString());
            _xml.Write("Step", Step.ToString());
            //    _xml.Write("Iteration", Iteration.ToString());
            _xml.Write("UseGompertz", UseGompertz.ToString());
            //    _xml.Write("TestTimePerHGA", TestTimePerHGA.ToString());
            _xml.Write("GompertzCalculationMethod", GompertzCalMethod.ToString());
            _xml.Write("Split", Split.ToString());
            _xml.CloseSection();
            _xml.Save();
        }
Beispiel #20
0
 public void Save()
 {
     HSTMachine.Workcell.HSTSettings.getConfigPerformance().UPH = uph;
     xml.OpenSection("Counter");
     xml.Write("ProcessedHGACount", processedHGACount.ToString());
     xml.Write("CycleTime", cycleTime.ToString());
     xml.Write("UPH", uph.ToString());
     xml.Write("UPH2", uph2.ToString());
     xml.Write("StartDateTime", startDateTime.ToString());
     xml.Write("SamplingCounter", _samplingCounter.ToString());
     xml.Write("LastSamplingReset", _lastSamplingCounterReset.ToString());
     CarrierTriggeringData.Save("CarrierTriggeringData", xml);
     xml.Write("LastActiveSamplingPartCount", _lastActiveSamplingPartCount.ToString());
     xml.Write("WRBridgeRunningPercentage", _wrBridgeRunningPercentage.ToString());
     xml.Write("LastWRBridgePercentage", _lastWRBridgePercentage);
     xml.Write("WriterBridgePartRunCounter", _writerBridgePartRunCounter);
     xml.CloseSection();
     xml.Save();
 }
Beispiel #21
0
 public void Save(string section, SettingsXml xml)
 {
     xml.OpenSection(section);
     xml.Write("LastActiveDate", _lastActiveDate);
     xml.Write("CounterBeforeTrig", _counterBeforeTrig);
     xml.Write("CounterAfterTriggering", _counterAfterTrig);
     xml.Write("TestPassCounter", _testPassCounter);
     xml.Write("TestFailCounter", _testFailCounter);
     xml.Write("ErrorCumulative", _errorCumulative);
     xml.Write("TotalPartRunCounter", _totalPartRunCounter);
     xml.Write("BuyOffProcessFinished", _buyOffProcessFinished);
     xml.Write("BuyOffProcessStarted", _buyOffProcessStarted);
     xml.Write("CriticalTriggeringActivated", _criticalTriggeringActivated);
     xml.Write("SamplingTriggeringOverPercentage", _samplingOverPercentageTriggeringActivated);
     xml.CloseSection();
 }