C# Class KMotion_dotNet.KM_Axis

Axis class for KM_Controller Use to control a single axis channel The axis channel can be configured via a c program and the KM_Controller or Use the configuration methods to set the desired parameters
Afficher le fichier Open project: parhansson/KMotionX Class Usage Examples

Protected Properties

Свойство Type Description
_CPU double
_Controller KM_Controller
_HomingParams KM_Axis_HomingParams
_ID int
_JogPercent double
_JogVelocity double
_Name string
_TuningParams KM_Axis_TuningParams
_Velocity double

Méthodes publiques

Méthode Description
CheckEnabled ( ) : bool

Check if the axis is enabled

Disable ( ) : void

Disable the axis

DoHome ( ) : bool

Executes a homing sequence based on the settings within the HomingParams variable and waits until the execution is complete

EStop ( ) : void

Stop the current motion and disable the axis

Enable ( ) : void

Bring an axis to an enabled state

EnableDest ( double dest ) : void

Bring an axis to an enabled state and specify the commanded destination for the axis dest is multiplied by CPU and sent to KFLOP

GetActualPosition ( ) : double

Querys the axis channel for the actual position in user units

GetActualPositionCounts ( ) : double

Querys the axis channel for the actual position in counts

GetCommandedPosition ( ) : double

Querys the axis channel for the commanded position in user units

GetCommandedPositionCounts ( ) : double

Querys the axis channel for the commanded position in counts

GetHomeFileSource ( ) : string

Creates the source code for the .c file with an empty main() method

GetHomeSequence ( ) : string

Creates the lines of code to place in the main() method

GetMoveToStateAtVel ( ) : string

Auto Generates KFLOP C Code to move until an input bit changes

Jog ( ) : void

Jog axis at the commanded preset jogvelocity * jogpercentage

Jog ( double velocity ) : void

Jog axis at a given velocity

KM_Axis ( KM_Controller controller, int id, string name ) : System

Default constructor for the Axis Object

MotionComplete ( ) : bool

Checks if the commanded axis motion is completed

MoveTo ( double pos ) : void

Calls a move to a given absolute position and blocks the calling thread until the position has been acheived

RelativeMoveTo ( double pos ) : void

Calls a move to a given relative position and blocks the calling thread until the position has been acheived

SetCommandedDest ( double dest ) : void

Sets the axis node's commanded Destination Caution: changing this may result in a sudden jump in the axis position

SetCurrentPosition ( double pos ) : void

Sets the axis node's current position Can be used to "zero" the axis

StartDoHome ( ) : void

Executes a homing sequence based on the settings within the HomingParams variable

StartMoveTo ( double pos ) : void

Calls a non-blocking move to a given absolute position

StartRelativeMoveTo ( double pos ) : void

Calls a non-blocking move to a given relative position

Stop ( ) : void

Stop the current motion

WaitforMotionComplete ( int timeout ) : bool

Blocks the calling thread until the axis is in position within a specified time limit

ZeroAxis ( ) : void

Sets the Axis' current 0.0 point

Private Methods

Méthode Description
GetAutoHomingFileSource ( ) : string

Generates the automated simple homing routine for this axis

WriteHomingToFile ( string filesourcecode ) : string

Creates a new text file in ASCII format containing the source code

Method Details

CheckEnabled() public méthode

Check if the axis is enabled
public CheckEnabled ( ) : bool
Résultat bool

Disable() public méthode

Disable the axis
public Disable ( ) : void
Résultat void

DoHome() public méthode

Executes a homing sequence based on the settings within the HomingParams variable and waits until the execution is complete
public DoHome ( ) : bool
Résultat bool

EStop() public méthode

Stop the current motion and disable the axis
public EStop ( ) : void
Résultat void

Enable() public méthode

Bring an axis to an enabled state
public Enable ( ) : void
Résultat void

EnableDest() public méthode

Bring an axis to an enabled state and specify the commanded destination for the axis dest is multiplied by CPU and sent to KFLOP
public EnableDest ( double dest ) : void
dest double
Résultat void

GetActualPosition() public méthode

Querys the axis channel for the actual position in user units
public GetActualPosition ( ) : double
Résultat double

GetActualPositionCounts() public méthode

Querys the axis channel for the actual position in counts
public GetActualPositionCounts ( ) : double
Résultat double

