Damien,
Yes, you can do this using a database only.
If you have the sscan record, just have a detector trigger (e.g., scan.T1PV) write to the waveform record's PROC field, and set scan.NPTS to the number of times you want to process the record. The sscan record already knows to wait for the waveform record to complete.
If you have only the records in base, you can use a calcout record's OUT link to process the waveform record, and have one of the calcout record's input links monitor waveform.VAL with a CP link. This will make an infinite loop (assuming the waveform record posts its VAL field every time it processes, which you can ensure by setting waveform.MPST to "Always"). You probably don't want an infinite loop, so you can have the calcout record count the number of times it processes the waveform record, and have it execute the OUT link only if the count is lower than some number:
calcout.INPA = "waveform.VAL CP"
calcout.INPB = "calcout.VAL NPP";
calcout.CALC = "b>9?0:b+1"
calcout.OOPT = "When Non-zero"
calcout.OUT = "waveform.PROC PP"
Each time you process the calcout record, it will loop 10 times and then stop.
(Make sure you disable this when you're done with it, otherwise whenever anybody processes the waveform record it will start a new 10-iteration loop. That will make you very popular and maybe famous.)
Tim
----- Original Message -----
From: "Damien LYNCH" <[email protected]>
To: [email protected]
Sent: Tuesday, October 16, 2012 5:19:13 PM
Subject: Immediately reprocess a record [SEC=UNCLASSIFIED]
Hi,
I have a record (running in a 3.14.12.2 IOC) that I would like to process as quickly as it can. This record is retrieving a waveform over a LAN from a DSO and takes a variable amount of time to process (mostly 15 - 35 ms but periodically around 150 ms).
Currently I am using a sequence program that does a pvPut(wfRecProcField, SYNC) in a hard loop to achieve this. Is this the best method? Could I have done this using the database only?
Thanks,
Damien
--
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
- References:
- Immediately reprocess a record [SEC=UNCLASSIFIED] LYNCH, Damien
- Navigate by Date:
- Prev:
Re: Immediately reprocess a record [SEC=UNCLASSIFIED] Andrew Johnson
- Next:
RE: gpu integration into epics james.rowland
- 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
- Navigate by Thread:
- Prev:
Re: Immediately reprocess a record [SEC=UNCLASSIFIED] Andrew Johnson
- Next:
burtrb failing on local LAN, but not through gateway Keith Thorne
- 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
|