summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-23 14:23:51 -0500
committerMichael J. Chudobiak <mjc@avtechpulse.com>2013-01-23 14:23:51 -0500
commitee32702cf80393192807fbee425d919e6bef6e44 (patch)
tree08568e16e830d168128c434c4c834dab2452f18d /libvxi11client
parent38c1a469e5931763e9775e0046e47fc4ba836a46 (diff)
update SYNOPSIS
Diffstat (limited to 'libvxi11client')
-rw-r--r--libvxi11client/perlbits/Client.pm22
1 files changed, 12 insertions, 10 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index 3c24def..9405464 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -81,23 +81,25 @@ VXI11::Client - Perl extension for interfacing with VXI-11 networked instruments
vxi_startinterruptserver();
- my $instr = vxi_open("myintrumentshostname", 0);
+ my $instr = vxi_open("192.168.0.62", 0);
$instr->vxi_lock(0);
- $instr->vxi_write("*IDN?", -1, 0, 0);
- my ($bytes, $buff, $reason) = $instr->vxi_read(256, 0, 0, 0);
- print "got " . $bytes . ";" . $buff . "\n";
+ $instr->vxi_write("*idn?");
+ my ($bytes, $buff, $reason) = $instr->vxi_read();
+ print "got " . $bytes . ";" . $buff . " reason " . $reason ."\n";
my ($error, $statusbyte) = $instr->vxi_readstatusbyte(0);
+ printf "status byte is " . $statusbyte . "\n";
+
$instr->vxi_create_intr_chan();
- $instr->vxi_enable_srq(1, "myhandle");
- vxi_wait_for_interrupt();
- $instr->vxi_enable_srq(0, "");
+ $instr->vxi_enable_srq("myhandle");
+ vxi_wait_for_interrupt();
+ $instr->vxi_disable_srq();
$instr->vxi_destroy_intr_chan();
- $instr->vxi_abort();
- $instr->vxi_clear(0);
+ $instr->vxi_abort();
+ $instr->vxi_clear(0);
$instr->vxi_trigger(0);
- $instr->vxi_local(0);
+ $instr->vxi_local(0);
$instr->vxi_remote(0);
$instr->vxi_unlock();