#!/usr/bin/perl use strict; use warnings; use VXI11::Client; vxi_startinterruptserver(); my $instr = vxi_open("myipaddr"); $instr->vxi_lock(); $instr->vxi_write("*idn?"); my ($bytes, $buff, $reason) = $instr->vxi_read(); print "got " . $bytes . ";" . $buff . " reason " . $reason ."\n"; my ($error, $statusbyte) = $instr->vxi_readstatusbyte(); printf "status byte is " . $statusbyte . "\n"; $instr->vxi_create_intr_chan(); $instr->vxi_enable_srq("myhandle"); for (my $i = 0; $i < 10000; $i++) { vxi_wait_for_interrupt(); } $instr->vxi_disable_srq(); $instr->vxi_destroy_intr_chan(); $instr->vxi_abort(); $instr->vxi_clear(); $instr->vxi_trigger(); $instr->vxi_local(); $instr->vxi_remote(); $instr->vxi_unlock(); $instr->vxi_close(); vxi_stopinterruptserver();