EPICS Controls 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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: When a record is changed twice very fast, camonitor only detects first change
From: Tim Mooney <[email protected]>
To: Mikel Rojo <[email protected]>
Cc: [email protected]
Date: Mon, 23 May 2011 11:01:01 -0500 (CDT)
Mikel,

What is the stringin record's SCAN field set to?  If it's not "Passive",
then "pvPut(input)" will not cause the record to process, and this will
prevent the new value of the VAL field from being posted.  (Channel access
will post the value of any non-VAL field that it writes to, but it defers
to the record for VAL fields.)

Tim

----- Original Message -----
> From: "Mikel Rojo" <[email protected]>
> To: [email protected]
> Sent: Monday, May 23, 2011 10:02:32 AM
> Subject: When a record is changed twice very fast, camonitor only detects first change
> Hi,
> 
> I searched tech-talk for something similar but haven't found anything.
> I hope I am not submitting an old claim. I have a sequencer program
> that basically monitors a stringin record for when a command arrives
> from some HW. Here is the basics of the program:
> 
> program xxx
> 
> /*RECORD is a stringin record that receives a string command when the
> HW sends it*/
> string input; assign input to "RECORD"; monitor input;
> evflag change; sync input change;
> 
> ss xxx {
> state IDLE {
> entry {
> efClear(change);
> }
> when(efTestAndClear(change)) {
> } state PROCESS
> }
> 
> state PROCESS {
> when(1) {
> pvGet(input);
> [...some processing is done...]
> sprintf(input,"");
> pvPut(input);
> } state IDLE
> }
> }
> 
> However, the PROCESS state is only reached when the input string is
> different from the previous one. Here is what happens:
> 1. First the program is idle waiting for an input: camonitor and caget
> RECORD both return ""
> 2. "STRING" gets sent from the HW and dumps on the RECORD
> 3. the monitor detects the change and raises the change flag
> 4. camonitor changes to "STRING"
> 4. PROCESS state begins, "STRING" gets loaded on the input variable
> 5. at the end of processing input is set to ""
> 6. with pvPut, the string "" gets written onto RECORD, this is done so
> that the record can reprocess in case the same string comes in again.
> 7. program waits in idle state
> 8. At this point, caget RECORD returns "", however camonitor RECORD is
> still stuck on "STRING", this does not change after waiting
> 9. If a new string is written to RECORD from the HW, the camonitor
> detects a change and starts the process, but if it is the same
> "STRING" again, the monitor believes there has been no change and does
> not trigger the process
> 
> I don't understand how camonitor can say that a pv has one value,
> while with caget we can see that it has a different one. I tried
> stopping the monitor before clearing the variable and then starting
> the monitor again afterwards but it does not change anything. I am
> using the latest version of base (3.14.12.1) and sequencer (2.0.13). I
> would really appreciate any help. Thank you in advance.
> Mikel Rojo

-- 
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


References:
When a record is changed twice very fast, camonitor only detects first change Mikel Rojo

Navigate by Date:
Prev: RE: caGateway crashes / use of *MustSucceed functions Jeff Hill
Next: Re: vxWorks network problems Steven M. Hartman
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: When a record is changed twice very fast, camonitor only detects first change Mikel Rojo
Next: Re: When a record is changed twice very fast, camonitor only detects first change Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·