summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike <mjc@avtechpulse.com>2000-01-01 00:07:36 +0900
committerMike <mjc@avtechpulse.com>2000-01-01 00:07:36 +0900
commit1ae68e9c98e9a7ddc739be06e1b2e52eaa5dfc94 (patch)
tree152deb27587ccad36fa6dd24cc9e7a29b1fba5ea
parentedcded41390eee63f06022bb7dbd4524510b55cd (diff)
Use 500 ns PW for IL710 initialization, to force use of PGC-P,-N in AVR-E3-W3
-rw-r--r--instr-daemon.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/instr-daemon.c b/instr-daemon.c
index c475589..fa16202 100644
--- a/instr-daemon.c
+++ b/instr-daemon.c
@@ -221,6 +221,8 @@ int main(int argc, char **argv)
GError *error = NULL;
GIOChannel* stdinChannel = NULL;
+ float use_pw;
+
g_type_init ();
g_thread_init (NULL);
@@ -271,14 +273,21 @@ int main(int argc, char **argv)
int j;
for (j=0;j<ampl_polarities;j++) {
- // do each polarity
- Set_Amplitude(0,j,1,0,0,0,0,i,0.0,0);
- Set_Trig_Source(i,source_hold);
+ // Set to PW to 500 ns, if possible.
+ // Wide enough to use PGC in AVR-E3-W3.
+ use_pw = MAX(globals.Flash.min_pw[i], 500e-9);
+ use_pw = MIN(globals.Flash.max_pw[i], use_pw);
+ Set_Pw(0,0,0,i,use_pw,0);
- if (globals.Flash.volt_ctrl_pw[i]) {
- Set_Use_Vctrl_PW_Range(i,FALSE);
+ // do each polarity
+ if (j == 0) {
+ Set_Amplitude(0,0,0,0,0,0,0,i,smallest_allowed_number,0);
+ } else {
+ Set_Amplitude(0,0,0,0,0,0,0,i,-smallest_allowed_number,0);
}
+ Set_Trig_Source(i,source_hold);
+
// trigger IL710 twice to initialize it
Set_Output_State(i,output_on);
Set_Trig_Source(i,source_immediate);