|
| |
#======================================================================= # quad.sl - Quadrupole poles (with remote C++ calls) # # Controls the voltage oscillations on the quadrupole poles # and updates potential energy surface display. # # HISTORY: # 2003-11 - ported to SL (D.J.Manura, Scientific Instrument Services, Inc.) # Based on QUAD.PRG example in SIMION 7.0 (David A. Dahl) # $Revision: 1.2 $ $Date: 2004/07/17 20:54:46 $ #======================================================================= #===== variables adjustable pe_update_each_usec = 0.05 # PE display update time step (in usec) static next_pe_update = 0.0 # Next PE display update time (in usec) static scaled_rf = 0.0 # scaled RF base static omega = 1.0 # frequency (in radians / usec) static theta = 0.0 # phase offset (in radians) static remote_init_flag = 0 # flag whether remote code has # been initialized yet declaresub remote_init(scaled_rf, theta, omega) remote(1) declaresub voltage_control(tof) returns(volt1, volt2) remote(2) #=== subroutines # generates trap rf with fast adjust sub fast_adjust if remote_init_flag == 0 remote_init(scaled_rf, theta, omega) remote_init_flag = 1 endif (adj_elect01, adj_elect02) = voltage_control(ion_time_of_flight) endsub # used to control pe surface updates sub other_actions if ion_time_of_flight < next_pe_update exit endif next_pe_update = ion_time_of_flight + pe_update_each_usec update_pe_surface = 1 endsub |
|
Please report any errors/comments regarding this web page:
