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

Subject: Re: Stream device protocol files question?
From: Dirk Zimoch <[email protected]>
To: [email protected]
Date: Fri, 19 Sep 2014 11:42:30 +0200
Hello Steve,

Are you sure that you do not want one record for each battery?

I would expect one bo record to switch one battery on or off:

record (bo, "Battery$(N)OnOff")
{
  field (DTYP, "stream")
  field (OUT,  "Battery.proto OnOff($(N)) dev”)
}

OnOff {
 Battery %{On|Off} \$1";
 in "OK";
 @mismatch { in "Error:%(Battery\$1Error)s”; }
}

(Disadvantage: Last error stays in error record when everything is OK.)

If you have a fixed and known set of error messages, you can also redirect to an mbbi Error record like this:

 in "%(Battery\$1Error){OK|Error: message1|Error: message2}";


Or do you select battery x out of n?

Dirk


On 17.09.2014 18:22, Goff, Steven J wrote:
Hello,

I am trying to understand how to setup a particular command in a
protocol file.

The command looks like this:

Battery On “number”

And the command returns either: “OK” or ”Error: err msg”.

I think my protocol file might look like this:

Battery

{

  Out “Battery On %d”;

}

And my db file would look like this:

Record (longin, “batteryOn”)

{

   Field(DTYP, “stream”)

   Field(INP, “myDev.proto Battery dev”)

}

How do I get the status that the command returns?

I want to do something like

Battery

{

   Out “Battery On %d”;

   In “%s”;

}

But I am already using an input for the battery number.  So how do I do
both?

Thanks In advance.

Steve Goff



References:
Stream device protocol files question? Goff, Steven J

Navigate by Date:
Prev: RE: Stream device protocol files question? peter.owens
Next: Re: Asyn Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Stream device protocol files question? peter.owens
Next: Sequencer web search lists out-dated sites Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·