The following lines which are part of /online_dir/TkIrc.pl create a widget to change the gain and the offset of VFCADCs.
$Spc::res_h{ blsc} = "vfc"; # # # $Spc::res_h{ vfc_title} = { text => "VFC"}; $Spc::res_h{ vfc_help} = sub { Util::display_text( "Help VFC", ' n.n. ' )}; my $i = 1; for my $j ( 1 .. 8) { my $vfc = "VFC$j"; $Spc::res_h{ "VFC_io$i"} = { label => { name => "${vfc} Gain", get => sub { sprintf "%g", Spectra::get_adc_gain( $vfc);}}, entry => { set => sub { Spectra::set_adc_gain( $vfc, $_[0]);}}}; $i++; $Spc::res_h{ "VFC_io$i"} = { label => { name => "${vfc} Offset", get => sub { sprintf "%g", Spectra::get_adc_offset( $vfc);}}, entry => { set => sub { Spectra::set_adc_offset( $vfc, $_[0]);}}}; $i++; $Spc::res_h{ "VFC_io$i"} = { label => { name => "${vfc} Polarity", get => sub { sprintf "%g", Spectra::get_adc_polarity( $vfc);}}, entry => { set => sub { Spectra::set_adc_polarity( $vfc, $_[0]);}}}; $i++; }