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: Re: Fanout and asub interaction issues
From: "Wang, Andrew via Tech-talk" <tech-talk at aps.anl.gov>
To: "Mooney, Tim M." <mooney at anl.gov>, EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Sat, 17 Apr 2021 04:04:26 +0000
Hi Tim,

I just realized I made a typo. I had them as aai records not aao as my pseudo code contained. The aai records are getting the string via a StreamDevice protocol file. 

I changed them to waveform but it didn’t work.

Thoughts?

From: Mooney, Tim M. <mooney at anl.gov>
Sent: Friday, April 16, 2021 8:41 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>; Wang, Andrew <wang126 at llnl.gov>
Subject: Re: Fanout and asub interaction issues
 
Hi Andrew,

I would have expected your database to work.  Do the aao records use asynchronous device support?  How is an aao record getting a string?

In any case, if you have the calc module, you could replace the fanout with a sseq record, which can wait for completion between output links.  I would do it like this:

record(sseq, "sseq_rec") {
    field(LNK1, "aao_rec_1.PROC CA")
    field(WAIT1, "After2")
    field(LNK2, "aao_rec_2.PROC CA")
    field(WAIT2, "Wait")
    field(LNK3, "asub_rec.PROC PP")
}

This will process aao_rec_1 and aao_rec_2, wait for them both to finish, and then process asub_rec.

I would not use aao records to hold strings.  I would use waveform records with FTVL=="CHAR".

Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov>
Sent: Friday, April 16, 2021 9:29 PM
To: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Fanout and asub interaction issues
 

All,

 

I am encountering an interesting problem and would again appreciate your insights.

 

Essentially, I have a fanout record and asub record that resemble the following pseudocode:

 

record(fanout, “fanout_rec”)

{

              field(SCAN, “Passive”)

              field(LNK0, “aao_rec_1”)

              field(LNK1, “aao_rec_2”)

              field(LNK2, “asub_rec”)

}

 

record(asub, “asub_rec”)

{

              field(SCAN, “Passive”)

              field(SNAM, “c_code”)

              field(INPA, “aao_rec_1”)

              field(FTVA, “CHAR”)

              field(NOA, 2048)

              field(INPB, “aao_rec_2”)

              field(FTVB, “DOUBLE”)

              field(NOB, 2048)

}

 

My goal was to first process the first two aao records so they contain the most up-to-date values before processing “asub_rec”. When I attempt to retrieve the values from both aao records within “c_code”, it is getting previous values that they contained prior to their latest processing.

 

For instance, if “aao_rec_1” contained “hello”, then when I print out “(CHAR*)prec->a” in “c_code”, it prints out nothing. But when I process it again, but with a different value, I print out “hello”, rather than the latest value it has.

 

I’m beginning to think it might be better to use the PP flag for INPA and INPB like this:

 

record(asub, “asub_rec”)

{

              field(SCAN, “Passive”)

              field(SNAM, “c_code”)

              field(INPA, “aao_rec_1 PP”)

              field(FTVA, “CHAR”)

              field(NOA, 2048)

              field(INPB, “aao_rec_2 PP”)

              field(FTVB, “DOUBLE”)

              field(NOB, 2048)

}

 

Any thoughts or suggestions?

 

Andy


Replies:
Re: Fanout and asub interaction issues Wang, Andrew via Tech-talk
References:
Fanout and asub interaction issues Wang, Andrew via Tech-talk
Re: Fanout and asub interaction issues Mooney, Tim M. via Tech-talk

Navigate by Date:
Prev: Re: Fanout and asub interaction issues Mooney, Tim M. via Tech-talk
Next: Re: Fanout and asub interaction issues Wang, Andrew 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: Re: Fanout and asub interaction issues Mooney, Tim M. via Tech-talk
Next: Re: Fanout and asub interaction issues Wang, Andrew 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, 16 Apr 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·