Example #1
0
        protected override bool InitProcess()
        {
            _controller.Open();
            if (_controller.IsConnected)
            {
                LogHelper.WriteLine("{0}, firmware version {1}", this, _controller.FirmwareInfo);

                // pass the configurations to the instance of irixi motion controller class
                for (int i = 0; i < this.Count; i++)
                {
                    var PAxis   = this[i] as IrixiAxis;
                    var sdkAxis = _controller.AxisCollection[i];

                    // the following parameters of the Axis Objects of the SDK should be redefined since they are
                    // needed to initialize the motion controller board.
                    sdkAxis.PosAfterHome      = 0;
                    sdkAxis.SoftCCWLS         = 0;
                    sdkAxis.SoftCWLS          = PAxis.UnitHelper.MaxSteps;
                    sdkAxis.MaxSteps          = PAxis.UnitHelper.MaxSteps;
                    sdkAxis.AccelerationSteps = PAxis.AccelerationSteps;

                    // reverse the drive directoin
                    _controller.ReverseOriginPosition(i, PAxis.ReverseDriveDirecton);
                }

                return(true);
            }
            else
            {
                this.LastError = _controller.LastError;
                return(false);
            }
        }
Example #2
0
        protected override bool InitProcess()
        {
            _controller.Open();
            if (_controller.IsConnected)
            {
                LogHelper.WriteLine("{0}, firmware version {1}", this, _controller.FirmwareInfo);

                // pass the configurations to the instance of irixi motion controller class
                for (int i = 0; i < this.Count; i++)
                {
                    var axis    = this[i.ToString()] as IrixiAxis;
                    var sdkAxis = _controller.AxisCollection[i];

                    sdkAxis.PosAfterHome      = 0;
                    sdkAxis.SoftCCWLS         = 0;
                    sdkAxis.SoftCWLS          = axis.UnitHelper.MaxSteps;
                    sdkAxis.MaxSteps          = axis.UnitHelper.MaxSteps;
                    sdkAxis.MaxSpeed          = axis.MaxSpeed;
                    sdkAxis.AccelerationSteps = axis.AccelerationSteps;

                    // reverse the drive directoin
                    _controller.ReverseOriginPosition(i, axis.ReverseDriveDirecton);
                }

                return(true);
            }
            else
            {
                this.LastError = _controller.LastError;
                return(false);
            }
        }