agstat
Read the TEC200 advanced-control status without changing settings.
Usage
agstat
The command accepts no arguments. Its response contains thirteen space-separated values in this order:
| Position | Field | Meaning |
|---|---|---|
| 1 | mode |
0 for standard control, 1 for current-scheduled PI. |
| 2 | profile_valid |
1 when a valid advanced profile is installed, otherwise 0. |
| 3 | knots |
Number of current points in the profile: 2 or 3, or 0 before a profile is installed. |
| 4 | error_sticky |
1 when a TEC calculation or output-update error is latched. This is an error-history indication, not the current output-enable state. |
| 5 | fallback |
1 when the last successful advanced-control update selected the fallback gains. |
| 6 | current_valid |
1 when current feedback has an available sample timestamp, otherwise 0. This field alone does not establish freshness or a finite current value. |
| 7 | age_ms |
Current-feedback age in ms, or 0 when no sample timestamp is available. Interpret it together with current_valid. |
| 8 | current_A |
Measured TEC current in A. |
| 9 | Kp |
Active proportional gain in V/°C. |
| 10 | Ki |
Active integral gain per control update, equal to Kp/Ti divided by the sampling rate. |
| 11 | request_V |
Last successful advanced-control voltage request in V. |
| 12 | target_V |
Current TEC output-voltage target in V. |
| 13 | measured_V |
Measured TEC output voltage in V. |
The first seven fields are integers; the remaining fields have five decimal places. Active gains and the last request are zero after the advanced PI state is reset, until a successful update occurs.
Current feedback that is missing, non-finite, or more than 250 ms old causes an advanced-control update to use fallback gains. The fallback field describes the last successful update and may not reflect a feedback change that has just occurred. Read tecon separately for the enable state and err for the complete error mask.
Use agmode to select the control mode, and agp2 or agp3 to read or install a profile.