GetCommandedPosition() public méthode

Querys the axis channel for the commanded position in user units
public GetCommandedPosition ( ) : double
Résultat double

GetCommandedPositionCounts() public méthode

Querys the axis channel for the commanded position in counts
public GetCommandedPositionCounts ( ) : double
Résultat double

GetHomeFileSource() public méthode

Creates the source code for the .c file with an empty main() method
public GetHomeFileSource ( ) : string
Résultat string

GetHomeSequence() public méthode

Creates the lines of code to place in the main() method
public GetHomeSequence ( ) : string
Résultat string

GetMoveToStateAtVel() public méthode

Auto Generates KFLOP C Code to move until an input bit changes
public GetMoveToStateAtVel ( ) : string
Résultat string

Jog() public méthode

Jog axis at the commanded preset jogvelocity * jogpercentage
public Jog ( ) : void
Résultat void

Jog() public méthode

Jog axis at a given velocity
public Jog ( double velocity ) : void
velocity double velocity to jog at : a negative value will reverse the motion
Résultat void

KM_Axis() public méthode

Default constructor for the Axis Object
public KM_Axis ( KM_Controller controller, int id, string name ) : System
controller KM_Controller
id int
name string
Résultat System

MotionComplete() public méthode

Checks if the commanded axis motion is completed
public MotionComplete ( ) : bool
Résultat bool

MoveTo() public méthode

Calls a move to a given absolute position and blocks the calling thread until the position has been acheived
public MoveTo ( double pos ) : void
pos double absolute position to move to
Résultat void

RelativeMoveTo() public méthode

Calls a move to a given relative position and blocks the calling thread until the position has been acheived
public RelativeMoveTo ( double pos ) : void
pos double position delta from current position to move to
Résultat void

SetCommandedDest() public méthode

Sets the axis node's commanded Destination Caution: changing this may result in a sudden jump in the axis position
public SetCommandedDest ( double dest ) : void
dest double new value for the commanded destination
Résultat void

SetCurrentPosition() public méthode

Sets the axis node's current position Can be used to "zero" the axis
public SetCurrentPosition ( double pos ) : void
pos double new value for the current position
Résultat void

StartDoHome() public méthode

Executes a homing sequence based on the settings within the HomingParams variable
public StartDoHome ( ) : void
Résultat void

StartMoveTo() public méthode

Calls a non-blocking move to a given absolute position
public StartMoveTo ( double pos ) : void
pos double absolute position to move to
Résultat void

StartRelativeMoveTo() public méthode

Calls a non-blocking move to a given relative position
public StartRelativeMoveTo ( double pos ) : void
pos double position delta from current position to move to
Résultat void

Stop() public méthode

Stop the current motion
public Stop ( ) : void
Résultat void

WaitforMotionComplete() public méthode

Blocks the calling thread until the axis is in position within a specified time limit
public WaitforMotionComplete ( int timeout ) : bool
timeout int time in ms to wait for axis to acheive position, 0 will wait indefinitely
Résultat bool

ZeroAxis() public méthode

Sets the Axis' current 0.0 point
public ZeroAxis ( ) : void
Résultat void

Property Details

_CPU protected_oe property

Multiplier for the velocity
protected double _CPU
Résultat double

_Controller protected_oe property

KM_Controller Object for used for device access
protected KM_Controller _Controller
Résultat KM_Controller

_HomingParams protected_oe property

Data memeber for thr homing sequence attributes
protected KM_Axis_HomingParams _HomingParams
Résultat KM_Axis_HomingParams

_ID protected_oe property

Axis Channel Number Valid range = ( 0 - 7 )
protected int _ID
Résultat int

_JogPercent protected_oe property

The level of jog percenatage computed from the commanded jog velocity
protected double _JogPercent
Résultat double

_JogVelocity protected_oe property

Commanded jog velocity
protected double _JogVelocity
Résultat double

_Name protected_oe property

Call Name Use to describe what the Axis controls i.e. Positioning Fence 1, X, etc...
protected string _Name
Résultat string

_TuningParams protected_oe property

Accessor to the axis channel's tuning parameters
protected KM_Axis_TuningParams _TuningParams
Résultat KM_Axis_TuningParams

_Velocity protected_oe property

Velocity to use during positioning Jogging uses its own velocity passed in
protected double _Velocity
Résultat double