Aahhh...
Well, that's a different story.
In that case your device support might be responsible for posting
the event.
You could either add something like:
db_post_events(precord, &precord->val, DBE_PROPERTY);
after you set the EGU field. (That should actually work with your
Base 3.14, too.)
Or you don't set the EGU field directly, but use the EPICS run-time
database access API - dbPutField() / dbPut() - then the EPICS
database library is posting the event for you (only on Base 3.15).
Cheers,
~Ralph
On 04/07/2016 12:56, Shantonu Sahoo
wrote:
Thanks
ralph for the detailed explanation.
I
have also tried with 3.15.x base. The method u said (changing
the units with caputs) is also working in my platform. But for
my requirement, I am changing the units in device support
(using asyn). below are the code snippets for it in the
device support C file (devAppname.c):
aiRecord
*precord = (aiRecord*)pgpibDpvt->precord;
precord->hopr
=1000.0;
sprintf(precord->egu,"nA");
These changes are actually reflected in the process variables
at runtime but doesn't generate updates (atleast not been
detected by camonitor -m p).
Shantonu
Sahoo
वैज्ञानिक
अधिकारी / Scientific Officer
कंप्यूटर
एवं सूचना वर्ग / Computer and Informatics Group
परिवर्ती
ऊर्जा साइक्लोट्रॉन केन्द्र / Variable Energy Cyclotron
Center
Ph: (033)
23182300
[email protected]
wrote: -----
To: EPICS Tech-Talk
<[email protected]>
From: Ralph Lange
Sent by: [email protected]
Date: 07/04/2016 12:57PM
Subject: Re: Problem in updating EGU field in CSS-BOY
OK, here's how it should work:
On the IOC side I have a file test.db that only
contains a minimal ai record:
record(ai,"foo") { }
and I am running this in a 3.15 'softIoc -d test.db'.
On the client side I am running camonitor in the
background, and then do 'caput's to see if I get
updates.
First test: without setting the mask to DBE_PROPERTY,
changing the units should not send monitor updates.
~ $ camonitor foo &
[1] 11517
~ $ foo
<undefined> 0 UDF INVALID
~ $ caput foo.EGU V
Old : foo.EGU
New : foo.EGU
V
~ $ caput foo.EGU A
Old : foo.EGU
V
New : foo.EGU
A
Second test: setting the event mask to DBE_PROPERTY,
changing the units should send monitor updates.
~ $ camonitor -m p foo
&
[1] 11718
~ $ foo
<undefined> 0 UDF INVALID
~ $ caput foo.EGU V
Old : foo.EGU
New : foo.EGU
V
foo
<undefined> 0 UDF INVALID
~ $ caput foo.EGU A
Old : foo.EGU
V
New : foo.EGU
A
foo
<undefined> 0 UDF INVALID
This is the expected and correct behavior.
You are missing that, as I wrote in my mail of June 07
(see below), the event type flag DBE_PROPERTY was
introduced in EPICS 3.14.11, but proper support for the
EPICS records is only available in the EPICS 3.15 series.
Applied to your case, this means that to get updates for
changes to the EGU field, the IOC has to use Base 3.15
(like my example above).
Cheers,
~Ralph
On 04/07/2016 08:45, Shantonu
Sahoo wrote:
Thanks
for the support.
But
I am stuck at the first step that you suggested. I
could not get the property change updates using
'camonitor -m p' on the command line when I change
the units.
I am using EPICS base 3.14.12.5. I guess
DBE_PROPERTY was introduced in 3.14.11, so it
should work with 3.14.12.5. Am I missing out
something?
Shantonu
Sahoo
वैज्ञानिक
अधिकारी / Scientific Officer
कंप्यूटर
एवं सूचना वर्ग / Computer and Informatics Group
परिवर्ती
ऊर्जा साइक्लोट्रॉन केन्द्र / Variable Energy
Cyclotron Center
Ph:
(033) 23182300
[email protected]
wrote: -----
To: EPICS Tech-Talk <[email protected]>
From: "Kasemir, Kay"
Sent by: [email protected]
Date: 06/07/2016 10:21PM
Subject: Re: Problem in updating EGU field in
CSS-BOY
Hello:
The support for DBE_PROPERTY has been added to
CS-Studio some time ago, but that was at a
time when the Channel Access gateway didn't
support it, and on the IOC side basically only
the 'enumeration' labels of respective record
types (bi, bo, mbbi, mbbo) sent out
DBE_PROPERTY updates.
What's happening is that the CA client creates
two subscriptions: One for value updates, and
one for property updates. If you have older
IOCs or CA gateways, they won't understand the
second subscription, so the client gets one
error per channel from those refused
subscriptions.
The DBE_PROPERTY feature has thus not been
used a lot, and I must admit I've basically
forgotten about it since we can't universally
use it in our local setup (older IOCs, ..).
Still, fundamentally the support should be
there.
Check with 'camonitor' on the command line,
using the "-m p" option to monitor property
changes, so assert that your record indeed
sends updates when you change the units.
Then use a recent version of CSS, something
with 4.2.x as a version number.
Its "diirt PVManager" is unfortunately
configured via files outside of CSS.
In Edit/Preferences, look for CSS Core, Diirt
preferences. You specify a Diirt configuration
directory that needs to contain files like the
ones found here:
https://github.com/ControlSystemStudio/org.csstudio.sns/tree/master/features/org.csstudio.sns.feature.snscore/rootfiles/diirt
Note the file datasources/ca/ca.xml, it
contains a setting `dbePropertySupported` that
defaults to false.
You need to set that to 'true'.
Now tools that use the "diirt PVManager"
should receive monitors for property changes.
This includes BOY as long as you have the
Edit, Preferences, CSS Applications, Display,
BOY, OPI Runtime setting for "PV Connection
layer" set to "pvmanager".
If it doesn't work, we should create an issue
ticket on https://github.com/ControlSystemStudio/cs-studio/issues to
continue the discussion there.
Thanks,
Kay
From: [email protected]
<[email protected]>
on behalf of Ralph Lange <[email protected]>
Sent: Tuesday, June 07, 2016 8:04 AM
To: EPICS Tech-Talk
Subject: Re: Problem in updating EGU field in
CSS-BOY
Dear Shantonu,
The new Channel Access event type flag
DBE_PROPERTY was introduced in EPICS 3.14.11,
but proper support for the EPICS records is
only available in the EPICS 3.15 series.
I do not have a good idea about how CS-Studio,
BOY and CAJ are supporting this feature. I was
prompting you for the versions, hoping that
one of the CS-Studio people would pick your
question up. (With the version numbers, they
should be able to give an answer.)
Sorry...
~Ralph
On 07/06/2016 13:23, Shantonu Sahoo wrote:
Dear Ralph,
Can you tell me the exact versions of EPICS
base, CSS and CAJ in which this feature is
incorporated.
Shantonu Sahoo
वैज्ञानिक अधिकारी / Scientific Officer
कंप्यूटर एवं सूचना वर्ग / Computer and
Informatics Group
परिवर्ती ऊर्जा साइक्लोट्रॉन केन्द्र / Variable
Energy Cyclotron Center
Ph: (033) 23182300
[email protected] wrote:
-----
To: Ralph Lange <[email protected]>
From: Shantonu Sahoo
Sent by: [email protected]
Date: 06/06/2016 03:27PM
Cc: EPICS Tech-Talk <[email protected]>
Subject: Re: Problem in updating EGU field in
CSS-BOY
I am using EPICS base-3.14.12.5, CS-Studio
4.1.4 , Java Utilities 3.2.0. I am not sure
about the version of CAJ. I am not using EPICS
CA Gateway.
Shantonu Sahoo
वैज्ञानिक अधिकारी / Scientific Officer
कंप्यूटर एवं सूचना वर्ग / Computer and
Informatics Group
परिवर्ती ऊर्जा साइक्लोट्रॉन केन्द्र / Variable
Energy Cyclotron Center
Ph: (033) 23182300
-----Ralph Lange <[email protected]>
wrote: -----
To: EPICS Tech-Talk <[email protected]>
From: Ralph Lange <[email protected]>
Date: 06/06/2016 02:19PM
Cc: Shantonu Sahoo <[email protected]>
Subject: Re: Problem in updating EGU field in
CSS-BOY
A feature to allow such updates of metadata
has been added to EPICS Base and the Channel
Access protocol recently.
What versions of EPICS Base (your IOC),
CS-Studio (your client) and CAJ (the Java CA
client library inside CS-Studio) are you
using? Is there an EPICS CA Gateway involved?
(If yes, what version?)
Thanks,
~Ralph
On 06/06/2016 10:29, Shantonu Sahoo wrote:
I am using CSS-BOY to display a process
variable using "Text Update". I have checked
the "Show Units" property. So, in addition to
the VALue, it displays the string that is
specified in the EGU field of the record. But,
in the runtime, if the EGU field changes, it
is not updated in the OPI until I do "Refresh
OPI". In contrary, the VALue is updated
smoothly.
Shantonu Sahoo
वैज्ञानिक अधिकारी / Scientific Officer
कंप्यूटर एवं सूचना वर्ग / Computer and
Informatics Group
परिवर्ती ऊर्जा साइक्लोट्रॉन केन्द्र / Variable
Energy Cyclotron Center
Ph: (033) 23182300
|