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

Subject: Re: Testing the new DBE property in EPICS R3-14-11
From: Ben Franksen <[email protected]>
To: [email protected]
Date: Sun, 12 Sep 2010 18:32:07 +0200
On Sonntag, 12. September 2010, I wrote:
> To summarize: this nice new feature is not yet fully implemented for
> all record types; also, camonitor misses an option to specify the
> request type to make this useful. I tried to add it but it doesn't
> work.
> [...]
> The better solution is to hack a -d option into camonitor. I tried
> this with the Perl version camonitor.pl (attached). This was a quick
> cut & paste job, and for reasons I cannot determine it does not work
> as I expected: the request type gets reduced to DBR_TIME_DOUBLE:
>
> ben@sarun[1]: ~/tmp > ./camonitor.pl -dDBR_GR_DOUBLE -mp benHost:ai1
> benHost:ai1
>     Native data type: DBR_DOUBLE
>     Request type:     DBR_TIME_DOUBLE
>     Element count:    1
>     Value:            4
>     Timestamp:        2010-08-12 16:09:27.717296
>     Status:           LOW
>     Severity:         MINOR
>
> (Same result with DBR_CTRL_DOUBLE). I suppose this has to do with
> either CA itself or the Perl CA bindings. Probably Andrew or Jeff can
> shed some light upon the issue...

I just made a stupid mistake. The attached version works:

ben@sarun[1]: ~/tmp > ./camonitor.pl -dDBR_CTRL_DOUBLE -mp benHost:ai1
benHost:ai1
    Native data type: DBR_DOUBLE
    Request type:     DBR_CTRL_DOUBLE
    Element count:    1
    Value:            6
    Status:           HIGH
    Severity:         MINOR
    Units:            Counts
    Precision:        0
    Lo disp limit:    0
    Hi disp limit:    10
    Lo alarm limit:   2
    Lo warn limit:    4
    Hi warn limit:    6
    Hi alarm limit:   8
    Lo ctrl limit:    0
    Hi ctrl limit:    10

Of course, this is of no use as the ai record does not send DBE_PROPERTY 
events. Unfortunately I could not get it to work with mbbi or mbbo 
records either. Monitor events actually get reported, but the DBR type 
gets jumbled:

ben@sarun[1]: ~/tmp > ./camonitor.pl -dDBR_GR_ENUM -mp 
benHost:mbbiExample
benHost:mbbiExample
    Native data type: DBR_ENUM
    Request type:     DBR_GR_STRING
    Element count:    1
    Value:            NO ALARM
    Status:           UDF
    Severity:         INVALID

This time I verified that the create_subscription method _does_ get the 
right argument passed, so this must really be something in the CA 
bindings. Removing the lines 920-921:

            else if (dbr_type_is_ENUM(type))
                type += (DBR_STRING - DBR_ENUM);

from Cap5.xs, I finally gets the right answers:

ben@sarun[1]: ~/tmp > ./camonitor.pl -dDBR_GR_ENUM -mp 
benHost:mbbiExample &
[1] 11343
ben@sarun[1]: ~/tmp > benHost:mbbiExample
    Native data type: DBR_ENUM
    Request type:     DBR_GR_ENUM
    Element count:    1
    Value:            MAJOR
    Status:           
    Severity:         
    Enum strings:     NO ALARM,MINOR,MAJOR,INVALID
caput benHost:mbbiExample.ZRST bla       
Old : benHost:mbbiExample.ZRST       NO ALARM
benHost:mbbiExample
    Native data type: DBR_ENUM
    Request type:     DBR_GR_ENUM
    Element count:    1
    Value:            MAJOR
    Status:           
    Severity:         
    Enum strings:     bla,MINOR,MAJOR,INVALID
New : benHost:mbbiExample.ZRST       bla


Cheers
Ben
-- 
"Never confuse what is natural with what is habitual."
                                                 -- Mahatma Gandhi

Attachment: camonitor.pl
Description: Perl program


References:
Testing the new DBE property in EPICS R3-14-11 Xu, Chengcheng
Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen

Navigate by Date:
Prev: Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen
Next: Can devices supported in areaDetector include Jai and Imperx?(links to the data sheets ) 孟欣东
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Testing the new DBE property in EPICS R3-14-11 Ben Franksen
Next: Re: Testing the new DBE property in EPICS R3-14-11 Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·