diff options
author | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:45:30 +0900 |
---|---|---|
committer | root <root@avtech.domain.avtechpulse.com> | 1970-01-01 09:45:30 +0900 |
commit | b69ba4a8be5b0410c9d93537be4824658904040e (patch) | |
tree | 9198a9d69144dd4d07b1efde106f2975845e031f /error_utils.c | |
parent | 92572cdd82ef8cce33eb52359f14ab0f2b13bd12 (diff) |
limit maximum PRF if offset is high in 101x-OT unitsINSTRUMENT_6_0_2d
Diffstat (limited to 'error_utils.c')
-rw-r--r-- | error_utils.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/error_utils.c b/error_utils.c index 5515181..0a77019 100644 --- a/error_utils.c +++ b/error_utils.c @@ -480,6 +480,10 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-221,"If ampl > 0, ampl+offset must be > 0, if ampl < 0, ampl+offset must be < 0."); break; + case PRF_limited_by_offset: + format_error_text(response,-221,"Offset too high for this PRF."); + break; + case PW_Distort_Error: format_error_text(response,-240,"Not possible with the current PW distortion settings."); break; @@ -761,6 +765,19 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) report_error=freq_upper_limit; } + if ( (globals.Flash.max_freq_for_high_ot[i] > 0.0) && + (fabs(ChannelStateToTest[i].offset) > globals.Flash.high_ot[i])) { + + temp = globals.Flash.max_freq_for_high_ot[i]; + if (temp<globals.Constraints.err_max_freq[i]) { + globals.Constraints.err_max_freq[i]=temp; + if (ChannelStateToTest[i].frequency>(1.001*globals.Constraints.err_max_freq[i])) { + report_error=PRF_limited_by_offset; + } + } + + } + if (fabs(ChannelStateToTest[i].delay)>1.0e-15) { temp=0.95/fabs(ChannelStateToTest[i].delay); if (temp<globals.Constraints.err_max_freq[i]) { @@ -1205,6 +1222,17 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } } + if ( (globals.Flash.max_freq_for_high_ot[i] > 0.0) && + (ChannelStateToTest[i].frequency > globals.Flash.max_freq_for_high_ot[i])) { + + temp = -globals.Flash.high_ot[i]; + if (temp>globals.Constraints.err_min_offset[i]) { + globals.Constraints.err_min_offset[i]=temp; + if (ChannelStateToTest[i].offset<=globals.Constraints.err_min_offset[i]) { + report_error=PRF_limited_by_offset; + } + } + } /* ------------------------------- */ @@ -1239,6 +1267,18 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } } + if ( (globals.Flash.max_freq_for_high_ot[i] > 0.0) && + (ChannelStateToTest[i].frequency > globals.Flash.max_freq_for_high_ot[i])) { + + temp = globals.Flash.high_ot[i]; + if (temp<globals.Constraints.err_max_offset[i]) { + globals.Constraints.err_max_offset[i]=temp; + if (ChannelStateToTest[i].offset>=globals.Constraints.err_max_offset[i]) { + report_error=PRF_limited_by_offset; + } + } + } + /* ------------------------------- */ } } |