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

Subject: Re: StreamDevice protocol question
From: Kay-Uwe Kasemir <[email protected]>
To: tech-talk <[email protected]>
Date: Fri, 18 Apr 2008 11:51:26 -0400

For what it's worth, the response of the device seems to be for example


<CR> <some number> ;

We changed the stream device terminator to ";", and from then on it
was possible to parse the CR in the response string.

-Kay

On Apr 18, 2008, at 10:45 AM, Geng, Xiaosong wrote:
I have a Selective Radiation Meter SR-3000, which has serial interface.
I am trying to get serial set/get with StreamDevice works, the control/set commands works fine, but Query response commands are not working yet.
Here are my protocol file, db, and error messages from IOC:


Protocol:
---------------------------------------------------------------------
locktimeout = 5000;
terminator   = CR LF;
replytimeout = 1000;
readtimeout  = 1000;
extrainput   = Ignore;

@init{out " ";}
# set commands here works fine
# but get commands...
fmin_get        { out "F_MIN?;"; in "\13, %f"; }
fmax_get        { out "F_MAX?;"; in "\r, %f"; }

mode_get { out "MODE?;" ; in "%s" ; }
spectrum_get { out "SPEC?;" ; separator="\13"; in "spectrum = (% f)";
--------------------------------------------------------------------- ------------------


db:
------------------------------------------------------------
record(ai, "$(S)_$(SS):$(DEV)$(N):FMIN_Get") {
 field(DESC, FMIN Reading")
#  field(SCAN, "10 second")
 field(DTYP, "stream")
 field(INP, "@srm3000.protocol fmin_get $(PORT) 0")
 field(PREC, "2")
 field(HOPR, "")
 field(LOPR, "")
 field(EGU, "Hz")
}

record(ai, "$(S)_$(SS):$(DEV)$(N):FMAX_Get") {
 field(DESC, "FMAX Reading")
#  field(SCAN, "10 second")
 field(DTYP, "stream")
 field(INP, "@srm3000.protocol fmax_get $(PORT) 0")
 field(PREC, "2")
 field(HOPR, "")
 field(LOPR, "")
 field(EGU, "Hz")
}

record (waveform, "$(S)_$(SS):$(DEV)$(N):Spectrum_Get")
{
   field (DTYP, "stream")
   field(SCAN, "10 second")
   field (INP,  "@srm3000.protocol spectrum_get $(PORT) 0")
   field (FTVL, "DOUBLE")
   field (NELM, "10000")
}


--------------------------------------------------


error message from the IOC:

2008/04/16 16:38:49.592 SCL_HPRF:SRM1:FMIN: Timeout after reading 11 bytes "<0d>850000000;"



References:
StreamDevice protocol question Geng, Xiaosong
Re: StreamDevice protocol question Geng, Xiaosong

Navigate by Date:
Prev: Re: StreamDevice protocol question Geng, Xiaosong
Next: epics IOC and gun screen and copy/scrollback mode John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice protocol question Geng, Xiaosong
Next: epics IOC and gun screen and copy/scrollback mode John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·