I suspect your CALC expression is longer than 40 characters and that is
the source of the error.
Mark
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Andrew Wagner
Sent: Tuesday, September 28, 2010 3:04 PM
To: [email protected]
Subject: CALC expression
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