Пример #1
0
        public MotionControllerBase(ConfigPhysicalMotionController Config)
        {
            DeviceClass   = Config.DeviceClass;
            Model         = Config.Model;
            Port          = Config.Port;
            IsEnabled     = Config.Enabled;
            IsInitialized = false;
            BusyAxesCount = 0;


            //
            // Generate the items of AxisCollection according the config of the physical motion controller
            //
            int i = 0;

            foreach (var axisConfig in Config.AxisCollection)
            {
                T axis = new T();
                axis.SetParameters(i, axisConfig, this);

                //TODO What if the axis name had been existed?
                this.Add(axisConfig.Name, axis);

                i++;
            }
        }
Пример #2
0
        public MotionControllerBase(ConfigPhysicalMotionController Config)
        {
            _config        = Config;
            DeviceClass    = _config.DeviceClass;
            Model          = _config.Model;
            Port           = _config.Port;
            IsEnabled      = Config.Enabled;
            IsInitialized  = false;
            AxisCollection = new Dictionary <string, IAxis>();
            BusyAxesCount  = 0;

            //
            // Generate the items of AxisCollection according the config of the physical motion controller
            //
            int i = 0;

            foreach (var _axis_cfg in Config.AxisCollection)
            {
                T _axis = new T();
                _axis.SetParameters(i, _axis_cfg, this);

                this.AxisCollection.Add(_axis_cfg.Name, _axis);
                i++;
            }
        }
Пример #3
0
 public IrixiEE0017(ConfigPhysicalMotionController Config) : base(Config)
 {
     _controller = new IrixiMotionController(Config.Port);
     _controller.OnConnectionStatusChanged += _controller_OnConnectionProgressChanged;
     _controller.OnReportUpdated           += _controller_OnReportUpdated;
     _controller.OnInputIOStatusChanged    += ((s, e) =>
     {
         OnInputStateChanged?.Invoke(this, e);
     });
 }
Пример #4
0
        public MotionControllerBase(ConfigPhysicalMotionController Config) : base(Config)
        {
            Model         = Config.Model;
            BusyAxesCount = 0;

            listAxis = new List <T>();

            int i = 0;

            // generate axis objects according to the configuration.
            // they'll be bound to the actual motion controller later on while initializing the motion controller.
            foreach (var axisConfig in Config.AxisCollection)
            {
                T phyAxisDesired = (T)Activator.CreateInstance(typeof(T), axisConfig, this);  // new T(axisConfig, this);
                listAxis.Add(phyAxisDesired);

                i++;
            }
        }
Пример #5
0
        public LuminosP6A(ConfigPhysicalMotionController Config) : base(Config)
        {
            //_wait_axis_register = new SemaphoreSlim(0);

            if (Config.Enabled)
            {
                _zaber_port_facade = new ZaberPortFacade()
                {
                    DefaultDeviceType = new DeviceType()
                    {
                        Commands = new List <CommandInfo>()
                    },
                    Port         = new TSeriesPort(new SerialPort(), new PacketConverter()),
                    QueryTimeout = 1000
                };

                ZaberDevice allDevices = _zaber_port_facade.GetDevice(0);

                allDevices.MessageReceived += AllDevices_MessageReceived;

                allDevices.MessageSent += AllDevices_MessageSent;
            }
        }
 public ThorlabsTDC001(ConfigPhysicalMotionController Config)
     : base(Config)
 {
     this.AxisX = new ThorlabsAxis();
     this.AxisCollection.Add(this.AxisX);
 }
Пример #7
0
        public IrixiM12(ConfigPhysicalMotionController Config) : base(Config)
        {
            _m12 = new Controller(Config.Port, Config.BaudRate);

            _m12.OnUnitStateUpdated += _m12_OnUnitStateUpdated;
        }