Example #1
0
 public L122A104(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     dacPara = Parameter as ParameterL122A104;
     slaveModuleInitialize();
     ResetDAC();
 }
Example #2
0
        private bool checkModuleIsSocket(ModulesType modulesType)
        {
            string   className     = ResourceHelper.Library.GetString("Module" + modulesType.ToString());
            Type     typeofControl = null;
            Assembly tempAssembly  = Assembly.Load(assemblyName);

            if (tempAssembly == null)
            {
                throw new Exception(ExceptionHelper.GetFullCurrentMethod(ResourceHelper.Language.GetString("AssemblyIsNull")));
            }
            if (className == null)
            {
                throw new Exception(ExceptionHelper.GetFullCurrentMethod(ResourceHelper.Language.GetString("WrongClassName") + "(" + modulesType.ToString() + ")"));
            }
            typeofControl = tempAssembly.GetType(className);

            if (typeofControl.BaseType.Name == "SocketModulesBase")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #3
0
 protected SerialModulesBase(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     serialPara = Parameter as ParameterSerial;
     serialInitialize();
     comportWriting = false;
     comportReading = false;
 }
Example #4
0
 public L132A104DAC(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     dacPara = Parameter as ParameterL132A104;
     slaveModuleInitialize();
     voltage = new double[] { 0, 0, 0, 0 };
     ResetDAC();
 }
Example #5
0
 public ModulesBase(ModulesType modulesType, string parameterFolderPath, string deviceName)
 {
     LanguageResourceManager = ResourceHelper.Language;
     ModulesType             = modulesType;
     ParameterFolderPath     = parameterFolderPath;
     DeviceName = deviceName;
     parameterInitialize();
 }
Example #6
0
        protected L122(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            masterCardInitialize();
            if (!g_bInitialFlag)
            {
                FlowControl flowControl = ModulesFactory.FlowControlHelper.GetFlowControl("SYNTEKMotion");

                g_bInitialFlag = true;
            }
        }
Example #7
0
        public L132DIO(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            dIOPara = Parameter as ParameterL132DIO;

            //system scan
            systemScanThread = new Thread(systemScan);
            systemScanThread.IsBackground = true;
            systemScanThread.Start();
            keyOfIOScan = true;
        }
Example #8
0
 public L132M1X1(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     busy     = new U16();
     axisPara = Parameter as ParameterL132M1X1;
     slaveModuleInitialize();
     setHardwareScan();
     taskInitialize();
     setMotion();
     axisPara.ParameterChanged += new ParameterINI.ParameterChangedHandler((paraName) => setMotion());
     ServoOn(CmdStatus.ON);
 }
Example #9
0
 public PD3(ModulesType modulesType, string xmlFilePath, string deviceName)
     : base(modulesType, xmlFilePath, deviceName)
 {
     if (modulesType == ModulesType.CCS_PD3_10024)
     {
         this.ModelName     = PD3Model.PD3_10024;
         this.ChannelNumber = 8;
     }
     else //modulesType == ModulesType.CCS_PD3_5024
     {
         this.ModelName     = PD3Model.PD3_5024;
         this.ChannelNumber = 4;
     }
     InitializeConfiguration(ParameterType.System);
 }
Example #10
0
        public L132A180ADC(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            adcPara = Parameter as ParameterL132A180;
            adcPara.ParameterChanged += new ParameterINI.ParameterChangedHandler((paraName) => { setADC(paraName); });
            slaveModuleInitialize();
            setADC();
            //system scan
            systemScanThread = new Thread(systemScan);
            systemScanThread.IsBackground = true;
            systemScanThread.Start();
            keyOfAdcScan = true;

            EnableDevice(CmdStatus.ON);
        }
Example #11
0
        public CEtherCATADC8124(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            adcPara = Parameter as ParameterCEtherCATADC8124;

            slaveModuleInitialize();

            ADCInitialize();
            //system scan
            FlowControl flowControl = ModulesFactory.FlowControlHelper.GetFlowControl("SYNTEKMotion");
            FlowBase    flowBase    = new FlowBase(this.DeviceName, systemScan);

            flowControl.AddFlowBase(flowBase);
            flowBase.Start();
            keyOfIOScan = true;
        }
Example #12
0
        public L122DIO(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            dIOPara = Parameter as ParameterL122DIO;

            //system scan
            FlowControl flowControl = ModulesFactory.FlowControlHelper.GetFlowControl("SYNTEKMotion");
            FlowBase    flowBase    = new FlowBase(this.DeviceName, systemScan);

            flowControl.AddFlowBase(flowBase);
            flowBase.Start();
            //systemScanThread = new Thread(systemScan);
            //systemScanThread.IsBackground = true;
            //systemScanThread.Start();
            keyOfIOScan = true;
        }
Example #13
0
        public CEtherCATDI6022(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            dIOPara = Parameter as ParameterCEtherCATDI6022;

            slaveModuleInitialize();

            if (ParameterDictionary.GetValue("DI6022BlockScan") == "true")
            {
                //system scan
                FlowControl flowControl = ModulesFactory.FlowControlHelper.GetFlowControl("SYNTEKMotion");
                FlowBase    flowBase    = new FlowBase(this.DeviceName, systemScan);
                flowControl.AddFlowBase(flowBase);
                flowBase.Start();
            }
            keyOfIOScan = true;
        }
Example #14
0
        protected CEtherCAT(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            if (!g_bInitialFlag)
            {
                PrepareErrorCodes();

                FlowControl           flowControl          = ModulesFactory.FlowControlHelper.GetFlowControl("SYNTEKMotion");
                CEtherCAT_CheckStatus etherCAT_CheckStatus = new CEtherCAT_CheckStatus();
                flowControl.AddFlowBase(etherCAT_CheckStatus);
                etherCAT_CheckStatus.Start();

                EtherCATInitializationForm.GetInstance().ShowForm();
                EtherCATInitializationForm.GetInstance().SetStatus("Wait Initial");
                masterCardInitialize();
                EtherCATInitializationForm.GetInstance().CloseForm();

                etherCAT_CheckStatus.Stop();
            }
        }
Example #15
0
        private dynamic createGeneralSocketParameter(ModulesType modulesType, string parameterFolderPath, string deviceName)
        {
            string className = ResourceHelper.Library.GetString("ParameterSocket");

            object[] obj           = new object[] { parameterFolderPath, deviceName };
            dynamic  result        = null;
            Type     typeofControl = null;
            Assembly tempAssembly  = Assembly.Load(assemblyName);

            typeofControl = tempAssembly.GetType(className);

            try
            {
                result = Activator.CreateInstance(typeofControl, obj);
            }
            catch (TargetInvocationException ex)
            {
                throw new Exception(ex.InnerException.Message);
            }
            return(result);
        }
Example #16
0
        public static dynamic CreateModule(ModulesType modulesType, string xmlFilePath, string deviceName)
        {
            string className = ResourceHelper.Library.GetString("Module" + modulesType.ToString());

            object[] obj           = new object[] { (object)modulesType, (object)xmlFilePath, (object)deviceName };
            dynamic  result        = null;
            Type     typeofControl = null;
            Assembly tempAssembly  = Assembly.Load(AssemblyName);

            if (tempAssembly == null)
            {
                throw new Exception(ExceptionHelper.GetFullCurrentMethod(ResourceHelper.Language.GetString("AssemblyIsNull")));
            }
            if (className == null)
            {
                throw new Exception(ExceptionHelper.GetFullCurrentMethod(ResourceHelper.Language.GetString("WrongClassName") + " ( " + deviceName + " : " + modulesType.ToString() + " )"));
            }

            typeofControl = tempAssembly.GetType(className);

            if (typeofControl == null)
            {
                throw new Exception(ExceptionHelper.GetFullCurrentMethod(ResourceHelper.Language.GetString("WrongClassName") + " ( " + deviceName + " : " + modulesType.ToString() + " )"));
            }

            try
            {
                result = Activator.CreateInstance(typeofControl, obj);
            }
            catch (TargetInvocationException ex)
            {
                if (ex.InnerException is Exception)
                {
                    throw new Exception(ex.InnerException.Message + " ( " + deviceName + " : " + modulesType.ToString() + " )");
                }
            }
            return(result);
        }
Example #17
0
        public L122M2X4(ModulesType modulesType, string parameterFolderPath, string deviceName)
            : base(modulesType, parameterFolderPath, deviceName)
        {
            busy = new U16();

            axisPara = Parameter as ParameterL122M2X4;

            slaveModuleInitialize();

            setHardwareScan();

            taskInitialize();

            setMotion();

            axisPara.ParameterChanged += new ParameterINI.ParameterChangedHandler((paraName) => setMotion());

            softLimitEnabled = axisPara.SoftLimitEnabled;
            softLimitN       = axisPara.SoftLimitN;
            softLimitP       = axisPara.SoftLimitP;
            maxSpeed         = 1000;
            //ServoOn(CmdStatus.ON);
        }
Example #18
0
 public PN100BI(ModulesType modulesType, string xmlFilePath, string deviceName)
     : base(modulesType, xmlFilePath, deviceName)
 {
 }
Example #19
0
 public DPA6024B(ModulesType modulesType, string xmlFilePath, string deviceName)
     : base(modulesType, xmlFilePath, deviceName)
 {
     this.ChannelNumber = 2;
     InitializeConfiguration(ParameterType.System);
 }
Example #20
0
        private bool checkModulesParameterClass(ModulesType modulesType)
        {
            string className = ResourceHelper.Library.GetString("Parameter" + modulesType.ToString());

            return(className != null ? true : false);
        }
 public WebMethodActionAttribute(ModulesType modulesType) => ModulesType = modulesType;
Example #22
0
 protected L132(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     masterCardInitialize();
 }
 public WebMethodActionRequirement(ModulesType modulesType)
 {
     ModulesType = modulesType;
 }
Example #24
0
 protected SocketModulesBase(ModulesType modulesType, string parameterFolderPath, string deviceName)
     : base(modulesType, parameterFolderPath, deviceName)
 {
     socketPara = Parameter as ParameterSocket;
     SocketlInitialize();
 }