BLSC for VHSC005 (online -tki)

You may find it convenient to operate the VHSC005N from a BLSC widget (78.1) which is generated by the following lines which are part of /online_dir/TkIrc.pl.

#
# 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]);
      }}};

Figure 78.1: BLSC: VHSC005N
Image blscVHSC005N