Re: [EXTERNAL] Re: GPIB as a pure slave

Stefan Olejnik <[email protected]> Sun, 15 Jan 2023 09:42:38 +0100
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <[email protected]>
  Hi, Dave

Thanks a lot for Your effort.

I have tested Your program, but it is almost the same as I have used. 
The result are as follows:

root@imx8mm-var-dart:/home/stefan/bin#
root@imx8mm-var-dart:/home/stefan/bin# ./slave_test
[  124.896503] tnt4882: minor 0 read timed out
[  124.900712] tnt4882: read timed out
Got hello
[  127.968496] tnt4882: write timed out
error: ibwrt fail
  - EABO 6: Operation aborted
root@imx8mm-var-dart:/home/stefan/bin# ./slave_test
[  187.105354] tnt4882: minor 0 read timed out
[  187.109563] tnt4882: read timed out
Got *IDN?

[  190.177371] tnt4882: write timed out
error: ibwrt fail
  - EABO 6: Operation aborted
root@imx8mm-var-dart:/home/stefan/bin#

READING:

Interesting is that during "ibrd" even read timeout is coming from 
TNT4882, the data are read OK. I am using reading per char, till END or 
END-OF-STRING => "\n"  and I am getting no time-out during reading.

WRITTING:

First "ibwrt" is always time-outed, the second also, but data are 
delivered, as I am already described. Therefore I am using short TIMO ( 
e.g. 10ms ) for ibwrt, and on the receiver device is TIMO set to 3s, and 
I am getting the data. Of course from second "ibwrt".

Stefan.


On 1/13/23 13:50, dave penkler wrote:
>
> *CAUTION:*This email originated from outside of the organization. Do 
> not click links or open attachments unless you recognize the sender 
> and know the content is safe.
>
> Hi Stefan,
> Attached is a little programme slave_test to demonstrate pure slave 
> aka device mode.
> It uses minor 0 in board mode.
> On the slave side run slave_test and on the master ibterm.
>
> On the slave side:
>
> *$ cc -o slave_test slave_test.c -lgpib
> $ ./slave_test
> Got hello
> Got bye
> Got quit
> slave done
> $ *
> *
> *
> On the master side:
>
> *$ibterm -d 1
> Attempting to open /dev/gpib0
> pad = 1, sad = 0, timeout = 10, send_eoi = 1, eos_mode = 0x0000
> ibterm>hello
> Reply: hello
> ibterm>bye
> Reply: bye
> ibterm>quit
> ibterm><CTRL-D>
>
> ibterm: Done.
> $ *
>
> On Tue, 10 Jan 2023 at 17:11, Olejnik, Stefan 
> <[email protected]> wrote:
>
>     I have the troubles with GPIB interface - National Instruments
>     PCIe-GPIB. Kernel driver TNT4882. Configuration is as a pure slave
>     - just listen and answer:
>     interface {
>             minor = 0       /* board index, minor = 0 uses /dev/gpib0,
>     minor = 1 uses /dev/gpib1, etc. */
>             board_type = "ni_pci"
>             name = "violet" /* optional name, allows you to get a
>     board descriptor using ibfind() */
>             pad = 1 /* primary address of interface             */
>             sad = 0 /* secondary address of interface           */
>             timeout = T10s  /* timeout for commands */
>
>             eos = 0x0a      /* EOS Byte, 0xa is newline and 0xd is
>     carriage return */
>             set-reos = no   /* Terminate read if EOS */
>             set-bin = no    /* Compare EOS 8-bit */
>             set-xeos = no   /* Assert EOI whenever EOS byte is sent */
>             set-eot = yes   /* Assert EOI with last byte on writes */
>
>             master = no     /* interface board is system controller */
>     }
>
>     When I am using "ibtest" then write command returns TIMO:
>     : w
>     enter a string to send to your device: testString
>     sending string: testString
>
>     [  200.928468] tnt4882: write timed out
>     gpib status is:
>     ibsta = 0xc100  < ERR TIMO CMPL >
>     iberr= 6
>     EABO 6: Operation aborted
>
>     I have created test SW and find out, that if I am using
>     "ibwrta/ibwait" command twice, second try is always successful.
>     First returns TIMO.
>     Reading is OK.
>
>     On the other side is NI PC as a CIC.
>
>     Thanks for any help....
>
>     ------------------------------------------------------------------------
>
>     Please be advised that this email may contain confidential
>     information. If you are not the intended recipient, please notify
>     us by email by replying to the sender and delete this message.
>
>     _______________________________________________
>     Linux-gpib-general mailing list
>     [email protected]
>     https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>     <https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/linux-gpib-general__;!!KPww_GFiJXw!akxknQHeZpcW-ROH7zJVOrfvFfYJzQx-gz4MHy1qpJ_OSA5dbLhsWj7sRrZLWLcNkYWlvEdwJaknUJMZKAiJ$>
>

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general