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  2011  2012  2013  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Writing data using channel access link as well as caput, into wavefrom record
From: Benjamin Franksen <[email protected]>
To: <[email protected]>
Date: Wed, 26 Mar 2014 12:48:59 +0100
On Wednesday, March 26, 2014 16:06:15 Ganesh Jangir wrote:
>  There are two records t1, t2 in two different ioc on separate linux
> machines. IOC 2
>
>   record(waveform, t2) {
>    field(INP, "t1 CPP")
>    field(NELM, "16000")
>    field(FTVL, "CHAR")
>  }
>
>  IOC 1
>  record(waveform, t1) {
>    field(NELM, "16000")
>    field(FTVL, "CHAR")
>  }
>
>   t2 need to get data from t1, as well as Using caput -S t2 (ONE at a
> time).  [ganesh@01HW183138 ~]$ caput -S t1 abcd
> [...]
>  How to stop t2, from reading value from t1 when some one is doing
> caput -S t2

EPICS doesn't make this easy but it's doable by patching the waveform
record support. Here is a brief outline:

* in the dbd file, make the VAL field special(SPC_MOD).
* add an extra field (say, WRVL, type UCHAR) for internal use so record
  support can remember that someone wrote to the VAL field
* add a special method (if one doesn't exist yet, else add a case for
  VAL to the existing one)
* in this special handling for the VAL field, remember that VAL was
  written (set wrvl=1)
* change the process method so that it reads from INP (via device
  support's read method) only if WRVL is zero, else reset WRVL to zero.

(Others will undoubtedly tell you how to solve your problem w/o changing
the existing record support by adding a number of additional records...)

Cheers
Ben

________________________________

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.

Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking

Sitz Berlin, AG Charlottenburg, 89 HRB 5583

Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin

http://www.helmholtz-berlin.de


References:
Writing data using channel access link as well as caput, into wavefrom record Ganesh Jangir

Navigate by Date:
Prev: Writing data using channel access link as well as caput, into wavefrom record Ganesh Jangir
Next: Access to device connected RaspBerryPi SPI bus from IOC-Client Christian Pauly
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Writing data using channel access link as well as caput, into wavefrom record Ganesh Jangir
Next: Access to device connected RaspBerryPi SPI bus from IOC-Client Christian Pauly
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·