diff options
author | Mike <mjc@avtechpulse.com> | 2000-01-01 00:15:27 +0900 |
---|---|---|
committer | Mike <mjc@avtechpulse.com> | 2000-01-01 00:15:27 +0900 |
commit | d6b3b66cfd5266be9f20dd17f9c21082b83a4357 (patch) | |
tree | 7d7b9e5ee373da7020cd858520ac650a1df5b817 | |
parent | 44173fa9f95362d6de4f65a86e6b4c2b864dd49c (diff) |
added a 100 ns minimum dead time requirement
-rw-r--r-- | error_utils.c | 13 | ||||
-rw-r--r-- | flash.c | 1 | ||||
-rw-r--r-- | globals.h | 4 |
3 files changed, 17 insertions, 1 deletions
diff --git a/error_utils.c b/error_utils.c index 713fe0a..9dd45b0 100644 --- a/error_utils.c +++ b/error_utils.c @@ -571,6 +571,10 @@ void get_error_text(gchar **response, int error_num) format_error_text(response,-222,"Burst width can not exceed period."); break; + case Dead_Time_Error: + format_error_text(response,-222,"Insufficient time between end of one pulse and start of next."); + break; + case password_change_error: format_error_text(response,-222,"Incorrect old password, or new password is too long or short. "); break; @@ -979,6 +983,15 @@ int Error_check(ChannelStruct ChannelStateToTest[max_channels]) } if (ChannelStateToTest[i].trigger_source==source_internal) { + + temp=(1/ChannelStateToTest[i].frequency) - globals.Flash.dead_time[i]; + 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=Dead_Time_Error; + } + } + temp=1/ChannelStateToTest[i].frequency; if (temp<globals.Constraints.err_max_pw[i]) { globals.Constraints.err_max_pw[i]=temp; @@ -822,6 +822,7 @@ static void initFlashValues(FlashStruct *mem) mem->load_type_dac[i]=3; mem->output_timer[i]=0; + mem->dead_time[i]=100e-9; mem->current_limit_pulse_mode[i]=220.0; mem->current_limit_dc_mode[i]=120.0; mem->current_limit_full_scale[i]=501.0; @@ -105,6 +105,7 @@ #define CalibrationMinMaxError_burst 91 #define CalibrationMinMaxError_rise 92 #define CalibrationMinMaxError_slew 93 +#define Dead_Time_Error 94 #define YES 1 #define NO 0 @@ -630,8 +631,9 @@ typedef struct { float duty_ampl_mid2[max_channels]; /* addr 8102 */ float distort_fully_below_ampl[max_channels]; /* addr 8110 - used with pulse_width_pol_tweak, see S/N 13453 */ - char spare_char[280]; /* 8118 */ + char spare_char[272]; /* 8118 */ + float dead_time[max_channels]; /* 8390 */ float current_limit_pulse_mode[max_channels]; /* 8398 */ float current_limit_dc_mode[max_channels]; /* 8406 */ float current_limit_full_scale[max_channels]; /* 8414 */ |