Document single-shot measurement and test config commands (8C 2B, 8C 7B)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
67
PROTOCOL.md
67
PROTOCOL.md
@@ -55,9 +55,28 @@ variable-length data after the 2-byte header.
|
||||
| `78` | write | 7 | 2 | Set AC parameter (sub + float32) |
|
||||
| `79` | read | 2 | 20 | Read power supply settings |
|
||||
| `7A` | write | 3 | 2 | Set output mode (`00`=AC, `01`=DC) |
|
||||
| `7B` | read | 2 | 2 | Read output mode |
|
||||
| `7B` | read | 2 | 2 | Read test config |
|
||||
| `2B` | write | var | 2 | Write test config (see below) |
|
||||
|
||||
## Measurement Sequence
|
||||
## Measurement Sequences
|
||||
|
||||
### Single-Shot Measurement
|
||||
|
||||
The vendor software uses this flow for one-off readings. No explicit start
|
||||
command is needed — the stop command (`8C 0E 02`) triggers a single reading.
|
||||
|
||||
```
|
||||
1. TX 8C 00 -> Identify (expect "HPCS6500" in response)
|
||||
2. TX 8C 2A -> Read device config
|
||||
3. TX 8C 01 <uint32> -> Set integration time (µs), 0 = auto
|
||||
4. TX 8C 0E 02 -> Stop / trigger single reading
|
||||
5. TX 8C 03 -> Poll state until byte[2] = 0x01 (data ready)
|
||||
6. TX 8C 13 -> Read measurement data (3904 bytes)
|
||||
7. TX 8C 77 -> Read electrical data (1584 bytes)
|
||||
8. TX 8C 25 -> Reset instrument
|
||||
```
|
||||
|
||||
### Continuous Measurement
|
||||
|
||||
```
|
||||
1. TX 8C 00 -> Identify (expect "HPCS6500" in response)
|
||||
@@ -66,7 +85,7 @@ variable-length data after the 2-byte header.
|
||||
4. TX 8C 78/73 ... -> Configure voltage/frequency/current as needed
|
||||
5. TX 8C 01 <uint32> -> Set integration time (µs), or skip for auto
|
||||
6. TX 8C 72 00 -> Turn PSU output ON
|
||||
7. TX 8C 0E 01 -> Start measurement
|
||||
7. TX 8C 0E 01 -> Start continuous measurement
|
||||
8. TX 8C 03 -> Poll state until byte[2] = 0x01 (data ready)
|
||||
9. TX 8C 13 -> Read measurement data (3904 bytes)
|
||||
10. TX 8C 77 -> Read electrical data (1584 bytes)
|
||||
@@ -288,6 +307,48 @@ Common values: 200000 (200 ms), 500000 (500 ms), 1000000 (1000 ms).
|
||||
|
||||
16-byte response: `8C 00` + `"HPCS6500\0\0"` + 4 bytes device metadata.
|
||||
|
||||
## Test Configuration (`8C 2B`)
|
||||
|
||||
The vendor software sends this before each measurement to configure test
|
||||
parameters. It consists of two sub-commands (sub `00` and sub `01`).
|
||||
|
||||
### Sub 00 — Test Parameters
|
||||
|
||||
```
|
||||
TX: 8C 2B 00 <~58 bytes> -> Write test parameters
|
||||
RX: 8C 2B -> ACK
|
||||
```
|
||||
|
||||
Known fields within the sub 00 payload (offsets from start of payload after sub byte):
|
||||
|
||||
| Offset | Type | Field | Example |
|
||||
|--------|---------|---------------------|----------------|
|
||||
| 15 | float32 | Frequency? | 50.0 |
|
||||
| 35-55 | float32 | Five x 1.0 values | 1.0 each |
|
||||
| 55 | float32 | Scale factor? | 0.5 |
|
||||
|
||||
### Sub 01 — Auto-PSU Flag
|
||||
|
||||
```
|
||||
TX: 8C 2B 01 <~44 bytes> -> Write test config
|
||||
RX: 8C 2B -> ACK
|
||||
```
|
||||
|
||||
| Offset | Type | Field |
|
||||
|--------|-------|----------------------------------------|
|
||||
| 37 | uint8 | Auto-PSU: `01` = on with test, `00` = off |
|
||||
|
||||
When auto-PSU is enabled (`01`), the device automatically turns the PSU on
|
||||
before measuring and off after. When disabled (`00`), the PSU must be
|
||||
controlled manually via `8C 72`.
|
||||
|
||||
### Read Configuration (`8C 7B`)
|
||||
|
||||
```
|
||||
TX: 8C 7B -> Read current test config
|
||||
RX: 8C 7B -> ACK (config is returned via subsequent 8C 2B reads?)
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- The instrument computes all photometric, colorimetric, and radiometric
|
||||
|
||||
Reference in New Issue
Block a user