Core Serial Library in C#
1.2
|
A class to represent a single- or multi-axis Zaber device using the ASCII protocol. More...
Public Member Functions | |
ZaberAsciiDevice (ZaberAsciiPort port, byte address) | |
Create a new instance of the ZaberAsciiDevice class. More... | |
ZaberAsciiAxis | GetAxis (int number) |
Get the axis with the specified number. More... | |
Public Attributes | |
byte | Address |
The device address. More... | |
Properties | |
ZaberAsciiPort | Port [get] |
The parent port of the device. More... | |
A class to represent a single- or multi-axis Zaber device using the ASCII protocol.
ZaberAsciiAxis is the intended class for controlling devices using the ASCII protocol. This encourages thinking of devices in terms of axes instead of whole devices, and helps to unify the ASCII and binary halves of the library.
Consider using this class to control a multi-axis device like so:
|
inline |
Create a new instance of the ZaberAsciiDevice class.
port | The port the device is connected to. |
address | The device address. |
ArgumentNullException | port is null. |
|
inline |
Get the axis with the specified number.
This method will create the axis specified and assume that the device does indeed have such an axis. It is up to you to only make axes which actually exist on the device.
For a method which will detect the number of axes a device has, see ZaberAsciiPort.FindAxes(), or send the "get system.axiscount" ASCII command directly to a device.
number | The number of the axis. |
ArgumentException | number is not between 1 and 9. |
byte Address |
The device address.
|
get |
The parent port of the device.