THe following lines operate the VHSC005N HV power supply. The widget can be found below 14.11.
#
# from /online_dir/TkIrc.pl
#
$Spc::res_h{ blsc} = "vhsc005n, otherItems";
#
#
#
$Spc::res_h{ vhsc005n_title} = { text => "VHSC005N"};
$Spc::res_h{ vhsc005n_help} = sub
{
Util::display_text( "Help VHSC005N",
'
Ramp
A parameter that applies to all channels of a module. The unit
is per cent of -500 per second. The maximum is 20.
Exec
Starts the ramp
Stop
Changes the setpoint to the actual value.
'
)};
my @list = split ' ', Spectra::get_devices( "HV_PS");
my $i = 1;
for my $hv ( @list)
{
$Spc::res_h{ "VHSC005N_io$i"} = {
label => { name => "${hv} [V]",
get => sub { sprintf "%g", Spectra::vhsc005n( $hv, "VoltageMeasure");}},
entry => { set => sub { Spectra::vhsc005n( $hv, "VoltageSet", $_[0]);}}};
$i++;
}
$Spc::res_h{ "VHSC005N_io$i"} = {
label => { name => "Ramp [1-20]",
get => sub { sprintf "%g", Spectra::vhsc005n( $list[0], "VoltageRampSpeed");}},
entry => { set => sub { Spectra::vhsc005n( $list[0], "VoltageRampSpeed", $_[0]);
}}};