I believe asyn is doing the flush operation that Emmanuel suggested.
I suspect you are not getting out of order replies. I think you are getting a timeout, but then stale data from some buffer is ending up in the apparent data you received with the timeout.
Mark
________________________________
From: Phillip Sorensen [mailto:[email protected]]
Sent: Fri 1/19/2007 2:51 PM
To: Emmanuel Mayssat
Cc: TechTalk EPICS
Subject: Re: Out of order replies from a serial device
Emmanuel Mayssat wrote:
> Before you send a command to your serial device, you should clear the
> serial buffers.
>
> So a read operation becomes:
>
> 1/ Read ( you will read nothing most of the time), this operation
> clears /flushs the serial buffers.
> 2/ send your serial commnad/inquiry
> 3/ read the serial port a second time to get your PV value
>
> Note that this is also assuming that you are using serial port locking,
> and that this feature is working correctly (i.e. only 1 write-read
> request at a time )
>
That sounds like it would work, but I am currently using the asyn
devGpib device support module framework with GPIBREAD commands. The
framework handles the actual communications.
I can rewrite the device support to use GPIBCVTIO commands and write the
communication code myself, but I would prefer to use the devGpib code
for as much as possible.
Phil Sorensen
CHESS
- Replies:
- Re: Out of order replies from a serial device Phillip Sorensen
- References:
- Out of order replies from a serial device Phillip Sorensen
- Re: Out of order replies from a serial device Emmanuel Mayssat
- Re: Out of order replies from a serial device Phillip Sorensen
- Navigate by Date:
- Prev:
Re: Out of order replies from a serial device Phillip Sorensen
- Next:
Re: Out of order replies from a serial device Phillip Sorensen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Out of order replies from a serial device Phillip Sorensen
- Next:
Re: Out of order replies from a serial device Phillip Sorensen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|