Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: R3.15.6 calc string doesn't accept LA, LB, LC, etc...?
From: "Mooney, Tim M. via Tech-talk" <tech-talk@aps.anl.gov>
To: Neil Hamilton Jr <neil.hamilton.jr@gmail.com>, "Tech Talk (tech-talk@aps.anl.gov)" <Tech-talk@aps.anl.gov>
Date: Wed, 20 Mar 2019 04:17:17 +0000

I think you can get what you want with this _expression_:

"A#B+C#D+E#F+G#H;B:=A;D:=C;F:=E;H:=G"


Tim Mooney (mooney@anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: tech-talk-bounces@aps.anl.gov <tech-talk-bounces@aps.anl.gov> on behalf of Neil Hamilton Jr via Tech-talk <tech-talk@aps.anl.gov>
Sent: Tuesday, March 19, 2019 7:42:11 PM
To: tech-talk@aps.anl.gov
Subject: R3.15.6 calc string doesn't accept LA, LB, LC, etc...?
 
Hey all,
I'm trying to create a calc record that looks at previous values to increment a count.  See below
record(calc, "RESULT_A")
{
   field(SCAN, ".05 second")
   field(INPH, "RESULT_A.LG")
   field(INPA, "RESULTINPA")
   field(INPC, "RESULTINPC")
   field(INPB, "RESULT.LA")
   field(INPE, "RESULTINPE")
   field(INPD, "RESULT.LC")
   field(INPG, "RESULTINPG")
   field(INPF, "RESULT_A.LE")
   field(CALC, "A#B?1:0+C#D?1:0+E#F?1:0+G#H?1:0")
}

If I change B to LA in the calc string above I get this error during dbLoadRecords
RESULT_A.CALC: Syntax error, unknown operator/operand in _expression_ "A#LA?1:0+C#D?1:0+E#F?1:0+G#H?1:0"

First I'd like to ask if the 'last' fields are usable this way.  From the record reference manual it appears they are.  Second, does anyone have a better way of just incrementing a count anytime the inputs change?  Any help is very much appreciated.

Neil Hamilton Jr

References:
R3.15.6 calc string doesn't accept LA, LB, LC, etc...? Neil Hamilton Jr via Tech-talk

Navigate by Date:
Prev: Re: R3.15.6 calc string doesn't accept LA, LB, LC, etc...? Michael Davidsaver via Tech-talk
Next: Change/Sync General Time Providers Kyle Hesse 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  <20192020 
Navigate by Thread:
Prev: Re: R3.15.6 calc string doesn't accept LA, LB, LC, etc...? Michael Davidsaver via Tech-talk
Next: Change/Sync General Time Providers Kyle Hesse 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  <20192020 
ANJ, 20 Mar 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·