Re: Working with secondary addresses
John <[email protected]> Tue, 31 Mar 2026 12:03:21 +0100
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------pA0XIfvk96qSAWubzyjJw0eH
Content-Type: multipart/alternative;
boundary="------------mJtQKXmTQCtC4PijrYt4kBnD"
--------------mJtQKXmTQCtC4PijrYt4kBnD
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Thank you for the feedback and sorry, yes, I forgot to attach the
latest versions of the code, which I have now done.
The FIND statements were originally different as I just copied examples
without a full understanding of the parameters. In the current versions
of the scripts they are now equivalent:
cmd_find = gpib.dev( 0, paddr, 0x7B, gpib.T10s, eot, 0 )
my $dev_find = LinuxGpib::ibdev(0, 5, 0x7B, 12, 1, 0);
I originally just removed the 0x0D as it was just omitted in some
examples, but have now added a '0' for consistency. It makes no
difference. It is unclear to me as to whether it needs a zero in there
or not?
I also found it a little confusing that linux-gpib referrs to EOI as EOT
and initially wondered what this EOT parameter was, but having sorted
that out, the variable 'eot' is set to 1 at the beginning of the Python
script. The Tektronix 405x usually signals EOI at the end of
transmission so an EOI signal would be expected.
On 30/03/2026 22:43, Christian Grosz wrote:
> Hi John,
>
> I do not know if I see the latest version of your code. But I noticed a
> differenent EOS between perl and python.
>
> my $dev_find = LinuxGpib::ibdev(0, 5, 0x7B, 12, 1, 0);
>
> cmd_find = gpib.dev( 0, paddr, 0x7B, gpib.T10s, eot, 0x0D )
>
>
> Christian
>
--------------mJtQKXmTQCtC4PijrYt4kBnD
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thank you for the feedback and sorry, yes, I forgot to attach
the latest versions of the code, which I have now done.</p>
<p>The FIND statements were originally different as I just copied
examples without a full understanding of the parameters. In the
current versions of the scripts they are now equivalent:</p>
<p><span style="white-space: pre-wrap">cmd_find = gpib.dev( 0, paddr, 0x7B, gpib.T10s, eot, 0 )</span></p>
<p><span style="white-space: pre-wrap">my $dev_find = LinuxGpib::ibdev(0, 5, 0x7B, 12, 1, 0);</span></p>
<p>I originally just removed the 0x0D as it was just omitted in some
examples, but have now added a '0' for consistency. It makes no
difference. It is unclear to me as to whether it needs a zero in
there or not?</p>
<p>I also found it a little confusing that linux-gpib referrs to EOI
as EOT and initially wondered what this EOT parameter was, but
having sorted that out, the variable 'eot' is set to 1 at the
beginning of the Python script. The Tektronix 405x usually signals
EOI at the end of transmission so an EOI signal would be expected.</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 30/03/2026 22:43, Christian Grosz
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<pre wrap="" class="moz-quote-pre">Hi John,
I do not know if I see the latest version of your code. But I noticed a
differenent EOS between perl and python.
my $dev_find = LinuxGpib::ibdev(0, 5, 0x7B, 12, 1, 0);
cmd_find = gpib.dev( 0, paddr, 0x7B, gpib.T10s, eot, 0x0D )
Christian
</pre>
</blockquote>
</body>
</html>
--------------mJtQKXmTQCtC4PijrYt4kBnD--
--------------pA0XIfvk96qSAWubzyjJw0eH
Content-Type: application/x-perl; name="test-storage.pl"
Content-Disposition: attachment; filename="test-storage.pl"
Content-Transfer-Encoding: 7bit
#!/usr/bin/perl
# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test;
use Time::HiRes qw(usleep time gettimeofday);
use LinuxGpib;
BEGIN { plan tests => 1 };
use LinuxGpib;
ok(1); # If we made it this far, we're ok.
#########################
# Insert your test code below, the Test module is use()ed here so read
# its man page ( perldoc Test ) for help writing this test script.
$device = "Tektronix 4924";
$cmd = "";
$idn = "";
$result = "";
$fnum = "13";
my $dev = LinuxGpib::ibfind($device) || die "Can't open device $device!\n";
my $dev_find = LinuxGpib::ibdev(0, 5, 0x7B, 12, 1, 0);
my $dev_input = LinuxGpib::ibdev(0, 5, 0x6D, 12, 1, 0x0D);
my $dev_type = LinuxGpib::ibdev(0, 5, 0x66, 12, 1, 0x0D);
my $dev_close = LinuxGpib::ibdev(0, 5, 0x62, 12, 1, 0);
$fnumstr = $fnum."\r";
print "FIND file ".$fnum." .....\n";
LinuxGpib::ibwrt($dev_find, $fnumstr, 2);
time.sleep(1);
print "Get file TYPE information...\n";
my $result;
LinuxGpib::ibrd($dev_type, $result, 20);
my @filedata = split(/\r/, $result);
print "Type: ";
print $filedata[0];
print "\tSize: ";
print $filedata[1];
print "\n";
time.sleep(1);
print "INPUT first line from file .....\n";
LinuxGpib::ibrd($dev_input, $result, 100);
time.sleep(1);
print $result;
print "\n";
print "CLOSE file...\n";
LinuxGpib::ibwrt($dev_close, $fnumstr, 2);
print "Done.\n";
# clear
LinuxGpib::ibclr($dev);
exit 0;
--------------pA0XIfvk96qSAWubzyjJw0eH
Content-Type: text/x-python; charset=UTF-8; name="test_storage.py"
Content-Disposition: attachment; filename="test_storage.py"
Content-Transfer-Encoding: base64
IyEvdXNyL2Jpbi9weXRob24zCgppbXBvcnQgZ3BpYgppbXBvcnQgdGltZQoKIyBHUElCIGlu
dGVyZmFjZSAwLCBhZGRyZXNzIDUKY29uID0gTm9uZQpwYWRkciA9IDUKZW90ID0gMQoKI0Zp
bGUKZm51bSA9ICIxMyIKCgojIEdQSUIgaW50ZXJmYWNlIDAsIGFkZHJlc3MgNQp0cnk6CiAg
ICBjb24gPSBncGliLmRldigwLHBhZGRyKQpleGNlcHQgZ3BpYi5HcGliRXJyb3IgYXMgZToK
ICAgIHByaW50KGUpCiAgICBleGl0KCkKCiMgTm90ZTogdGltZW91dCB2YWx1ZSAtIDEzID0g
MTBzZWMsIDEyID0gM3NlYywgMTEgPSAxc2VjCmNtZF9maW5kID0gIGdwaWIuZGV2KCAwLCBw
YWRkciwgMHg3QiwgMTMsIGVvdCwgMCApCmNtZF9pbnB1dCA9ICBncGliLmRldiggMCwgcGFk
ZHI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HV0KQpncGli
LmNsb3NlKGNtZF9jbG9zZSkKCmdwaWIuY2xvc2UoY29uKQoK
--------------pA0XIfvk96qSAWubzyjJw0eH
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--------------pA0XIfvk96qSAWubzyjJw0eH
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
--------------pA0XIfvk96qSAWubzyjJw0eH--