Re: Detecting whether ATN is asserted or un-asserted

dave penkler <[email protected]> Thu, 9 Apr 2026 14:07:13 +0200
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAL=kjP2HKUeFmy+j_Yyabx6axmQsyD0qVLsz4MLs4AbMn_rnEg@mail.gmail.com>
--===============5862920225870829323==
Content-Type: multipart/alternative; boundary="00000000000002abf4064f05dc7c"

--00000000000002abf4064f05dc7c
Content-Type: text/plain; charset="UTF-8"

Hi John,
See in-line:

On Tue, 7 Apr 2026 at 18:19, John <[email protected]> wrote:

> Dave,
>
> Thank you and sorry - I missed your inline program and was trying to roll
> my own.
>
> Having gone back through the messages I found it and tried it. It
> initially failed on this line:
>
> gpib.eot(0, eot)  # assert eoi on last byte written
>
> $ ./low_test.py
> Traceback (most recent call last):
>   File "/home/johnc/Test/linux-gpib/./low_test.py", line 29, in <module>
>     gpib.eot(0, eot)  # assert eoi on last byte written
>     ^^^^^^^^
> AttributeError: module 'gpib' has no attribute 'eot'
>
> So I commented that line out. I am not sure what it is supposed to be?
>
My bad, there is no gpib.eot() method.
Please use:
gpib.config(0, gpib.IbcEOT, 1)
 instead.

It then failed on:
>
> gpib_command(board,unl_unt)  # send unlisten untalk
>
> $ ./low_test.py
> FIND file ....
> Traceback (most recent call last):
>   File "/home/johnc/Test/linux-gpib/./low_test.py", line 39, in <module>
>     gpib_command(board,unl_unt)  # send unlisten untalk
>     ^^^^^^^^^^^^
> NameError: name 'gpib_command' is not defined
>
> I noticed you had used 'gpib.command' and 'gpib_command' alternately so I
> changed all occurrences of gpib_command with gpib.command. It then ran
> without language syntax errors but failed alternately between:
>
> $ ./low_test.py
> FIND file ....
> Traceback (most recent call last):
>   File "/home/johnc/Test/linux-gpib/./low_test.py", line 34, in <module>
>     gpib.command(board,add_find) # do addressing
>     ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
> gpib.GpibError: cmd() failed: You have attempted to write data or command
> bytes, but there are no listeners currently addressed.
>
> and;
>
> $ ./low_test.py
> FIND file ....
> Traceback (most recent call last):
>   File "/home/johnc/Test/linux-gpib/./low_test.py", line 39, in <module>
>     gpib.command(board,unl_unt)  # send unlisten untalk
>     ~~~~~~~~~~~~^^^^^^^^^^^^^^^
> gpib.GpibError: cmd() failed: You have attempted to write data or command
> bytes, but there are no listeners currently addressed.
>
> Noted that ibcmd automatically asserts  ATN and that it remains asserted
> at the end.
>
> Also noted that ibwrt and ibrd automatically de-assert ATN.
>
> With regards to iblines, I was passing the wrong device variable to the
> sub-routine, but anyway, for now I am focused on your Python low level
> program. I will do an LA trace.
>
I checked out the LA traces you posted and the last one labeled
"Py-FIND-NOCR-fail.png" was presumably the Perl run which looks great.
The other two "Perl-FIND.png" and "Py-FIND.png" look the same and I can't
see any anomalies.

Can we get the py trace for a full 1600us starting from the initial falling
edge of ATN when it fails at line 34 ( gpib.command(board,add_find) # do
addressing).
I guess you can also comment out the sending of unl_unt as it works fine
without.
cheers,
-Dave

--00000000000002abf4064f05dc7c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Hi John,<div>See in-line:</div></div><br>=
<div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"=
gmail_attr">On Tue, 7 Apr 2026 at 18:19, John &lt;<a href=3D"mailto:subs@qc=
ontinuum.plus.com">[email protected]</a>&gt; wrote:<br></div><blockq=
uote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1p=
x solid rgb(204,204,204);padding-left:1ex"><u></u>

 =20
   =20
 =20
  <div>
    <p>Dave,</p>
    <p>Thank you and sorry - I missed your inline program and was trying
      to roll my own.</p>
    <p>Having gone back through the messages I found it and tried it. It
      initially failed on this line:</p>
    <p>gpib.eot(0, eot)=C2=A0 # assert eoi on last byte written</p>
    <p>$ ./low_test.py<br>
      Traceback (most recent call last):<br>
      =C2=A0 File &quot;/home/johnc/Test/linux-gpib/./low_test.py&quot;, li=
