The following lines which are part of /online_dir/TkIrc.pl create a widget to inspect the status of the lenses box.
$Spc::res_h{ blsc} = "lbio"; # # LensesBox status in/out # # $Spc::res_h{ lbio_title} = { text => "LensesBox In/Out"}; $Spc::res_h{ lbio_help} = sub { Util::display_text( "Help MC", ' Lenses in/out ' )}; foreach my $i ( 1 .. 5) { $Spc::res_h{ "lbio_io$i"} = { label => { name => "Motor $i ", get => sub { my $in = Spectra::tng_attrLongArrRd( "lensesbox", "EndSwitchIN", $i - 1); my $out = Spectra::tng_attrLongArrRd( "lensesbox", "EndSwitchOUT", $i - 1); if( $in && !$out) { return "In"; } elsif ( $out && !$in) { return "Out"; } else { return "Unknown"; }}}}; }