1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MECF.Framework.Common.Device.Galil
- {
- public class GalilAxisData
- {
- public ushort Status { get; set; }
- public byte Switches { get; set; }
- public byte StopCode { get; set; }
- public int ReferencePosition { get; set; }
- public int MotorPosition { get; set;}
- public int PositionError { get; set; }
- public int AuxiliaryPosition { get; set; }
- public int Velocity { get; set; }
- public short Torque { get; set; }
- public short Res { get; set; }
- public bool IsSwitchOn { get; set; }
- public bool ForwardLimit { get; set; }
- public bool ReverseLimit { get; set; }
- /// <summary>
- /// 克隆
- /// </summary>
- /// <param name="data"></param>
- public GalilAxisData Clone()
- {
- GalilAxisData data=new GalilAxisData();
- data.Status= Status;
- data.Switches= Switches;
- data.StopCode= StopCode;
- data.ReferencePosition= ReferencePosition;
- data.MotorPosition= MotorPosition;
- data.PositionError= PositionError;
- data.AuxiliaryPosition= AuxiliaryPosition;
- data.Velocity= Velocity;
- data.Torque= Torque;
- data.Res= Res;
- data.IsSwitchOn= IsSwitchOn;
- data.ForwardLimit= ForwardLimit;
- data.ReverseLimit= ReverseLimit;
- return data;
- }
- /// <summary>
- /// 拷贝
- /// </summary>
- /// <param name="data"></param>
- public void Copy(GalilAxisData data)
- {
- Status = data.Status;
- Switches = data.Switches;
- StopCode = data.StopCode;
- ReferencePosition = data.ReferencePosition;
- MotorPosition = data.MotorPosition;
- PositionError = data.PositionError;
- AuxiliaryPosition = data.AuxiliaryPosition;
- Velocity = data.Velocity;
- Torque = data.Torque;
- Res = data.Res;
- IsSwitchOn= data.IsSwitchOn;
- ForwardLimit= data.ForwardLimit;
- ReverseLimit= data.ReverseLimit;
- }
- }
- }
|