Revision 24fffb6b06aae1f192b40051fbbb060ed168f893

HW/IT/GTE_Tabletop/Documentation/index

Changes from 24fffb6b06aae1f192b40051fbbb060ed168f893 to 756977dc38eca5711e73c06f95a496e87b146402

---
format:markdown
...

# Help on module gte\_control:

## NAME

    gte\_control

=======
# Help on module gte\_control:

## NAME

    gte\_control

## DATA

    ### home - folder where file is executing
    * home - folder where file is executing

    ### noscp = False
    * noscp = False
     
    ### IP = "http://192.168.254.2/" - ip adress of quido eth

    ### osc\_ip = '192.168.254.10' - ip adress of osciloscope

    ### sc = 1 - relay for shortcutting the condenser, defualt is shortcutted

    ### ch = 2 - relay for charging the condenser

    ### trig = 6 - relay for simulating trigger

    ### cur\_stab = 7 - relay for switching curent stability, defualt is no stabilization, currently unused
    * IP = "http://192.168.254.2/" - ip adress of quido eth

    ### dch = 8 - relay for conecting condenser to discharging circuits
    * osc\_ip = '192.168.254.10' - ip adress of osciloscope

    ### osc_ip = '192.168.254.10' - ip adress of osciloscope
    * sc = 1 - relay for shortcutting the condenser, defualt is shortcutted

    ### sc = 1 - relay for shortcutting the condenser, defualt is shortcutted
    * ch = 2 - relay for charging the condenser

    ### ch = 2 - relay for charging the condenser
    * trig = 6 - relay for simulating trigger

    ###trig = 6 - relay for simulating trigger
    * cur\_stab = 7 - relay for switching curent stability, defualt is no stabilization, currently unused

    ### cur_stab = 7 - relay for switching curent stability, defualt is no stabilization, currently unused
    * dch = 8 - relay for conecting condenser to discharging circuits

    ### dch = 8 - relay for conecting condenser to discharging circuits
    * osc\_ip = '192.168.254.10' - ip adress of osciloscope

    ### u\_coil = 1 - osciloscope channel with coil voltage
    * u\_coil = 1 - osciloscope channel with coil voltage


## FUNCTIONS
    ### add_num(num, name='counter.txt')
    * add_num(num, name='counter.txt')

        Adds 1 to num ands saves as shot number into counter file.
        Input:
        num -- int, number of previous shot
        name = counter.txt -- string, name of file containign counter
    
    ### charge(wait=2, url='http://192.168.254.2/', shortcut=1, charging=2)
    * charge(wait=2, url='http://192.168.254.2/', shortcut=1, charging=2)

        Charges condenser.
        Input:
            wait = 2 -- duration of charging in seconds
            url = IP -- ip adress of I/O module
            shortcut = sc -- number of relay switching shortcutting
            charging = ch -- number of relay switching charging
    
    ### close_all(url='http://192.168.254.2/')
    * close_all(url='http://192.168.254.2/')

        Switches all relays to defaul position, called 'off'.
        Input:
            url = IP -- ip adress of I/O module
    
    discharge(wait=0.5, stab=False, url='http://192.168.254.2/', disch=8, cstab=7, delay=0.1)
    * discharge(wait=0.5, stab=False, url='http://192.168.254.2/', disch=8, cstab=7, delay=0.1)
      
        Discharges condenser.
        Input:
            wait = 0.5 -- delay between opening discharging relay and shortcutting condenser
            stab_i = False -- toggles current stabilisation
            url = IP -- ip adress of I/O module
            disch = dch -- number of relay switching discharging
            thyr = th --number of relay switching thyristor
    
    get_num(name='counter.txt')
    *get_num(name='counter.txt')

        Loads shot number from file.
        Input:
        name = counter.txt -- string, name of file containign counter
    
    input_read(num, url='http://192.168.254.2/')
        Gets input messured on I/O module's input numbered num
        Input:
            num -- number of input
            url = IP -- ip adress of I/O module
        Output:
            val -- int, 1 or 0 representing logical values on or off
    
    make_graphs(graphs, save=False)
    
    shot(wait=0.1, chwait=2, dchwait=0.5, url='http://192.168.254.2/', stab_i=False, cstab=7, graphs=[], save=False, noscope=False)
        Executes Golem tokamak like shot: charges and discharges condenser.
        Input:
            wait = 0.1 -- delay between charge and discharge in seconds
            chwait = 2 -- duration of charging in seconds
            dchwait = 0.5 -- duration of discharge in seconds
            url = IP -- ip adress of I/O module
            stab_i = False -- toggles current stabilisation
            cstab = cur_stab -- number of relay switching current stabilisation on
            graphs = [] -- numbers of channels on osciloscope to be ploted
            save = False -- enables saving graphs to file
            noscope = False -- disables osciloscope
        Output:
            none or graphs
    
    switch_off(num, url='http://192.168.254.2/')
        Switches off relay numbered num.
        Input:
            num -- number of relay to be switched
            url = IP -- ip adress of I/O module
    
    switch_on(num, url='http://192.168.254.2/')
        Switches on relay numbered num.
        Input:
            num -- number of relay to be switched
            url = IP -- ip adress of I/O module