SIMION® Industry standard charged particle optics simulation software.
Newsflash: SIMION 8.1.1 is here: dielectrics, new examples + preview of permeability; ASMS2012 posters; major improvements to enhanced surface accuracy feature coming soon (details in Check for Updates).
About | Documentation | Community/Support | Downloads | Ordering
The SIMION SL™ Toolkit (version 1.2.1.0 - 2004-11-09)
#=======================================================================
# 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:
  Name/e-mail/phone (optional):
 
The SIMION SL Toolkit™ and documentation is (c) 2003-2004 Scientific Instrument Services, Inc. All Rights Reserved.
Any comments on this web page? (will be sent to SIS)
[Optional] Your name: email: phone/fax:
The SL Tookit™ and documentation is (c) 2003 Scientific Instrument Services, Inc. All Rights Reserved.
(c) 2003-2006 Scientific Instrument Services, Inc. (SIS). Contact SIS.