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  <20112012  2013  2014  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice/ASYN connection to a Telnet port
From: Maren Purves <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: EPICS Tech-Talk <[email protected]>
Date: Mon, 07 Feb 2011 11:39:13 -1000
Hi Dirk,

I have mine solved, I was just wondering whether John
may need a similar solution (namely to delete the first
N <cr> and <lf>s - I strip out a lot more than that but
that's because the output is longer than what channel
access will accept).

Thanks,
Maren

Dirk Zimoch wrote:
Hello Maren,

StreamDevice can parse the 3 lines and put the interesting bits of information into other records. It is not so easy to re-format it to one long line.

Please give an example of your input an what you want to do with it.

Dirk


Maren Purves wrote:
John/Dirk,

does StreamDevice/ASYN have or allow a custom read function
like drvAscii does? I have one for our dust monitor that turns
3 lines of reply (which are spaced out in time) and way too
long for drvAscii into something that is one line of less than
80 characters.

Wondering,
Maren

John Dobbins wrote:
Dirk,

As it turns out this device really is sending one character per network packet. The device is a new version of the Gamma/Digitel Small Pump Controller which has an optional ethernet interface. The ethernet interface has other problems, e.g. one can crash the controller (turning of the pump H.V.) by overloading it with data requests. Gamma tells me they are working on improving the ethernet interface. For now I as using the RS-232 interface for this device which operates without problem.

Thanks,

John Dobbins




On 2/2/2011 10:30 AM, Dirk Zimoch wrote:
Hi John,

StreamDevice normally reads first a single byte and then the rest in
chunks of up to 63 bytes. The reason is that the first byte uses a
different timeout (ReplyTimeout) than the others (ReadTimeout). The rest
is fetched in 63 bytes chunks because I use an internal buffer of 64
bytes and want to be able to add a null byte at the end to avoid
problems with some debug output.

So the first "read 1" is normal. What surprises me are the other lines.

When you switch on debugging in StreamDevice (var streamDebug 1), what
do you see?

Dirk

John Dobbins wrote:
Dear All,

I am connecting to a Gamma Vacuum SPCe ion pump power supply. This device has an ethernet port which accepts telnet connections.

I set up StremDevice to communicate with it on port 23,

I have  asyn Trace Masks set as follows:

asynSetTraceMask("SPCe",-1,0x09)
asynSetTraceIOMask("SPCe",-1,0x2

I have a problem in that the response string , which I expect to look like "OK 00 7.90E-13 TORR"

appears like this:


epics>  2011/01/17 16:14:55.995 172.18.32.21:23 write 7
spc 0B\r
2011/01/17 16:14:56.475 172.18.32.21:23 read 1
O
2011/01/17 16:14:56.475 172.18.32.21:23 read 1
K
2011/01/17 16:14:56.475 172.18.32.21:23 read 1

2011/01/17 16:14:56.475 172.18.32.21:23 read 1
0
2011/01/17 16:14:56.475 172.18.32.21:23 read 1
0
2011/01/17 16:14:56.476 172.18.32.21:23 read 1

2011/01/17 16:14:56.476 172.18.32.21:23 read 1
7
2011/01/17 16:14:56.476 172.18.32.21:23 read 1
.
2011/01/17 16:14:56.476 172.18.32.21:23 read 1
9
2011/01/17 16:14:56.477 172.18.32.21:23 read 1
0
2011/01/17 16:14:56.477 172.18.32.21:23 read 1
E
2011/01/17 16:14:56.477 172.18.32.21:23 read 1
-
2011/01/17 16:14:56.477 172.18.32.21:23 read 1
1
2011/01/17 16:14:56.478 172.18.32.21:23 read 1
3
2011/01/17 16:14:56.478 172.18.32.21:23 read 1

2011/01/17 16:14:56.478 172.18.32.21:23 read 1
T
2011/01/17 16:14:56.478 172.18.32.21:23 read 1
O
2011/01/17 16:14:56.478 172.18.32.21:23 read 1
R
2011/01/17 16:14:56.479 172.18.32.21:23 read 1
R
2011/01/17 16:14:56.479 172.18.32.21:23 read 1
\r


Can someone tell me what is going on here?

Regards and thanks,

John Dobbins

Cornell University
Lab for Elementary Particle Physics







Replies:
Re: StreamDevice/ASYN connection to a Telnet port John Dobbins
References:
StreamDevice/ASYN connection to a Telnet port John Dobbins
Re: StreamDevice/ASYN connection to a Telnet port Dirk Zimoch
Re: StreamDevice/ASYN connection to a Telnet port John Dobbins
Re: StreamDevice/ASYN connection to a Telnet port Maren Purves
Re: StreamDevice/ASYN connection to a Telnet port Dirk Zimoch

Navigate by Date:
Prev: MEDM build problem Chen Xue
Next: Re: MEDM build problem J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice/ASYN connection to a Telnet port Dirk Zimoch
Next: Re: StreamDevice/ASYN connection to a Telnet port John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·