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  2014  2015  2016  2017  2018  2019  2020  <20212022  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Best way to properly "synchronize" records between two IOCs
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 14 Jun 2021 05:57:12 +0000

All,

 

I’m back again with another question.

 

Suppose I had two IOCs named IOC A and IOC B. IOC A contains three records, two of which utilize StreamDevice and the third record is there to allow slow scanning with fast response. Pseudocode is shown below.

 

record(ao, “IOC_A_slow_scan”)

{

              field(SCAN, “1 second”)

              field(FLNK, “IOC_A_get_val”)

}

 

record(ao, “IOC_A_set_val”)

{

              field(SCAN, “Passive”)

              field(DTYP, “stream”)

              field(OUT,  “@inst.proto setVal PORT”)

              field(FLNK, “IOC_A_get_val”)

}

 

record(ai, “IOC_A_get_val”)

{

              field(SCAN, “Passive”)

              field(DTYP, “stream”)

              field(INP,    “@inst.proto getVal PORT”)

}

 

In IOC B, I want to process “IOC_A_set_val” from IOC A,  get a value from “IOC_A_get_val” and manipulate that value through a calc record. What is the recommended approach so that the calc record’s INP field gets the most up-to-date from “IOC_A_get_val”. To further elaborate on what I want to achieve, I feel like I can just do the following in IOC B:

 

record(ao, “IOC_B_set_val_to_IOC_A”)

{

              field(SCAN, “Passive”)

              field(OUT,  “IOC_A_set_val”)

              field(FLNK, “IOC_B_fanout”)

}

 

record(ao, “IOC_B_set_val_to_IOC_A”)

{

              field(SCAN, “Passive”)

              field(SELM, “All”)

              field(LNK0,  “IOC_A_set_val.PROC”)

              field(LNK1,  “IOC_B_calc”)

}

 

record(calc, “IOC_B_calc”)

{

              field(SCAN, “Passive”)

              field(INPA, “IOC_A_get_val”)

              field(CALC, “A * 250”)

}

 

Once “IOC_B_set_val_to_IOC_A” is processed, we then proceed to “IOC_B_fanout”, which causes “IOC_A_set_val” to process with the value that was set from “IOC_B_set_val_to_IOC_A”. Then, “IOC_A_get_val” is processed before control is returned to “IOC_B_fanout” and we proceed to process “IOC_B_calc”, at which point “IOC_A_get_val” should have the most recent value. The reason why I want to do it in a round about way is because the StreamDevice documentation specifies that “input links with PP flag pointing to a StreamDevice record will read the old value first and start the protocol afterward”.

 

Is this thinking correct or not? If not, please let me know where my understanding is incorrect.


Thanks,

Andy


Replies:
Re: Best way to properly "synchronize" records between two IOCs Mark Rivers via Tech-talk

Navigate by Date:
Prev: Epics archiver exporting matlab multiple records Manoussakis, Adamandios via Tech-talk
Next: RE: Instructions on using manage-procs procServ and Conserver Smith, William via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Epics archiver exporting matlab multiple records Manoussakis, Adamandios via Tech-talk
Next: Re: Best way to properly "synchronize" records between two IOCs Mark Rivers via Tech-talk
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  <20212022  2023  2024 
ANJ, 14 Jun 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·