Core Serial Library in C#
1.2
|
Represents an axis of a device running in the binary protocol. More...
Public Member Functions | |
ZaberBinaryDevice (ZaberBinaryPort port, byte number) | |
Create a new instance of the ZaberBinaryDevice class to model a Zaber device connected to the port specified by port using the binary protocol. More... | |
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 | |
byte | Number [get] |
The device number, 0-255. More... | |
IZaberPort | Port [get] |
The parent port of the axis. More... | |
Represents an axis of a device running in the binary protocol.
The binary protocol makes no distinction between devices and axes: every axis is a device in the binary protocol. Therefore this class is named ZaberBinaryDevice rather than ZaberBinaryAxis to eliminate confusion about this fact, despite implementing the IZaberAxis interface.
|
inline |
Create a new instance of the ZaberBinaryDevice class to model a Zaber device connected to the port specified by port using the binary protocol.
port | The port to which this device is connected. |
number | The number of this device. |
|
inline |
Gets the position of the axis, in microsteps.
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Homes the device.
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Polls the device to determine whether it is currently moving.
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Moves the device to the specified position.
position | The position in microsteps. |
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Moves the device by a certain distance.
distance | The distance in microsteps. |
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
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. |
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Blocks while Polling the device at a regular interval until it reports itself as idle.
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
inline |
Stops the device.
UnexpectedReplyReceivedException | An unexpected reply was read from the serial port. |
Implements IZaberAxis.
|
get |
The device number, 0-255.
|
get |
The parent port of the axis.