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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | When a record is changed twice very fast, camonitor only detects first change |
From: | Mikel Rojo <[email protected]> |
To: | <[email protected]> |
Date: | Mon, 23 May 2011 17:02:32 +0200 |
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 |