C# Класс 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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_CPU double
_Controller KM_Controller
_HomingParams KM_Axis_HomingParams
_ID int
_JogPercent double
_JogVelocity double
_Name string
_TuningParams KM_Axis_TuningParams
_Velocity double

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

Метод Описание
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

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

Метод Описание
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

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

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

Check if the axis is enabled
public CheckEnabled ( ) : bool
Результат bool

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

Disable the axis
public Disable ( ) : void
Результат void

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

Executes a homing sequence based on the settings within the HomingParams variable and waits until the execution is complete
public DoHome ( ) : bool
Результат bool

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

Stop the current motion and disable the axis
public EStop ( ) : void
Результат void

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

Bring an axis to an enabled state
public Enable ( ) : void
Результат void

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

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
Результат void

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

Querys the axis channel for the actual position in user units
public GetActualPosition ( ) : double
Результат double

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

Querys the axis channel for the actual position in counts
public GetActualPositionCounts ( ) : double
Результат double

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

Querys the axis channel for the commanded position in user units
public GetCommandedPosition ( ) : double
Результат double

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

Querys the axis channel for the commanded position in counts
public GetCommandedPositionCounts ( ) : double
Результат double

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

Creates the source code for the .c file with an empty main() method
public GetHomeFileSource ( ) : string
Результат string

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

Creates the lines of code to place in the main() method
public GetHomeSequence ( ) : string
Результат string

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

Auto Generates KFLOP C Code to move until an input bit changes
public GetMoveToStateAtVel ( ) : string
Результат string

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

Jog axis at the commanded preset jogvelocity * jogpercentage
public Jog ( ) : void
Результат void

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

Jog axis at a given velocity
public Jog ( double velocity ) : void
velocity double velocity to jog at : a negative value will reverse the motion
Результат void

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

Default constructor for the Axis Object
public KM_Axis ( KM_Controller controller, int id, string name ) : System
controller KM_Controller
id int
name string
Результат System

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

Checks if the commanded axis motion is completed
public MotionComplete ( ) : bool
Результат bool

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

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
Результат void

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

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
Результат void

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

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
Результат void

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

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
Результат void

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

Executes a homing sequence based on the settings within the HomingParams variable
public StartDoHome ( ) : void
Результат void

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

Calls a non-blocking move to a given absolute position
public StartMoveTo ( double pos ) : void
pos double absolute position to move to
Результат void

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

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
Результат void

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

Stop the current motion
public Stop ( ) : void
Результат void

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

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
Результат bool

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

Sets the Axis' current 0.0 point
public ZeroAxis ( ) : void
Результат void

Описание свойств

_CPU защищенное свойство

Multiplier for the velocity
protected double _CPU
Результат double

_Controller защищенное свойство

KM_Controller Object for used for device access
protected KM_Controller _Controller
Результат KM_Controller

_HomingParams защищенное свойство

Data memeber for thr homing sequence attributes
protected KM_Axis_HomingParams _HomingParams
Результат KM_Axis_HomingParams

_ID защищенное свойство

Axis Channel Number Valid range = ( 0 - 7 )
protected int _ID
Результат int

_JogPercent защищенное свойство

The level of jog percenatage computed from the commanded jog velocity
protected double _JogPercent
Результат double

_JogVelocity защищенное свойство

Commanded jog velocity
protected double _JogVelocity
Результат double

_Name защищенное свойство

Call Name Use to describe what the Axis controls i.e. Positioning Fence 1, X, etc...
protected string _Name
Результат string

_TuningParams защищенное свойство

Accessor to the axis channel's tuning parameters
protected KM_Axis_TuningParams _TuningParams
Результат KM_Axis_TuningParams

_Velocity защищенное свойство

Velocity to use during positioning Jogging uses its own velocity passed in
protected double _Velocity
Результат double