diff options
-rw-r--r-- | error_utils.c | 9 | ||||
-rw-r--r-- | globals.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c index 50bc75d..d339bdf 100644 --- a/error_utils.c +++ b/error_utils.c @@ -42,6 +42,7 @@ void set_gpib_error_flags (int error_num) case InvalidChannel: case ThisShouldntHappen: case ampl_min_max_obsolete: + case zero_equiv_ampl_too_large: GPIB_Set_Command_Error(); break; case query_error_interrupted: @@ -542,6 +543,10 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-200,"Ampl min/max mode is obsolete. Use fixed ampl points instead."); break; + case zero_equiv_ampl_too_large: + format_error_text(response,-200,"Ampl zero equivalent is too high. Reprogram it."); + break; + default: format_error_text(response,-200,"Specific problem unknown."); } @@ -701,6 +706,10 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) report_error = ampl_min_max_obsolete; } + if (fabs(globals.Flash.ampl_zero_equiv[i] > 200.0)) { + report_error = zero_equiv_ampl_too_large; + } + /* calculate maximum duty cycle based on amplitude and load, for later use */ max_duty_high_ampl=globals.Flash.max_duty_high[i]; @@ -92,6 +92,7 @@ #define ExternalModeDelayError 78 #define PRF_limited_by_offset 79 #define ampl_min_max_obsolete 80 +#define zero_equiv_ampl_too_large 81 #define YES 1 |