blob: b487ab42159b6b5d07946ac031dfa83f5885bb45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
use strict;
use warnings;
use VXI11::Client;
&VXI11::Client::vxi_startinterruptserver();
my $instr = &VXI11::Client::vxi_open("roi", 0);
$instr->vxi_lock(0);
$instr->vxi_write("*IDN?", -1, 0, 0);
my ($bytes, $buff) = $instr->vxi_read(256, 0, 0, 0);
print "got " . $bytes . ";" . $buff . "\n";
$instr->vxi_readstatusbyte(0);
$instr->vxi_create_intr_chan();
$instr->vxi_enable_srq(1, "myhandle");
&VXI11::Client::vxi_wait_for_interrupt();
$instr->vxi_enable_srq(0, "");
$instr->vxi_destroy_intr_chan();
$instr->vxi_abort();
$instr->vxi_clear(0);
$instr->vxi_trigger(0);
$instr->vxi_local(0);
$instr->vxi_remote(0);
$instr->vxi_unlock();
$instr->vxi_close();
&VXI11::Client::vxi_stopinterruptserver();
|