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

Subject: Re: streamdevice exceptions
From: Jeong Han Lee <[email protected]>
To: [email protected]
Date: Wed, 26 Oct 2016 23:04:54 +0200
Hi Pedro,

  The following site may give a hint to you

http://epics.web.psi.ch/software/streamdevice/doc/tipsandtricks.html#readmany


And the following codes may help to figure out what you want to do. I hope I understand what you want correctly.


  Thanks,
  Han

--- snip snip --- PROTOCOL file


ReplyTimeout = 1000;
ReadTimeout = 300;


# If there is no Convection sensor detected,
# readpress returns 'OPEN'.
# So, we need the mismatch to pass them into string

readPressCNV1
{
    out "#\$102UCNV1";
    in ">%e";
    @mismatch {
        in ">%(\$2)s";
    }
}

## Pressure Unit
##
##

getPresUnit
{
    out "#\$113";
    in  ">%d";
    ExtraInput = Ignore;
}

--- snip snip --- DB file


# Read the unit
# Unit   command      response
# Torr     #aa13        >00
# mBar     #aa13        >01
# Pascal   #aa13        >02
#

record(mbbi, "$(SYSDEV)PUnitGet")
{
    field(DESC, "Get Pressure Unit")
    field(DTYP, "stream")
    field( INP, "@xgs600.proto getPresUnit($(ID)) $(PORT)")
    field(ZRST, "Torr")
    field(ZRVL, "0")
    field(ONST, "mBar")
    field(ONVL, "1")
    field(TWST, "Pascal")
    field(TWVL, "2")
    field(THSV, "INVALID")
    field(FRSV, "INVALID")
    field(FVSV, "INVALID")
    field(SXSV, "INVALID")
    field(SVSV, "INVALID")
    field(EISV, "INVALID")
    field(NISV, "INVALID")
    field(TESV, "INVALID")
    field(ELSV, "INVALID")
    field(TVSV, "INVALID")
    field(TTSV, "INVALID")
    field(FTSV, "INVALID")
    field(FTSV, "INVALID")
    field(FFSV, "INVALID")
    field(UNSV, "INVALID")
    field(PINI, "YES")
}


record (stringin, "$(SYSDEV)CNV1_MSG")
{
}


record(ai, "$(SYSDEV)CNV1")
{
    field(DESC, "Pressure CNV1")
    field(DTYP, "stream")
field( INP, "@xgs600.proto readPressCNV1($(ID),$(SYSDEV)CNV1_MSG) $(PORT)")
    field(PINI, "NO")
    field(SCAN, "1 second")
    field(FLNK, "$(SYSDEV)CNV1_EGU")
}

record(stringout, "$(SYSDEV)CNV1_EGU")
{
    field( OUT, "$(SYSDEV)CNV1.EGU")
    field( DOL, "$(SYSDEV)PUnitGet.VAL")
    field(OMSL, "closed_loop")
}


record (calcout, "$(SYSDEV)CNV1_clean1")
{
  field (INPA, "$(SYSDEV)CNV1.SEVR CP")
  field (CALC, "A#3")
  field (OOPT, "When Non-zero")
  field ( OUT, "$(SYSDEV)CNV1_clean2.PROC")
}

record (stringout, "$(SYSDEV)CNV1_clean2")
{
  field (VAL, "CNV1 Detected")
  field (OUT, "$(SYSDEV)CNV1_MSG PP")
}




On 10/26/2016 04:52 PM, Pedro Gigoux wrote:
Hi,

We are using StreamDevice to read a DGH temperature sensor and wanted to
know what would be syntax to make the @mismatch and @replytimeout write
an error message to a different record. So far I have the following
protocol file to read temperatures:

ExtraInput = Ignore;
ReplyTimeout = 1000;
Terminator = CR;

getTemp {
        out "$\$1RD";
        in "*%f";
        }

Thank you,
Pedro.


References:
streamdevice exceptions Pedro Gigoux

Navigate by Date:
Prev: Re: PyEpics -- full-resolution timestamps? Matt Newville
Next: Re: opc-ua to EPICS interface Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: streamdevice exceptions Pedro Gigoux
Next: StreamDevice protocol file help needed Michael Westfall
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 27 Oct 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·