Hello Sheng,
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:48.572 SCL_HPRF:SRM1:FMAX: Timeout after reading 11 bytes "<0d>900000000;"
2008/04/16 16:38:49.592 SCL_HPRF:SRM1:FMIN: Timeout after reading 11 bytes "<0d>850000000;"
2008/04/16 16:39:10.701 SCL_HPRF:SRM1:ModeGet: Record does not accept input "<0d>SPECTRUM;"
2008/04/16 16:48:08.999 SCL_HPRF:SRM1:Spectrum_Get: Timeout after reading 12702 bytes "...073E-013<0d>1.426E-013;"
2008/04/16 16:48:08.999 StreamBuffer exploded (over 10000 chars). Exiting
Aborted
I tried to skip <od> by
in "CR", "%f";
in "\r", "%f";
in "\13%e;"
...
but could not be not successful. Does anybody have idea how that <0d> can be ignored/skipped as a beginning in ai/bi or separator in the waveform?
Thanks alot in advance.
Xiaosong
SNS Controls
- Replies:
- Re: StreamDevice protocol question Geng, Xiaosong
- Navigate by Date:
- Prev:
edm runtime XtAddCallback errors John M. Skinner
- Next:
Re: edm runtime XtAddCallback errors - fixed John M. Skinner
- 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: edm runtime XtAddCallback errors - fixed John M. Skinner
- Next:
Re: StreamDevice protocol question Geng, Xiaosong
- 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
|