summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libvxi11client/perlbits/Client.pm52
1 files changed, 25 insertions, 27 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index 076c5a2..12e8214 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -244,33 +244,33 @@ the ports it allocates.
Shutdown the local RPC server.
-=item $inst = vxi_open( address => STRING, [device => STRING] );
+=item $instr = vxi_open( address => STRING, [device => STRING] );
Open a link to an instrument. Use the returned instance to call
the object methods below.
-=item $retcode = $inst->vxi_close();
+=item $retcode = $instr->vxi_close();
Destroy the link to the insturment and destroy the local RPC client.
You must not use an instance created with vxi_open(); after calling this.
-=item $retcode = $inst->vxi_lock([waitforlock => 'false']);
+=item $retcode = $instr->vxi_lock([waitforlock => 'false']);
Lock the instrument. You can tell the instrument to try to wait for
the lock to become free and lock it via waitforlock,
-=item $retcode = $inst->vxi_unlock();
+=item $retcode = $instr->vxi_unlock();
Unlock the instrument. Only makes sense if you are holding the lock.
-=item $retcode = $inst->vxi_write(data, [ len => -1, waitforlock => 0, end => 1 ]);
+=item $retcode = $instr->vxi_write(data, [ len => -1, waitforlock => 0, end => 1 ]);
Write data to the instrument. If the data is a terminated string you can
pass -1 as the length to have it calculated for you. If the data is not
terminated or for some reason you only want to write part of it you need
to provide a length. You can wait for the lock to be freed by via waitforlock.
-=item ($bytes, $data, $reason) = $inst->vxi_read([ bufferlen => 1024, waitforlock => 0, termchrset => 0, termchr => 0, autochomp => 1]);
+=item ($bytes, $data, $reason) = $instr->vxi_read([ bufferlen => 1024, waitforlock => 0, termchrset => 0, termchr => 0, autochomp => 1]);
Read some data from the instrument. The default parameters should be fine
for most cases. If you need to read more than 1024 bytes you should pass
@@ -285,20 +285,20 @@ from the returned data will be automatically removed.
Send a command to the instrument possibly with some data. The rules for write apply
to datain and the rules for read apply for dataout.
-=item $retcode = $inst->vxi_abort();
+=item $retcode = $instr->vxi_abort();
-Abort an in-progress operation.
+Tell the instrument to abort an in-progress operation, if possible.
-=item $retcode = $inst->vxi_readstatusbyte([ waitforlock => 0 ]);
+=item $retcode = $instr->vxi_readstatusbyte([ waitforlock => 0 ]);
-Read the instruments status byte.
+Read the instrument's status byte.
-=item $retcode = $inst->vxi_create_intr_chan();
+=item $retcode = $instr->vxi_create_intr_chan();
Creates an interrupt channel from the instrument to this client.
This must be called after vxi_startinterruptserver.
-=item $retcode = $inst->vxi_enable_srq(STRING handle);
+=item $retcode = $instr->vxi_enable_srq(STRING handle);
Tell the instrument to fire interrupts/service requests to the
interrupt channel. Must be called after vxi_create_intr_chan().
@@ -306,13 +306,13 @@ You should give a unique channel handle for each instrument as
you will need this to work out which device set an interrupt/service
request.
-=item $retcode = $inst->vxi_disable_srq();
+=item $retcode = $instr->vxi_disable_srq();
Tell the instrument that you don't want it to send interrupts/
service requests anymore. This does not destroy the interrupt
channel.
-=item $retcode = $inst->vxi_destroy_intr_chan();
+=item $retcode = $instr->vxi_destroy_intr_chan();
Tell the instrument to disconnect from the interrupt service that
is running locally. This does not shut down the interrupt service.
@@ -326,21 +326,21 @@ You can pass a timeout in ms (the default is 250ms), or 0 to never block
and only return interrupts that have already happened or -1 to block until
an interrupt is caught (could block forever!).
-=item $retcode = $inst->vxi_remote([waitforlock => 0]);
+=item $retcode = $instr->vxi_remote([waitforlock => 0]);
-Lock out the instrument's display.
+Lock out the instrument's local controls (typically the front panel).
-=item $retcode = $inst->vxi_local([waitforlock => 0]);
+=item $retcode = $instr->vxi_local([waitforlock => 0]);
-Unlock the instrument's display.
+Unlock the instrument's local controls.
-=item $retcode = $inst->vxi_clear([waitforlock => 0]);
+=item $retcode = $instr->vxi_clear([waitforlock => 0]);
-Clear the instruments's display.
+Clear the instrument's display.
-=item $retcode = $inst->vxi_trigger([waitforlock => 0]);
+=item $retcode = $instr->vxi_trigger([waitforlock => 0]);
-Trigger the instrument.
+Trigger the instrument, if the instrument supports this capability.
=item Integer return codes
@@ -353,7 +353,7 @@ Return codes work like this:
incorrect, i.e. calling to enable interrupts before creating the channel
or that the server couldn't be contacted
-< 0 - Any negative value is the negated VXI-11 error code from the server"
+< 0 - Any negative value is the negated VXI-11 error code from the server
The only exceptions to this are the read and write methods:
@@ -368,13 +368,11 @@ The only exceptions to this are the read and write methods:
=head2 MINIMAL IDENTIFICATION SCRIPT
#!/usr/bin/perl
- use strict;
- use warnings;
use VXI11::Client;
- my $instr = vxi_open( address => "192.168.0.62" ) or die;
+ $instr = vxi_open( address => "192.168.0.62" ) or die;
$instr->vxi_write("*idn?");
- my ( $bytes, $idn, $reason ) = $instr->vxi_read();
+ ( $bytes, $idn, $reason ) = $instr->vxi_read();
print "This instrument is: $idn\n";
$instr->vxi_close();