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

Subject: Re: Simple binary input question about RVAL?
From: Rolf Keitel via Tech-talk <tech-talk at aps.anl.gov>
To: "Feister, Scott" <scott.feister at csuci.edu>, tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 11 Aug 2021 12:40:40 -0700
Title: signature text

Hi Scott,

If you want to get the underlying 0,1,   use caget -n isfishy   (type caget -h for on-line help).

As your records have no DTYP field set, they use the "Soft Channel" device support. In that case no conversions between raw values and engineering values happen. The RVAL field is not used by the record.

HTH - rolf -

P.S.: You are using very old EPICS documentation. Which release are you working with?

On 2021-08-11 12:03 p.m., Feister, Scott via Tech-talk wrote:
As a follow-up: Given that VAL is a string in this case, how can we retrieve the underlying boolean value of 0 or 1?

Thanks!

Scott

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Feister, Scott via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, August 11, 2021 11:54 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Simple binary input question about RVAL?
 
CAUTION: This email originated from outside of CSUCI. Do not click links or open attachments unless you validate the sender and know the content is safe. Contact ITS if you have any concerns

Hi EPICS users,

 

This is a very basic question regarding getting started with binary inputs, and the purpose of RVAL. (As an aside, perhaps we should anyone provide an example for a binary input (bi) similar to the “temperature:water” (ai) example from the Getting Started guide under “Test EPICS”, at:

https://docs.epics-controls.org/projects/how-tos/en/latest/getting-started/installation.html#test-epics

 

My students and I have been struggling to get a simple binary input working, though I think we’ve got it now. We first tried expanding, in the above Getting Started tutorial, the “test.db” script with:

 

test.db:

“””

record(ai, "temperature:water")

{

    field(DESC, "Water temperature in the fish tank")

}

record(bi, "isfishy")

{

    field(DESC, "True if the fish tank has fish inside.")

}

“””

 

However, “caget isfishy” shows a blank value, and “caput isfishy 0” does not seem to change anything. This perplexed us for a while.

 

Looking into it further in the user docs, we landed at documentation for the binary input record: https://epics.anl.gov/EpicsDocumentation/AppDevManuals/RecordRef/Recordref-11.html

 

Then, we tried modifying ZNAM and ONAM such as

test.db:

“””

record(bi, "isfishy")

{

    field(DESC, "True if the fish tank has fish inside.")

    field(ZNAM, "False")

    field(ONAM, "True")

}

“””

 

And now we can do “caput isfishy 1” and all “caget isfishy” prints with “True”, as does “caget isfishy.VAL”. However, I noticed that “caget isfishy.RVAL” still gives 0. So here’s my question: Is this zero in RVAL expected even though the Boolean is now True, and why? Thanks!

 

Scott

--
Rolf Keitel, Ph.D.
Researcher Emeritus
Office:
TRIUMF, 4004 Wesbrook Mall
Vancouver, BC, V6T 2A3
604 222 7453
Home:
4158 West 13th Ave
Vancouver, BC, V6R 2T6
604 228 0594
e-mail: rolf at triumf.ca

References:
Simple binary input question about RVAL? Feister, Scott via Tech-talk
Re: Simple binary input question about RVAL? Feister, Scott via Tech-talk

Navigate by Date:
Prev: Re: Simple binary input question about RVAL? Feister, Scott via Tech-talk
Next: MCA module's Amptek USB driver fails to connect Ru Igarashi 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: Simple binary input question about RVAL? Feister, Scott via Tech-talk
Next: MCA module's Amptek USB driver fails to connect Ru Igarashi 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  <20212022  2023  2024 
ANJ, 11 Aug 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·