/// <summary> /// load the current positions of the specified logical motion component /// </summary> /// <param name="MotionComponent"></param> /// <returns></returns> private MassMoveArgs LoadRealtimePosition(LogicalMotionComponent MotionComponent) { // generate the mass move argument as the binding source of the preset window. MassMoveArgs arg = new MassMoveArgs(); foreach (var laxis in MotionComponent) { var a = laxis.MoveArgs.Clone() as AxisMoveArgs; a.Distance = laxis.PhysicalAxisInst.UnitHelper.RelPosition; a.IsMoveable = true; a.MoveOrder = 1; arg.Add(a); } arg.LogicalMotionComponent = MotionComponent.HashString; return(arg); }
/// <summary> /// load the current positions of the specified logical motion component /// </summary> /// <param name="MotionComponent"></param> /// <returns></returns> private MassMoveArgs LoadCurrentPositions(LogicalMotionComponent MotionComponent) { // generate the move args list to bind to the window MassMoveArgs arg = new MassMoveArgs() { }; foreach (var laxis in MotionComponent) { var a = laxis.MoveArgs.Clone() as AxisMoveArgs; a.Distance = laxis.PhysicalAxisInst.UnitHelper.RelPosition; a.IsMoveable = true; a.MoveOrder = 1; arg.Add(a); } arg.LogicalMotionComponent = MotionComponent.GetHashString(); return(arg); }