Low-Energy Muon (LEM) Experiment  0.5.1
hv_fug.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

INT hv_fug (INT cmd,...)
 

Function Documentation

INT hv_fug ( INT  cmd,
  ... 
)

The FUG high voltage devices are used for the muon transport system in the low energy muon experiment (LEM) at PSI. Since the high voltage devices themselfs only have analog input controls, analog input/output cards of National Instruments (FP-AI-110 / FP-AO-210) are used to connect to the digital world. To control them via a computer a special interface card (FP1000) and bus is used (again National Instrument stuff).

The hard wiring looks like this:

                                   |- FP-RLY-420,bus address 8 (set polarity of FUG HCL devices 8-12)
                                   |- FP-AI-110, bus address 5 (read polarity of FUG HCL devices 8-12)
                                   |- FP-AI-110, bus address 7 (Grid_1, Sample_G1, Sample_G2, Sample)
                                   |- FP-AI-110, bus address 3 (Lense_3, RA-L, RA-R, Guard)
                                   |- FP-AI-110, bus address 2 (Moderator, Lense_1, Mirror, Lense_2)
PC <-- Lantronix/RS232 --> FP1000 -|
                                   |- FP-AO-210, bus address 6 (Grid_1, Sample_G1, Sample_G2, Sample)
                                   |- FP-AO-210, bus address 4 (Lense_3, RA-L, RA-R, Guard)
                                   |- FP-AO-210, bus address 1 (Moderator, Lense_1, Mirror, Lense_2)

i.e. we use

  • 3 analog input cards (FP-AI-110) with each 8 channels to read the HV and the current
  • 3 analog output cards (FP-AO-210) with each 8 channels to write the HV and the current
  • 1 anlog input card (FP-AI-110) with 8 channels to read the polarity of HCL devices (5 devices (8-12) connected in control box)
  • 1 relay module (FP-RLY-420) with 8 channels to set the polarity of HCL devices (5 devices (8-12) connected in control box)

for 12 FUG high voltage devices. Each FUG HV device needs 2 input and 2 output channels (in/out voltage/current).

The new HCL devices (we will use four of them for Grid_1, Sample_G1, Sample_G2, Sample) have the option to change the polarity remotely. This is done by using the relay module FP-RLY-420. The polarity of these devices is monitored by an additional FP-AI-110: +polarity gives ~15V, i.e. overrange at the FP-AI-110 (10.4V max. measurable voltage) -polarity gives ~0V.

For a detailed description of the command language of the field point bus of National Instruments see: Field Point – FP-1000/FP-1001 Programmer Reference Manual.

The ODB equipment definition of the different FUG HV devices is organized as follows: key : /Equipment/HV/Settings/Devices/FUG/DD

With the following entries:

  • No of FP-IO Modules: total number of field point modules
  • Modules: list of all the modules 'x1:name1; x2:name2; ...' with x_i the number of the field point module and name_i the type of the field point module, i.e. FP-1000 for the RS232 communication module.
  • FUG fp mapping input: coded array of all the input channels. The coding is as follows (e.g. Moderator 02 0x0001 02 0x0002 N 00 0x0000):
    • name u_module u_ch i_module i_ch switch_tag module u_ch, with
      • name : name of the fug
      • u_module : voltage readback module (bus address)
      • u_ch : voltage readback channel (channel address)
      • i_module : current readback module (bus address)
      • i_ch : current readback channel (channel address)
      • switch_tag : (Y/N) Y: polarity of the FUG is remote switchable, otherwise N
      • module : if switch_tag = Y, the module of the relais readback (bus address)
      • u_ch : relais readback channel (channel address)
  • FUG fp mapping output: dito to 'FUG fp mapping input' except for the output channels
  • Properties: specification of the FUG's coded as e.g.
    Moderator @ 20.0kV #0.6mA up0.1kV/s down0.0kV/s $0.00kV !0.001mA
       ^        ^       ^       ^          ^          ^        ^
      name   max hv     |     upramp    downramp   default hv  |
                     max current                      default current limit
    
  • Moderator Group: on/off, xkV -> on : i.e. Moderator, Mod_Guard, Mod_Grid form a group where the maximal difference in the HV is x kV, e.g. on, 5kV if 'off' you can do whatever you want
  • Sample Group: dito, where Sample, Sample_G1, Sample_G2 form a group
  • RA Group: dito, where RA-R and RA-L form a group

RS232: 9600 baud, 8 data bits, 1 stop bit, no parity bit, no hardware protocol, no software protocol, termination: \ r (CR)

Definition at line 1790 of file hv_fug.c.

References hKey, hv_fug_exit(), hv_fug_get(), hv_fug_get_current(), hv_fug_get_label(), hv_fug_init(), hv_fug_set(), hv_fug_set_current_limit(), and info.