EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: VXI11 - GPIB
From: Mark Rivers <[email protected]>
To: Zenon Szalata <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Sat, 12 Oct 2013 12:59:22 +0000
Hi Zen,

Please send the complete output when the IOC boots.

Do you know if the 0x0c response when you use the 32-byte buffer is the correct response?

Mark

________________________________________
From: Zenon Szalata [[email protected]]
Sent: Friday, October 11, 2013 5:59 PM
To: Mark Rivers
Cc: [email protected]
Subject: Re: VXI11 - GPIB

Hi Mark and Matt,
First Mark's questions:
With read buffer length of  greater than 32, writeRead fails with status 1,
which I think means that it is timing out on the read part.

Trace back gives:
2013/10/11 13:40:20.234 L0x 12 vxiWrite

1e 00 11 00 04 00 12 00 1a
epics> drvKS3988::_writeRead: stat=1,l=1,nw=1,bln=4,nbi=0

Stat in the print statement in my driver is the return code and nbi is
the number of bytes returned, both from the asynOctetSyncIO->wrteRead()
function.  So, it failed to read.

On the other hand, with read buffer length of 32 or less:
trace back gives:
2013/10/11 13:08:48.636 L0x 12 vxiWrite

1e 00 11 00 04 00 12 00 1a
2013/10/11 13:08:48.638 L0x 12 vxiRead

0c
drvKS3988::_writeRead: stat=0,l=1,nw=1,bln=4,nbi=1

Matt,
I have not defined either the input nor output EOS characters.  The code
worked with small read buffer size.  It stopped working when I increased
the buffer size and it did not occur to me that this might be needed.
In each case, the device replies with one byte of data.

The hardware set up is:
Agilent Ethernet - GPIB <--> Kinetic Systems GPIB CAMAC crate controller.
I wonder if I could use IP Port driver instead of VXI11 driver?
I will look at the document for the KS3988 to see how it terminated its
reply data; it might help understand what is going on.
Thank you both,
Zen

On 10/11/13 13:58, Mark Rivers wrote:
> Something does not seem right here, I don't understand why it is failing if nbt > 32.
>
> Unfortunately I have no experience with VXI11, and I don't have any VXI11 devices to test with.  Hopefully someone else on tech-talk can help you with this.
>
> When the writeRead fails, what is the error return?
>
> What do you see if you set asynTraceMask=255 in the underlying VXI11 port (L0x)?
>
> Mark
>
>
> -----Original Message-----
> From: Zenon Szalata [mailto:[email protected]]
> Sent: Friday, October 11, 2013 3:34 PM
> To: Mark Rivers; [email protected]
> Subject: VXI11 - GPIB
>
> Hi Mark,
> I have written a device driver for a GPIB device that is using VXI11
> protocol.
> The device driver is sub-classed from the asynPortDriver class.
> In the st.cmd file I configure the VXI11 object as follows:
> vxi11Configure( "L0x","$(ETHER)",0,0.0,"gpib0",0,0)
>
> Then in the constructor I connect:
>
> stat=pasynOctetSyncIO->connect( _ioPort,_addr,&_apvt,0);
>
> finally in IO routine I call:
>
> stat=pasynOctetSyncIO->writeRead(
> _apvt,pcs,ncb,_buf,nbt,1,(size_t*)nio,&nbi,&eom);
>
> _buf is defined as char _buf[2048]
>
> I have discovered by trial and error that the writeRead succeeds for nbt
> <= 32 and fails otherwise.
> I do not understand this.  I think that nbt is supposed to be the size
> of the read buffer (in my case _buf) simply telling the routine, which
> ultimately does the device IO, to put up to nbt bytes of data into the
> read buffer.  Now, it happens that in my test case the device returns
> only one byte of data, that is the status byte. So, why should it fail
> when I give the writeRead a ridiculously large buffer to read into?
>
> Then what if I poke the device and it chooses to reply by sending 1024
> bytes of data?  Do I need to worry about that and issue the writeRead
> number of times with 32 byte long read buffer until all bytes of data
> are read in?  Since I don't know before hand how much data will be
> returned, it is not obvious to me how this could be done efficiently.
> Thanks Mark,
> Zen



Replies:
Re: VXI11 - GPIB Zenon Szalata
References:
VXI11 - GPIB Zenon Szalata
RE: VXI11 - GPIB Mark Rivers
Re: VXI11 - GPIB Zenon Szalata

Navigate by Date:
Prev: Re: VXI11 - GPIB Zenon Szalata
Next: Re: VXI11 - GPIB Zenon Szalata
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: VXI11 - GPIB Zenon Szalata
Next: Re: VXI11 - GPIB Zenon Szalata
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·