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: Issue with record processing and being able to process records after a certain amount of delay
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>
Cc: "Pogge, James Robert" <pogge1 at llnl.gov>, "Brown, Terence D" <brown334 at llnl.gov>
Date: Wed, 10 Feb 2021 21:01:11 +0000

All,

 

I am writing EPICS records for a digital pattern generator. The DPG works by providing it with a CSV file containing raw pattern bits. This process has three states: LOADING (1), LOAD COMPLETE (2), LOAD ERROR (3).

 

What I have done is create several records shown below. ‘select_read_status’ is the record containing one of the three states.

 

record(aSub, "upload_pattern")

{

       field(DESC, "Get the pattern filepath")

       field(SCAN, "Passive")

       field(SNAM, "p_file_upload")

       field(INPA, "get_pattern_filepath")

       field(INPB, "set_user_pattern")

       field(FTA, "STRING")

       field(FTB, "STRING")

       field(OUTA, "set_pattern")

       field(FTVA, "CHAR")

       field(NOVA, 1970000)

       field(OUTB, "select_read_status.SELN")

       field(FTVB, "DOUBLE")

       field(FLNK, "set_pattern")

}

 

record(waveform, "set_pattern")

{

       field(DTYP, "stream")

       field(DESC, "Set GFT7048's pattern")

       field(FTVL, "CHAR")

       field(NELM, 1970000)

       field(INP, "@GFT7048.proto setPattern $(PORT)")

}

 

record(ao, "load")

{

       field(DESC, "Load button")

       field(SCAN, "Passive")

       field(VAL, "0")

       field(FLNK, "srs_load")

}

 

record(seq, "srs_load")

{

       field(DESC, "Set the index for status")

       field(SCAN, "Passive")

       field(DOL1, "1")

       field(LNK1, "select_read_status.SELN")

       field(FLNK, "split")

}

 

record(fanout, "split")

{

       field(DESC, "What")

       field(SCAN, "Passive")

       field(LNK0, "select_read_status")

       field(LNK1, "upload_pattern")

}

 

record(sel, "select_read_status")

{

       field(DESC, "Choose which mess. to show")

       field(SCAN, ".1 second")

       field(SELM, 0)

       field(INPA, 0)                          # PAUSE

       field(INPB, 1)                          # LOADING

       field(INPC, 2)                          # ERROR

       field(INPD, 3)                          # COMPLETED

}

 

When the ‘load’ record is processed, it proceeds to set the ‘srs_load’ record, which will set the ‘select_read_status.SELN’ to be 1. This is followed by a fanout record named ‘split’, which will first process the ‘select_read_status’. If my understanding is correct, this will proceed to set ‘select_read_status.VAL’ to be whatever constant link is provided in the INPB field. Then, ‘split’ processes ‘set_pattern’ asub record, which contains an output link that is set to ‘select_read_status.SELN’. If the sub-routine used by ‘set_pattern’ successfully loaded the pattern, a 2 is returned. Otherwise, a 3 is returned.

 

The good news is that ‘select_read_status’ can be set to be 2 or 3, when I process ‘load’. However, ‘select_read_status.SELN’ doesn’t seem to be set to 1 until like a few milliseconds before it is set by ‘set_pattern’. For example, if I ran ‘camonitor select_read_status.SELN’, it would show 1, but then 2 or 3 immediately after. This defeats the purpose of telling the end user what is the status of the program.

 

The whole reason why I am creating ‘select_read_status’ is for a multi-color indicator on a CSS GUI. If it is 1, it turns yellow to signify loading. If it is 2, it turns green to signify the pattern was set successfully, and so on.

 

Is there some way to create a delay so that ‘select_read_status’ is set to be 1 before running ‘set_pattern’?

 

Andy


Replies:
Re: Issue with record processing and being able to process records after a certain amount of delay Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: RE: Estimate Data Rate and BW requirements Mark Rivers via Tech-talk
Next: Re: Issue with record processing and being able to process records after a certain amount of delay Johnson, Andrew N. 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: EPICS Archiver Appliance: Fatal error when deploying the WARs (probably Java) Shankar, Murali via Tech-talk
Next: Re: Issue with record processing and being able to process records after a certain amount of delay Johnson, Andrew N. 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, 10 Feb 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·