diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2013-01-31 09:57:07 -0500 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2013-01-31 09:57:07 -0500 |
commit | 7fd7a5c0241173f88762bcfd9c7a1d9c64b336eb (patch) | |
tree | 4068ad9c8667a9a5b895856d4d7f78124b34377f /libvxi11client/perlbits/Client.pm | |
parent | 688bc207f3bd957d0bee8c5499c05b9e67c2fb03 (diff) |
doc updates
Diffstat (limited to 'libvxi11client/perlbits/Client.pm')
-rw-r--r-- | libvxi11client/perlbits/Client.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm index a170c6c..65e544f 100644 --- a/libvxi11client/perlbits/Client.pm +++ b/libvxi11client/perlbits/Client.pm @@ -191,7 +191,7 @@ VXI11::Client - Perl module for interfacing with VXI-11 networked test and measu vxi_startinterruptserver(); - my $instr = vxi_open(address => "192.168.0.62"); + my $instr = vxi_open(address => "192.168.0.62") or die; $instr->vxi_lock(); $instr->vxi_write("*idn?"); @@ -371,7 +371,7 @@ The only exceptions to this are the read and write methods: use warnings; use VXI11::Client; - my $instr = vxi_open( address => "192.168.0.62" ); + my $instr = vxi_open( address => "192.168.0.62" ) or die; $instr->vxi_write("*idn?"); my ( $bytes, $idn, $reason ) = $instr->vxi_read(); print "This instrument is: $idn\n"; @@ -396,15 +396,17 @@ The only exceptions to this are the read and write methods: my $device = 0; # Only revelant if a VXI-to-GPIB # gateway is used. - my $prompt = "\n> "; - print "\nType your commands. Ctrl+C to exit\n" . $prompt; - vxi_startinterruptserver(); # Launch a server to handle # interrupts from the instrument. my $my_interrupt_handle = "Avtech"; # Each interrupt source needs a name. + print "\nTrying to establish link with $ip_addr..."; + my $instr = vxi_open( address => $ip_addr, device => $device ) or die "Could not open instrument at $ip_addr."; + my $prompt = "\n> "; + print " OK\nType your commands. Ctrl+C to exit\n" . $prompt; + $instr->vxi_write("*ese 60"); # Flag command-related errors. $instr->vxi_write("*sre 48"); # Request service when a response is # available, or an error has occurred. |