Experimental Physics and Industrial Control System
|
When you do a put to an ai.VAL field of a record that has device support connected to it, you're mostly just triggering the record to process. That will call the device support, which should perform an I/O operation that will update the
VAL field.
Many IOC applications use ai (and ao) records just as places to hold a double value that can be written to and read from by other local records or over the network. In that case they're relying on being able to write to the VAL field.
As John Sinclair replied, the DPVT field normally holds a pointer to an internal structure that is defined by the specific device support being used for that record; you would only be able to store stuff in it if you wrote that device support
code, and in that case you wouldn't use dbGetField() to access it anyway.
- Andrew
On 7/22/24, 4:06 PM, "Dave Bracey" <dbracey at fnal.gov> wrote:
I find that I can PVPUT (cmd line) to an AI, and I feel that this is probably not a good thing. It seems to me that the hardware should be the
only thing that changes the value of an AI PV. Without going into detail, I was going to use DPVT
This Message Is From an External Sender
This message came from outside your organization.
I find that I can PVPUT (cmd line) to an AI, and I feel that this is probably not a good thing. It seems to me that the hardware should be the only thing that changes the value of an AI PV.
Without going into detail, I was going to use DPVT as a side-channel to ensure that only the hardware can put to the AI.
From: Johnson, Andrew N. <anj at anl.gov>
Date: Monday, July 22, 2024 at 3:48 PM
To: Dave Bracey <dbracey at fnal.gov>, tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: dbGetField AI.DPVT
[EXTERNAL] – This message is from an external sender
Hi Dave,
There's a reason the DPVT field is called "Device Private" — it's not intended to be accessible from outside the device support code which owns it. Think of it like a C++
private: class-member access specifier. That doesn't mean it's impossible for other software running inside the IOC to get to it, but dbGetField() can't do it by design.
What's the higher-level problem that you're trying to solve which seems to require this? Please describe that to the list and we can try to offer other approaches that wouldn't require you to break the encapsulation.
- Andrew
On 7/22/24, 2:47 PM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:
I want to use dbGetField to get the value of the DPVT field of an AI record. Does this work? What field type would I specify?
I tried with DBR_LONG and it didn’t like that. I used the field_type returned from dbNameToAddr (17) and it didn’t like that.
Dave Bracey
Fermilab AD Instrumentation
|
- References:
- dbGetField AI.DPVT Dave Bracey via Tech-talk
- Re: dbGetField AI.DPVT Johnson, Andrew N. via Tech-talk
- Re: dbGetField AI.DPVT Dave Bracey via Tech-talk
- Navigate by Date:
- Prev:
Re: dbGetField AI.DPVT Charter via Tech-talk
- Next:
Re: dbGetField AI.DPVT Érico Nogueira Rolim 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
2022
2023
<2024>
2025
- Navigate by Thread:
- Prev:
Re: dbGetField AI.DPVT Charter via Tech-talk
- Next:
Re: dbGetField AI.DPVT Érico Nogueira Rolim 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
2022
2023
<2024>
2025
|
ANJ, 11 Sep 2024 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|