ne 29, in
      &lt;module&gt;<br>
      =C2=A0 =C2=A0 gpib.eot(0, eot)=C2=A0 # assert eoi on last byte writte=
n<br>
      =C2=A0 =C2=A0 ^^^^^^^^<br>
      AttributeError: module &#39;gpib&#39; has no attribute &#39;eot&#39;<=
br>
    </p>
    <p>So I commented that line out. I am not sure what it is supposed
      to be?</p></div></blockquote><div>My bad, there is no gpib.eot() meth=
od.</div><div>Please use:=C2=A0</div><div><font face=3D"monospace">gpib.con=
fig(0, gpib.IbcEOT, 1)</font></div><div>=C2=A0instead.</div><div><br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex"><div>
    <p>It then failed on:</p>
    <p>gpib_command(board,unl_unt)=C2=A0 # send unlisten untalk</p>
    <p>$ ./low_test.py<br>
      FIND file ....<br>
      Traceback (most recent call last):<br>
      =C2=A0 File &quot;/home/johnc/Test/linux-gpib/./low_test.py&quot;, li=
ne 39, in
      &lt;module&gt;<br>
      =C2=A0 =C2=A0 gpib_command(board,unl_unt)=C2=A0 # send unlisten untal=
k<br>
      =C2=A0 =C2=A0 ^^^^^^^^^^^^<br>
      NameError: name &#39;gpib_command&#39; is not defined<br>
    </p>
    <p>I noticed you had used &#39;gpib.command&#39; and &#39;gpib_command&=
#39;
      alternately so I changed all occurrences of gpib_command with
      gpib.command. It then ran without language syntax errors but
      failed alternately between:</p>
    <p>$ ./low_test.py<br>
      FIND file ....<br>
      Traceback (most recent call last):<br>
      =C2=A0 File &quot;/home/johnc/Test/linux-gpib/./low_test.py&quot;, li=
ne 34, in
      &lt;module&gt;<br>
      =C2=A0 =C2=A0 gpib.command(board,add_find) # do addressing<br>
      =C2=A0 =C2=A0 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^<br>
      gpib.GpibError: cmd() failed: You have attempted to write data or
      command bytes, but there are no listeners currently addressed.<br>
    </p>
    <p>and;</p>
    <p>$ ./low_test.py<br>
      FIND file ....<br>
      Traceback (most recent call last):<br>
      =C2=A0 File &quot;/home/johnc/Test/linux-gpib/./low_test.py&quot;, li=
ne 39, in
      &lt;module&gt;<br>
      =C2=A0 =C2=A0 gpib.command(board,unl_unt)=C2=A0 # send unlisten untal=
k<br>
      =C2=A0 =C2=A0 ~~~~~~~~~~~~^^^^^^^^^^^^^^^<br>
      gpib.GpibError: cmd() failed: You have attempted to write data or
      command bytes, but there are no listeners currently addressed.<br>
    </p>
    <p>Noted that ibcmd automatically asserts=C2=A0 ATN and that it remains
      asserted at the end.</p>
    <p>Also noted that ibwrt and ibrd automatically de-assert ATN.</p>
    <p>With regards to iblines, I was passing the wrong device variable
      to the sub-routine, but anyway, for now I am focused on your
      Python low level program. I will do an LA trace.</p></div></blockquot=
e><div>I checked out the LA traces you posted and the last one labeled=C2=
=A0 &quot;Py-FIND-NOCR-fail.png&quot; was presumably=C2=A0the Perl run whic=
h looks great.</div><div>The other two &quot;Perl-FIND.png&quot; and &quot;=
Py-FIND.png&quot; look the same and I can&#39;t see any anomalies.</div><di=
v><br></div><div>Can we get the py trace for a full 1600us starting from th=
e initial falling edge of ATN when=C2=A0it fails at line 34 ( gpib.command(=
board,add_find) # do addressing).</div><div>I guess you can also comment ou=
t the sending of unl_unt as it works fine without.</div><div>cheers,</div><=
div>-Dave</div></div></div>

--00000000000002abf4064f05dc7c--


--===============5862920225870829323==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5862920225870829323==
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

--===============5862920225870829323==--