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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: how NOT to update the record |
From: | Tasaddaq Khan <[email protected]> |
To: | "Mooney, Tim M." <[email protected]>, [email protected] |
Date: | Fri, 10 Jul 2015 10:59:52 +0500 |
Hi Tasaddaq,
One way to do that is like this:
record (calcout, "c"){
field(SCAN, "1 second")
field(INPA, "c")
field(INPB,"b")
field(INPC,"1")
field(CALC,"d:=a+c;b")
field(OCAL,"d")
field(OOPT, "When Non-zero")
field(DOPT, "Use OCAL")}
field(OUT,"d PP")
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
From: Tasaddaq Khan [[email protected]]
Sent: Thursday, July 09, 2015 2:11 AM
To: Mooney, Tim M.
Subject: Re: how NOT to update the record
tasaddaqHi Timregards,
I changed my program and use the OOPT field in record c, but the result is same. It sets the value c=0 when b=0 and record d keeps the last value that is fine, but when I again put b=1, it starts from the starting point but not from the last value it keeps which I do not want. I want that my record d keeps the last value when b=0 and starts from this value when I again put the b=1.
record (bi,"b"){
field(FLNK, "c")
}
record (calcout, "c"){
field(SCAN, "1 second")
field(INPA, "c")
field(INPB,"b")
field(INPC,"1")
field(CALC,"B=1?A+C:0")
field(OOPT, "When Non-zero")
field(OUT,"d PP")
}
record(calcout, "d"){
field(INPA, "c")
field(INPB,"1")
field(CALC,"A+B^2")}
On Thu, Jul 9, 2015 at 3:48 AM, Mooney, Tim M. <[email protected]> wrote:
Hi Tasaddaq,
You can use the OOPT field to specify when the output link should be executed. c.OOPT="When Non-zero"
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
From: [email protected] [[email protected]] on behalf of Tasaddaq Khan [[email protected]]
Sent: Wednesday, July 08, 2015 1:59 PM
To: [email protected]
Subject: how NOT to update the record
Dear all
I have three records, when the value in the record "b" is "1" the value in the record c is calculated and the record d is updated as well. Upto this the things are working fine. But I want one more thing that when the b=0, the value of record "c" should become the zero (that is happening) but it should not send the value zero to the record d means at b=0 record c should be updated but it should not update the record d. I want to keep the last value of record d so that when b=1 again then record d should start from the last value that it will hold. Please tell me how to do this?
field(FLNK, "c")
record (bi,"b"){
}
record (calcout, "c"){
field(SCAN, "1 second")
field(INPA, "c")
field(INPB,"b")
field(INPC,"1")
field(CALC,"B=1?A+C:0")
field(OUT,"d PP")
}
record(calcout, "d"){
field(INPA, "c")
field(INPB,"1")
field(CALC,"A+B")
}
regards,
Tasaddaq