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  2016  2017  2018  2019  2020  2021  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: RE: StreamDevice return state error
From: "Barrett \(US\), Patrick E via Tech-talk" <tech-talk at aps.anl.gov>
To: "pearsonmr at ornl.gov" <pearsonmr at ornl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 28 Jun 2022 17:20:44 +0000

I tried this and get the same error.  The Alarm state is not getting set in the record. It’s almost like the StreamDevice is handling/returning the error without putting the bad request into the record itself.  Any other suggestions?

 

Thanks,

Patrick

 

From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Tuesday, June 28, 2022 12:59 PM
To: Barrett (US), Patrick E <patrick.e.barrett at boeing.com>; tech-talk at aps.anl.gov
Subject: [EXTERNAL] RE: StreamDevice return state error

 

EXT email: be mindful of links/attachments.


 

Hi,

 

I’m assuming you mean that the STATE_RTN record should go to ERROR state if there’s a problem with the RCV_STATE record?

 

One way to do this is to use the STAT and/or SEVR fields of the RCV_STATE record. They should indicate a problem if either of those is !=0, and so you could do something like:

 

record(mbbi, "RCV_STATE")

{

   field(DESC, "SYSTEM:STATE P01")

   field(DTYP, "stream")

   field(SCAN, "I/O Intr")

   field(INP,  "@simCmd.proto readSystemState(STATE_RTN) $(PORT) 0")

   field(ZRST, "STANDBY")

   field(ZRVL, "0")

   field(ONST, "OPERATE")

   field(ONVL, "1")

   field(TWST, "SELFTEST")

   field(TWVL, "2")

   field(UNSV, "INVALID")

   field(FLNK, “RCV_CALC”)

}

record(calcout, “RCV_CALC”)

{

   field(INPA, “RCV_STATE.STAT”)

   field(CALC, “A!=0?1:0”)

   field(OOPT, “Every Time”)

   field(DOPT, “Use CALC”)

   field(OUT, “STATE_RTN PP”)

}

record(bi, "STATE_RTN")

{

   field(DESC, "State Return")

   field(DTYP, "Soft Channel")

   field(SCAN, "Passive")

   field(ZNAM, "OK")

   field(ONAM, "ERROR")

   field(VAL, 0)

   field(PINI, 1)

}

 

Or, something along those lines.

 

Depending on which client you use, the RCV_STATE record itself should also indicate there’s a problem, and you can also display the STAT and/or SEVR fields if necessary.

 

Cheers,

Matt

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Barrett (US), Patrick E via Tech-talk
Sent: Tuesday, June 28, 2022 12:37 PM
To: tech-talk at aps.anl.gov
Subject: [EXTERNAL] StreamDevice return state error

 

I am working to simulate a SCPI type device with an IOC.  I am using I/O Intr records to read in the SCPI and set the state of the mbbi record.  The IOC should return ERROR if an error occurs, such as if an invalid state is requested. I can see the error message in the IOC when an invalid state is requested, but do not know how to capture the error in the protocol file or db setup to send a return string of “ERROR”.

 

The error I get is when sending the IOC “SYSTEM:STATE MONITOR” is: ’… RCV_STATE: Record does not accept input "MONITOR"

 

Proto definition:

readSystemState

{

   in "SYSTEM:STATE %s";

   out "%(\$1)s";

}

 

Record definition:

record(mbbi, "RCV_STATE")

{

   field(DESC, "SYSTEM:STATE P01")

   field(DTYP, "stream")

   field(SCAN, "I/O Intr")

   field(INP,  "@simCmd.proto readSystemState(STATE_RTN) $(PORT) 0")

   field(ZRST, "STANDBY")

   field(ZRVL, "0")

   field(ONST, "OPERATE")

   field(ONVL, "1")

   field(TWST, "SELFTEST")

   field(TWVL, "2")

   field(UNSV, "INVALID")

}

record(bi, " STATE_RTN ")

{

   field(DESC, "State Return")

   field(DTYP, "Soft Channel")

   field(SCAN, "Passive")

   field(ZNAM, "OK")

   field(ONAM, "ERROR")

   field(VAL, 0)

   field(PINI, 1)

}

Patrick Barrett

Software Engineer

The Boeing Company

 


Replies:
RE: StreamDevice return state error Barrett (US), Patrick E via Tech-talk
References:
StreamDevice return state error Barrett (US), Patrick E via Tech-talk
RE: StreamDevice return state error Pearson, Matthew via Tech-talk

Navigate by Date:
Prev: RE: StreamDevice return state error Pearson, Matthew via Tech-talk
Next: RE: StreamDevice return state error Barrett (US), Patrick E via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: RE: StreamDevice return state error Pearson, Matthew via Tech-talk
Next: RE: StreamDevice return state error Barrett (US), Patrick E via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·