Core Serial Library in C#
1.2
|
An interface to represent an individual Zaber device's axis. More...
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... | |
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.
int GetPosition | ( | ) |
Gets the position of the axis, in microsteps.
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.
Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.
void MoveAbsolute | ( | int | position | ) |
Moves the device to the specified position.
position | The position in microsteps. |
Implemented in ZaberAsciiAxis, and ZaberBinaryDevice.
void MoveRelative | ( | int | distance | ) |
Moves the device by a certain distance.
distance | The 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.
speed | The 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.
|
get |
The parent port of the axis.