C# Класс KMotion_dotNet.KM_CoordMotion

Coordinated Motion class representing the CoordMotion.cpp object from the C++ Dynotion Code Use to directly control multiple axis motion Notably:: Straight Traverse Straight Feed Arc Feed
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Abort ( ) : void

Abort causes all motion to abruptly stop usually due to something catastrophic like a communication error Use in an E-Stop condition

ArcFeed ( double feedrate, int plane, double planarXend, double planarYend, double planarXcenter, double planarYcenter, int rotation, double planarZ, double a, double b, double c, int sequence_number, int ID ) : void

Perform arc motion at a specified feed rate

ArcFeedAccel ( double feedrate, double accel, int plane, double planarXend, double planarYend, double planarXcenter, double planarYcenter, int rotation, double planarZ, double a, double b, double c, int sequence_number, int ID ) : void

Perform arc motion at a specified feed rate and Acceleration

CheckMotionHalt ( bool coord ) : int

Cehecks for a motion halt

ClearAbort ( ) : void

Clears any existing Abort conditions

ClearHalt ( ) : void

Clear any exisiting halts

Dispose ( ) : void

Releases object resources

DoKMotionBufCmd ( string command ) : void

Inserts a console script command in the buffer

DoKMotionCmd ( string command, bool flushbufferfirst ) : void

Processes a console script command

DoRateAdjustments ( int i0, int i1, double feedrate ) : void

Update the Trajectory Planner's segment feedrates.

DoSpecialCommand ( int segment ) : void

Perform segment execution

DownloadDoneSegments ( ) : void

Download all computed segments from the Trajectory Planner to the device buffer

DownloadInit ( ) : void

Initializes download

Dwell ( double seconds, int sequence_number ) : void

Pause motion fow given amount of time

ExecutionStop ( ) : void

Stop the execution of current motion in a controlled number

FlushSegments ( ) : void

Flushes the segment buffer

GetAxisDefinitions ( int &x, int &y, int &z, int &a, int &b, int &c ) : void

Get the assignment of KFLOP axis Channels to GCode Axes XYZABC, -1 indicates unused/unassigned axis

GetAxisDestination ( int axis ) : double

Gets the axis destination

GetAxisPosition ( int axis ) : double

Gets the axis position

Halt ( ) : void

Halt cause motion to stop in a controlled manner. A feed hold is commanded so that the motion decellerates along the intended path. After the system completely stops, the exact point in the Coordinated Motion Buffer where the stop actually happened is uploaded and the GCode Interpreter is rewound to that point.

KM_CoordMotion ( KM_Controller controller ) : System

Primary constructor for KM_CoordMotion object

MeasurePointAppendToFile ( string command ) : void

Write position data to file

OutputSegment ( int segment ) : void

Output given segment

ReadAndSyncCurPositions ( double &x, double &y, double &z, double &a, double &b, double &c ) : void

First Syncs the Coor Motion Library to the current axis destinations then sets the passed variables to the CoordMotion's Absolute positions

SetAxisDefinitions ( int x, int y, int z, int a, int b, int c ) : void

Set the assignment of KFLOP axis Channels to GCode Axes XYZABC, -1 indicates unused/unassigned axis

SetTPParams ( ) : void

Force the Trajectory Planner to update it's parameters

StartTraverse ( double x, double y, double z, double a, double b, double c, bool suppresscallback, object usercallback ) : void

Fires an async delegate to move axes at traversal speeds non-interpolated

StraightFeed ( double feedrate, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : void

Perform linear motion at a specified feed rate

StraightFeedAccel ( double feedrate, double accel, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : void

Perform linear motion at a specified feed rate and Acceleration

StraightTraverse ( double x, double y, double z, double a, double b, double c, bool suppresscallback ) : void

Move axes at traversal speeds non-interpolated

UpdateCurrentPositionsABS ( double &x, double &y, double &z, double &a, double &b, double &c, bool snap ) : void

Sets the passed variables to the CoordMotion's Absolute positions

WaitForMoveXYZABCFinished ( ) : void

Blocks calling thread until all commanded motion is complete

WaitForSegmentsFinished ( bool suppressdisablederror ) : void

Waits for all buffered segments to complete Blocks calling thread until the buffer is complete

Защищенные методы

Метод Описание
OnTraverseCompletes ( IAsyncResult result ) : void

Returns after the Async Traverse is called

Приватные методы

Метод Описание
GetFeedRateOverride ( ) : double

Gets the current Feedrate override

GetFeedRateRapidOverride ( ) : double

Gets the current Feedrate Rapidoverride

GetHardwareFRORange ( ) : double

Gets the Hardware FRO Range for all axes Below this value FRO is handled by hardware (no delay) Above this value FRO is handle by the Trajectory Planner (proper accelerations)

GetIsAbort ( ) : bool

Property accessor to query Abort condition

GetIsHalt ( ) : bool

Property accessor to query Halt condition

GetSpindleRateOverride ( ) : double

Gets the current Spindlerate override

Get_PreviouslyStopped ( ) : PREV_STOP_TYPE

Property getter Accessor for PreviouslyStopped

Get_Simulate ( ) : bool

Property getter Accessor for simulation

KM_dotnet_Interop_CoordMotion_ArcFeed ( IntPtr handle, double DesiredFeedRate_in_per_sec, int plane, double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point, double a, double b, double c, int sequence_number, int ID ) : int
KM_dotnet_Interop_CoordMotion_ArcFeedAccel ( IntPtr handle, double DesiredFeedRate_in_per_sec, double DesiredAccel, int plane, double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point, double a, double b, double c, int sequence_number, int ID ) : int
KM_dotnet_Interop_CoordMotion_CheckMotionHalt ( IntPtr handle, bool Coord ) : int
KM_dotnet_Interop_CoordMotion_Clear_Abort ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_Clear_Halt ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_DoKMotionBufCmd ( IntPtr handle, string command ) : int
KM_dotnet_Interop_CoordMotion_DoKMotionCmd ( IntPtr handle, string command, bool FlushBeforeUnbufferedOperation ) : int
KM_dotnet_Interop_CoordMotion_DoRateAdjustments ( IntPtr handle, int i0, int i1, double FeedRate ) : int
KM_dotnet_Interop_CoordMotion_DoSpecialCommand ( IntPtr handle, int iseg ) : int
KM_dotnet_Interop_CoordMotion_DownloadDoneSegments ( IntPtr handle ) : int
KM_dotnet_Interop_CoordMotion_DownloadInit ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_DownloadedSegmentCount ( IntPtr handle ) : int
KM_dotnet_Interop_CoordMotion_Dwell ( IntPtr handle, double seconds, int sequence_number ) : void
KM_dotnet_Interop_CoordMotion_ExecutionStop ( IntPtr handle ) : int
KM_dotnet_Interop_CoordMotion_FlushSegments ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_Free ( IntPtr &handle ) : void
KM_dotnet_Interop_CoordMotion_GetAxisDefinitions ( IntPtr handle, int &x, int &y, int &z, int &a, int &b, int &c ) : int
KM_dotnet_Interop_CoordMotion_Get_Abort ( IntPtr handle ) : bool
KM_dotnet_Interop_CoordMotion_Get_AxisDestination ( IntPtr handle, int axis, double &value ) : int
KM_dotnet_Interop_CoordMotion_Get_AxisPosition ( IntPtr handle, int axis, double &value ) : int
KM_dotnet_Interop_CoordMotion_Get_FeedRateOverride ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_Get_FeedRateRapidOverride ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_Get_Halt ( IntPtr handle ) : bool
KM_dotnet_Interop_CoordMotion_Get_HardwareFRORange ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_Get_PreviouslyStopped ( IntPtr handle ) : PREV_STOP_TYPE
KM_dotnet_Interop_CoordMotion_Get_Simulate ( IntPtr handle ) : bool
KM_dotnet_Interop_CoordMotion_Get_SpindleRateOverride ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_MeasurePointAppendToFile ( IntPtr handle, string command ) : int
KM_dotnet_Interop_CoordMotion_New ( IntPtr controller, IntPtr &handle ) : void
KM_dotnet_Interop_CoordMotion_OutputSegment ( IntPtr handle, int iseg ) : int
KM_dotnet_Interop_CoordMotion_ReadAndSyncCurPositions ( IntPtr handle, double &x, double &y, double &z, double &a, double &b, double &c ) : int
KM_dotnet_Interop_CoordMotion_ReadCurAbsPosition ( IntPtr handle, double &x, double &y, double &z, double &a, double &b, double &c, bool snap ) : int
KM_dotnet_Interop_CoordMotion_RemainingTime ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_SetArcFeedCallback ( IntPtr handle, KM_CoordMotionArcFeedSixAxisHandler handler ) : void
KM_dotnet_Interop_CoordMotion_SetAxisDefinitions ( IntPtr handle, int x, int y, int z, int a, int b, int c ) : int
KM_dotnet_Interop_CoordMotion_SetStraightFeedCallback ( IntPtr handle, KM_CoordMotionStraightFeedSixAxisHandler handler ) : void
KM_dotnet_Interop_CoordMotion_SetStraightTraverseCallback ( IntPtr handle, KM_CoordMotionStraightTraverseSixAxisHandler handler ) : void
KM_dotnet_Interop_CoordMotion_SetTPParams ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_Set_Abort ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_Set_FeedRateOverride ( IntPtr handle, double value ) : void
KM_dotnet_Interop_CoordMotion_Set_FeedRateRapidOverride ( IntPtr handle, double value ) : void
KM_dotnet_Interop_CoordMotion_Set_Halt ( IntPtr handle ) : void
KM_dotnet_Interop_CoordMotion_Set_HardwareFRORange ( IntPtr handle, double value ) : void
KM_dotnet_Interop_CoordMotion_Set_PreviouslyStopped ( IntPtr handle, PREV_STOP_TYPE value ) : void
KM_dotnet_Interop_CoordMotion_Set_Simulate ( IntPtr handle, bool value ) : void
KM_dotnet_Interop_CoordMotion_Set_SpindleRateOverride ( IntPtr handle, double value ) : void
KM_dotnet_Interop_CoordMotion_StraightFeed ( IntPtr handle, double DesiredFeedRate_in_per_sec, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : int
KM_dotnet_Interop_CoordMotion_StraightFeedAccel ( IntPtr handle, double DesiredFeedRate_in_per_sec, double DesiredAccel, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : int
KM_dotnet_Interop_CoordMotion_StraightTraverse ( IntPtr handle, double x, double y, double z, double a, double b, double c, bool NoCallback ) : int
KM_dotnet_Interop_CoordMotion_TimeAlreadyExecuted ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_TotalDownloadedTime ( IntPtr handle ) : double
KM_dotnet_Interop_CoordMotion_WaitForMoveXYZABCFinished ( IntPtr handle ) : int
KM_dotnet_Interop_CoordMotion_WaitForSegmentsFinished ( IntPtr handle, bool NoErrorOnDisable ) : int
OnCoordMotionArcFeed ( bool ZeroLenAsFullCircles, double DesiredFeedRate_in_per_sec, int plane, double first_end, double second_end, double first_axis, double second_axis, int rotation, double axis_end_point, double a, double b, double c, double first_start, double second_start, double axis_start_point, int sequence_number, int ID ) : void

Dispatches Arc Feed callback values to CoordMotionArcFeed event subscribers

OnCoordMotionStraightFeed ( double DesiredFeedRate_in_per_sec, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : void

Dispatches Straight Feed callback values to CoordMotionStraightFeed event subscribers

OnCoordMotionStraightTraverse ( double x, double y, double z, double a, double b, double c, int sequence_number ) : void

Dispatches Straight Traverse callback values to CoordMotionStraightTraverse event subscribers

SetArcFeedCallback ( ) : void

Sets the internal Arc Feed callback for the CoordMotion.cpp object Separate delegate for this callback prevents the Garbage Collector from releasing the unmanaged function pointer from being destroyed

SetFeedRateOverride ( double value ) : void

Sets the current Feedrate override

SetFeedRateRapidOverride ( double value ) : void

Sets the current Rapid Feedrate override

SetHardwareFRORange ( double value ) : void

Sets the Hardware FRO Range for all axes Below this value FRO is handled by hardware (no delay) Above this value FRO is handle by the Trajectory Planner (proper accelerations)

SetSpindleRateOverride ( double value ) : void

Sets the current Spindlerate override

SetStraightFeedCallback ( ) : void

Sets the internal Straight Feed callback for the CoordMotion.cpp object Separate delegate for this callback prevents the Garbage Collector from releasing the unmanaged function pointer from being destroyed

SetStraightTraverseCallback ( ) : void

Sets the internal Straight Traverse callback for the CoordMotion.cpp object Separate delegate for this callback prevents the Garbage Collector from releasing the unmanaged function pointer from being destroyed

Set_PreviouslyStopped ( PREV_STOP_TYPE value ) : void

Property setter Accessor for PreviouslyStopped

Set_Simulate ( bool value ) : void

Property setter Accessor for simulation

Описание методов

Abort() публичный Метод

Abort causes all motion to abruptly stop usually due to something catastrophic like a communication error Use in an E-Stop condition
public Abort ( ) : void
Результат void

ArcFeed() публичный Метод

Perform arc motion at a specified feed rate
public ArcFeed ( double feedrate, int plane, double planarXend, double planarYend, double planarXcenter, double planarYcenter, int rotation, double planarZ, double a, double b, double c, int sequence_number, int ID ) : void
feedrate double Desired feed rate
plane int plane to perform arc (determines axis pair to use)
planarXend double X end point of arc
planarYend double Y end point of arc
planarXcenter double X center of rotation of arc
planarYcenter double Y center of rotation of arc
rotation int CW or ACW
planarZ double End point of perpindicular axis(for helical motion)
a double final end position of a axis
b double final end position of a axis
c double final end position of a axis
sequence_number int internal reference
ID int internal reference
Результат void

ArcFeedAccel() публичный Метод

Perform arc motion at a specified feed rate and Acceleration
public ArcFeedAccel ( double feedrate, double accel, int plane, double planarXend, double planarYend, double planarXcenter, double planarYcenter, int rotation, double planarZ, double a, double b, double c, int sequence_number, int ID ) : void
feedrate double Desired feed rate
accel double Desired acceleration rate
plane int plane to perform arc (determines axis pair to use)
planarXend double X end point of arc
planarYend double Y end point of arc
planarXcenter double X center of rotation of arc
planarYcenter double Y center of rotation of arc
rotation int CW or ACW
planarZ double End point of perpindicular axis(for helical motion)
a double final end position of a axis
b double final end position of a axis
c double final end position of a axis
sequence_number int internal reference
ID int internal reference
Результат void

CheckMotionHalt() публичный Метод

Cehecks for a motion halt
public CheckMotionHalt ( bool coord ) : int
coord bool specify axis mapped axes only
Результат int

ClearAbort() публичный Метод

Clears any existing Abort conditions
public ClearAbort ( ) : void
Результат void

ClearHalt() публичный Метод

Clear any exisiting halts
public ClearHalt ( ) : void
Результат void

Dispose() публичный Метод

Releases object resources
public Dispose ( ) : void
Результат void

DoKMotionBufCmd() публичный Метод

Inserts a console script command in the buffer
public DoKMotionBufCmd ( string command ) : void
command string command
Результат void

DoKMotionCmd() публичный Метод

Processes a console script command
public DoKMotionCmd ( string command, bool flushbufferfirst ) : void
command string console script
flushbufferfirst bool Flush current buffered commands before adding a new one
Результат void

DoRateAdjustments() публичный Метод

Update the Trajectory Planner's segment feedrates.
public DoRateAdjustments ( int i0, int i1, double feedrate ) : void
i0 int
i1 int
feedrate double
Результат void

DoSpecialCommand() публичный Метод

Perform segment execution
public DoSpecialCommand ( int segment ) : void
segment int segment index
Результат void

DownloadDoneSegments() публичный Метод

Download all computed segments from the Trajectory Planner to the device buffer
public DownloadDoneSegments ( ) : void
Результат void

DownloadInit() публичный Метод

Initializes download
public DownloadInit ( ) : void
Результат void

Dwell() публичный Метод

Pause motion fow given amount of time
public Dwell ( double seconds, int sequence_number ) : void
seconds double time in seconds
sequence_number int sequence number to be associated with the dwell
Результат void

ExecutionStop() публичный Метод

Stop the execution of current motion in a controlled number
public ExecutionStop ( ) : void
Результат void

FlushSegments() публичный Метод

Flushes the segment buffer
public FlushSegments ( ) : void
Результат void

GetAxisDefinitions() публичный Метод

Get the assignment of KFLOP axis Channels to GCode Axes XYZABC, -1 indicates unused/unassigned axis
public GetAxisDefinitions ( int &x, int &y, int &z, int &a, int &b, int &c ) : void
x int
y int
z int
a int
b int
c int
Результат void

GetAxisDestination() публичный Метод

Gets the axis destination
public GetAxisDestination ( int axis ) : double
axis int Axis map index
Результат double

GetAxisPosition() публичный Метод

Gets the axis position
public GetAxisPosition ( int axis ) : double
axis int Axis map index
Результат double

Halt() публичный Метод

Halt cause motion to stop in a controlled manner. A feed hold is commanded so that the motion decellerates along the intended path. After the system completely stops, the exact point in the Coordinated Motion Buffer where the stop actually happened is uploaded and the GCode Interpreter is rewound to that point.
public Halt ( ) : void
Результат void

KM_CoordMotion() публичный Метод

Primary constructor for KM_CoordMotion object
public KM_CoordMotion ( KM_Controller controller ) : System
controller KM_Controller
Результат System

MeasurePointAppendToFile() публичный Метод

Write position data to file
public MeasurePointAppendToFile ( string command ) : void
command string file name to append to
Результат void

OnTraverseCompletes() защищенный Метод

Returns after the Async Traverse is called
protected OnTraverseCompletes ( IAsyncResult result ) : void
result IAsyncResult User supplied object that gets returned when traverse is complete
Результат void

OutputSegment() публичный Метод

Output given segment
public OutputSegment ( int segment ) : void
segment int segment index to output
Результат void

ReadAndSyncCurPositions() публичный Метод

First Syncs the Coor Motion Library to the current axis destinations then sets the passed variables to the CoordMotion's Absolute positions
public ReadAndSyncCurPositions ( double &x, double &y, double &z, double &a, double &b, double &c ) : void
x double X axis value
y double Y axis value
z double Z axis value
a double A axis value
b double B axis value
c double C axis value
Результат void

SetAxisDefinitions() публичный Метод

Set the assignment of KFLOP axis Channels to GCode Axes XYZABC, -1 indicates unused/unassigned axis
public SetAxisDefinitions ( int x, int y, int z, int a, int b, int c ) : void
x int
y int
z int
a int
b int
c int
Результат void

SetTPParams() публичный Метод

Force the Trajectory Planner to update it's parameters
public SetTPParams ( ) : void
Результат void

StartTraverse() публичный Метод

Fires an async delegate to move axes at traversal speeds non-interpolated
public StartTraverse ( double x, double y, double z, double a, double b, double c, bool suppresscallback, object usercallback ) : void
x double x position
y double y position
z double z position
a double a position
b double b position
c double c position
suppresscallback bool Prevents callback information from being dispatched
usercallback object User supplied object that gets returned when traverse is complete
Результат void

StraightFeed() публичный Метод

Perform linear motion at a specified feed rate
public StraightFeed ( double feedrate, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : void
feedrate double Desired feed rate
x double X end point
y double Y end point
z double Z end point
a double A end point
b double B end point
c double C end point
sequence_number int internal reference
ID int internal reference
Результат void

StraightFeedAccel() публичный Метод

Perform linear motion at a specified feed rate and Acceleration
public StraightFeedAccel ( double feedrate, double accel, double x, double y, double z, double a, double b, double c, int sequence_number, int ID ) : void
feedrate double Desired feed rate
accel double Desired acceleration rate
x double X end point
y double Y end point
z double Z end point
a double A end point
b double B end point
c double C end point
sequence_number int internal reference
ID int internal reference
Результат void

StraightTraverse() публичный Метод

Move axes at traversal speeds non-interpolated
public StraightTraverse ( double x, double y, double z, double a, double b, double c, bool suppresscallback ) : void
x double x position
y double y position
z double z position
a double a position
b double b position
c double c position
suppresscallback bool Prevents callback information from being dispatched
Результат void

UpdateCurrentPositionsABS() публичный Метод

Sets the passed variables to the CoordMotion's Absolute positions
public UpdateCurrentPositionsABS ( double &x, double &y, double &z, double &a, double &b, double &c, bool snap ) : void
x double X axis value
y double Y axis value
z double Z axis value
a double A axis value
b double B axis value
c double C axis value
snap bool snap to exact previously commanded postion (if close) to avoid rounding errors
Результат void

WaitForMoveXYZABCFinished() публичный Метод

Blocks calling thread until all commanded motion is complete
public WaitForMoveXYZABCFinished ( ) : void
Результат void

WaitForSegmentsFinished() публичный Метод

Waits for all buffered segments to complete Blocks calling thread until the buffer is complete
public WaitForSegmentsFinished ( bool suppressdisablederror ) : void
suppressdisablederror bool suppress errors cause by commanding a disabled axis
Результат void