In USB/HID lingo data is passed using "Reports". Reports are transfered between a host and a peripheral device. The host is generally a PC. Reports can travel in both directions between the two end points. The terminology is referenced from the perspective of the PC. A report that is transfered to the host is called an "input report". A report that is transfered to the peripheral (slave) device is called an "output report". A "feature report" is a transaction that goes in both directions but originates from the PC.
Reports can be transfered using either a Control transfer or an Interrupt Transfer.
In a Control transfer, the transfer is initialiated by the end point that receives the data. Thus a Control Input report is inititiated by the Host and a Control Output report is initiated by the Device.
Interrupt transfers are the opposite of Control transfers. The transfer is initiated by the endpoint that is sending the report.
The length of each type of report (Input, Output, and Feature) is fixed by the device. All Input Reports supported by the device will return the same amount of data even if the data used by the report only uses a portion of that data. The length of these reports should be determined by the host by reading the device capabilities during the enumeration process.
Every report has a "report id" that identifies it. The HID protocol specifies two types of transfers: Control and Interrupt.
Optec Vendor ID (VID): 0x10C4 Pyxis LE Product ID (PID): 0x85B6
The commands are just binary blobs of bytes. Not ASCII strings. For Boolean values, True is represented by the value 255 and False is represented as 0.
The following reports are used by the Pyxis app:
NOTE: Numbers are in base 10 notation.
There is no data associated with output reports. You only need to request the desired Report ID.
Sending this report will clear the Error Flag that is set in the firmware. The Error Flag can be read by requesting the Device Status input report.
The Pyxis LE only supports Control Input Report transfers. This means the device does not initiate transfers.
This report is used to request the device description information. The response contains the following data:
Report ID: 11 (0x0B) Payload Data Length: 16 Bytes
Byte | Description |
---|---|
0 | Report ID |
1 | Firmware Version Major |
2 | Firmware Version Minor |
3 | Firmware Version Revision |
4 | Device Type - ASCII 'A' through 'Z' (Only A is used currently) |
5 | Zero Offset (Int16) - Byte 0 |
6 | Zero Offset (Int16) - Byte 1 |
7 | Sky Position Angle Offset (Int16) - Byte 0 |
8 | Sky Position Angle Offset (Int16) - Byte 1 |
9 | Steps Per Rev. (Int32) - Byte 0 |
10 | Steps Per Rev. (Int32) - Byte 1 |
11 | Steps Per Rev. (Int32) - Byte 2 |
12 | Steps Per Rev. (Int32) - Byte 3 |
13 | Reverse Rotation (Boolean) |
14 | Return To Last (Boolean) |
15 | RESERVED - Unused |
This report is used to request the status from the device. The response contains the following data:
Report ID: 10 (0x0A) Payload Data Length: 18 Bytes
Byte | Description |
---|---|
0 | Report ID |
1 | Current Position (Int32) - Byte 0 |
2 | Current Position (Int32) - Byte 1 |
3 | Current Position (Int32) - Byte 2 |
4 | Current Position (Int32) - Byte 3 |
5 | Target Position (Int32) - Byte 0 |
6 | Target Position (Int32) - Byte 1 |
7 | Target Position (Int32) - Byte 2 |
8 | Target Position (Int32) - Byte 3 |
9 | Is Homed? (Boolean) |
10 | Is Homing? (Boolean) |
11 | Is Moving? (Boolean) |
12 | Backlash Compensation Enabled? (Boolean) |
13 | Error State (Byte) |
14 | Backlash Compensation Steps? (UInt8) |
15 | RESERVED - Unused |
16 | RESERVED - Unused |
17 | RESERVED - Unused |
The "Do Motion" report is used for issuing all motion commands. The Op-Code field is used to determine which operation is performed.
Op-Code | Description |
---|---|
1 | Do Home |
2 | Do move |
3 | Halt |
4 | Set Reverse |
5 | Set Sky Pa Offset |
6 | Set Return To Last |
7 | Set Device Type |
8 | Set Zero Offset |
9 | Restore Defaults |
10 | Set Backlash Comp. Enabled |
11 | Set Backlash Comp. Steps |
The Command Parameters vary based on the op-code that is chosen