Hi Emmanuel,
Agree and not only that: 0.00835 actually becomes an
intelligible:parm.VAL/DESC
Regards
Matthieu
On 09/28/10 18:58, [email protected] wrote:
No one suggested this but ... you can also put your constant as input!
0.00835 then becomes D, etc... with just that change you saved 12 chars!
;-)
--
E
On 13:03 Tue 28 Sep , Andrew Wagner wrote:
Hey everyone,
I need to evaluate a somewhat complicated conditional statement in a calc record. Presently I need to evaluate:
field(CALC, "(235>B&& 5>D&& 5>E) ? (B*0.00835 - 0.7> A + (C-B)*0.25 ? B*0.00835 - 0.7: A + (C-B)*0.25): 0")
where the letters are input variables. When I load the record I get the error
Can't set "VOLT:PID.CALC" to "(235>B&& 5>D&& 5>E) ? (B*0.00835 - 0.7> A + (C-B)*0.25 ? B*0.00835 - 0.7: A + (C-B)*0.25): 0"
Error at or before ")" in file "MagnetCtrlApp/Db/MagnetCtrl.db" line 113
Does CALC not support nested evaluations? Perhaps I need a subroutine record? Any advice would be greatly appreciated.
Cheers,
Andrew
--
Matthieu Bec Gemini Observatory
Tel: +56 51 205785 c/o AURA, Casilla 603
Fax: +56 51 205650 La Serena, Chile
- References:
- CALC expression Andrew Wagner
- Re: CALC expression emmanuel_mayssat
- Navigate by Date:
- Prev:
Re: CALC expression Andrew Johnson
- Next:
Re: archiving system Patrick Thomas
- 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: CALC expression emmanuel_mayssat
- Next:
EPICS Registration - we need to close this to get our final counts. Dalesio, Leo
- 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
|