diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 01:39:49 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 01:39:49 +0900 |
commit | a8d0193faeab4003b7b356df5125b80924c795d9 (patch) | |
tree | f20bc2d77ec664b14360f777639cb675f23b1b8e | |
parent | 22d14fa90698c21b05d3eda2f65d7db9498e9a57 (diff) |
limit double pulse mode delay to 50% of periodINSTRUMENT_6_2_30c
-rw-r--r-- | error_utils.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/error_utils.c b/error_utils.c index 24a9af5..f146129 100644 --- a/error_utils.c +++ b/error_utils.c @@ -887,7 +887,8 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } if (ChannelStateToTest[i].double_pulse==double_on) { - temp=0.95/(ChannelStateToTest[i].pw+fabs(ChannelStateToTest[i].delay)); + // pulse sep must be less than one half-period + temp = 0.5 / ChannelStateToTest[i].delay; 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])) { @@ -954,6 +955,10 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) report_error=Double_Separation_Too_Small; } } + + if (ChannelStateToTest[i].burst_count>1) { + report_error=Cant_Do_Burst_and_Double; + } } if (ChannelStateToTest[i].trigger_source==source_internal) { @@ -994,20 +999,6 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } } - if (ChannelStateToTest[i].double_pulse==double_on) { - temp=(0.95/ChannelStateToTest[i].frequency)-ChannelStateToTest[i].delay; - if (temp<globals.Constraints.err_max_pw[i]) { - globals.Constraints.err_max_pw[i]=temp; - if (ChannelStateToTest[i].pw>(1.001*globals.Constraints.err_max_pw[i])) { - report_error=Double_Separation_Too_Large; - } - } - - if (ChannelStateToTest[i].burst_count>1) { - report_error=Cant_Do_Burst_and_Double; - } - } - if ((globals.Flash.max_avg_ampl[i]) > 0.0 && (fabs(ChannelStateToTest[i].amplitude)) > 0.0) { temp=100.0 * globals.Flash.max_avg_ampl[i] / (fabs(ChannelStateToTest[i].amplitude) * ChannelStateToTest[i].frequency * duty_scale); @@ -1104,7 +1095,8 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } if (ChannelStateToTest[i].double_pulse==double_on) { - temp=(0.95/ChannelStateToTest[i].frequency)-ChannelStateToTest[i].pw; + // one half-period + temp = 0.5 / ChannelStateToTest[i].frequency; if (temp<globals.Constraints.err_max_delay[i]) { globals.Constraints.err_max_delay[i]=temp; if ( (globals.Constraints.err_max_delay[i]>=0.0 && ChannelStateToTest[i].delay>(1.001*globals.Constraints.err_max_delay[i])) |