Experimental Physics and Industrial Control System
|
Hi Andrew,
Sorry for the delay. I'll send you an example of this issue sometime this week.
Thanks,
Andy
From: Johnson, Andrew N. <anj at anl.gov>
Sent: Thursday, July 1, 2021 8:31 AM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Using CALC value to set NELM in subArray
Hi Andy,
On Jun 30, 2021, at 9:01 PM, Wang, Andrew via Tech-talk < tech-talk at aps.anl.gov> wrote:
I want to use a calc record to determine what I want my NELM in a subArray record to be. I keep getting an error saying that there are no digits to convert. I feel like the problem is because the NELM field is ULONG, while
the VAL field of the calc record is a DOUBLE. Don’t think it is possible to “cast” the DOUBLE to a ULONG in the calc record, unless I am wrong. Is there a way around this or is the best approach to use an aSub record?
The VAL field of a calc record holds a double, so even if you could cast the value in the _expression_ it would still be represented as a double result after the calculation was complete.
How are you copying your calc.VAL field value to the subArray.NELM field? I suspect that’s where your problem may be, are you trying to use NELM as a link? That would generate the “no digits to convert” error because NELM is a DBF_ULONG field so you can
only set it to an integer numeric value in your .db file. Only DBF_LINK fields can point to other PVs. To copy the calc result into it I would use a calcout record and point its OUT link (which is a DBF_OUTLINKfield ) to the NELM field so its value will be
copied.
If I’ve misunderstood what you’re doing, please post your .db file and the exact error message you’re getting; explicit examples are always much easier to debug than descriptions.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- References:
- Using CALC value to set NELM in subArray Wang, Andrew via Tech-talk
- Re: Using CALC value to set NELM in subArray Johnson, Andrew N. via Tech-talk
- Navigate by Date:
- Prev:
Re: Best practices for booting IOC at Linux startup? J. Lewis Muir via Tech-talk
- Next:
Re: Software Architecture training Rees, Nick 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
- Navigate by Thread:
- Prev:
Re: Using CALC value to set NELM in subArray Johnson, Andrew N. via Tech-talk
- Next:
Accessing the "opi_file" property of the Linking Container 工藤真由子 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
|
ANJ, 21 Jul 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|