Core Serial Library in C#  1.2
Public Member Functions | Properties | List of all members
IZaberAxis Interface Reference

An interface to represent an individual Zaber device's axis. More...

Inheritance diagram for IZaberAxis:
ZaberAsciiAxis ZaberBinaryDevice

Public Member Functions

int GetPosition ()
 Gets the position of the axis, in microsteps. More...
 
void Home ()
 Homes the device. More...
 
bool IsBusy ()
 Polls the device to determine whether it is currently moving. More...
 
void MoveAbsolute (int position)
 Moves the device to the specified position. More...
 
void MoveRelative (int distance)
 Moves the device by a certain distance. More...
 
void MoveVelocity (int speed)
 Moves the device at a certain speed. More...
 
void PollUntilIdle ()
 Blocks while Polling the device at a regular interval until it reports itself as idle. More...
 
void Stop ()
 Stops the device. More...
 

Properties

IZaberPort Port [get]
 The parent port of the axis. More...
 

Detailed Description

An interface to represent an individual Zaber device's axis.

Classes implementing this interface are intended only for basic, one-axis-at-a-time use cases. If you need to synchronize devices, move more than one axis at a time, or do any other sort of asynchronous I/O, use a class which implements IZaberPort.

Classes implementing IZaberAxis make a few assumptions, the most fundamental assumption being that all interaction with devices is done exclusively using the commands in this interface. From this assumption, it makes the second assumption that all input read immediately after a write is the anticipated response. Therefore, if you intend to mix and match calls to things like ZaberAsciiAxis.Home() with calls to ZaberAsciiPort.Write(), it is essential to follow every call to Write() with a Read(), or the input buffer will become misaligned.

Member Function Documentation

int GetPosition ( )

Gets the position of the axis, in microsteps.

Returns
The axis position.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void Home ( )

Homes the device.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

bool IsBusy ( )

Polls the device to determine whether it is currently moving.

Returns
true if the device is busy; false if it is idle.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void MoveAbsolute ( int  position)

Moves the device to the specified position.

Parameters
positionThe position in microsteps.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void MoveRelative ( int  distance)

Moves the device by a certain distance.

Parameters
distanceThe distance in microsteps.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void MoveVelocity ( int  speed)

Moves the device at a certain speed.

This command differs from the other two move commands in that it returns immediately instead of waiting for the device to finish its movement and become idle. For this reason, the Stop() method is also provided.

Parameters
speedThe speed to move at.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void PollUntilIdle ( )

Blocks while Polling the device at a regular interval until it reports itself as idle.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

void Stop ( )

Stops the device.

Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.

Property Documentation

IZaberPort Port
get

The parent port of the axis.


The documentation for this interface was generated from the following file: