The following script can be part of /online_dir/TkIrc.pl. The function returns a string. In practice the string may be constructed from some values that are created at run-time.
sub Spectra::fio_parameters
{
my ($status, $ret, $line);
$line = "";
foreach my $adr( qw( 10 11 12))
{
gpib_write( $adr, "U0X");
$status = gpib_read( $adr, 30);
$ret = substr( $status, 24, 3);
$line .= " K_$adr = $ret \n";
}
return $line;
}