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  <20162017  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  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Force one record to run before all others
From: <[email protected]>
To: <[email protected]>
Date: Thu, 14 Apr 2016 15:43:31 +0000

Hi all,

 

I have just written an Asyn driver for the Lambda TDK Genesys power supply, and I got it working after realising that before I can get it to do anything with comms I have to address it properly. This is RS232 comms, but for some reason these PSUs seem to demand that the first command I send it when trying to interact with it is an “ADR” command with its RS485 address. I have managed to get it to work, by having one tiny db (let’s call it Init.db) file as follows:

 

record (ao, "$(P)ADDRESS"){

field(DTYP, "stream")

field(OUT, "@TDK_Lambda_Genesys.proto address $(PORT)")

field(VAL, "$(ADR)")

field(PINI, "YES")

}

 

This is then loaded with the subsection of the st.cmd along with the Main db file as follows:

 

dbLoadRecords("db/Init.db", "P=$(IOCNAME), PORT=L0, ADR=10")

dbLoadRecords("db/Main.db", "P=$(IOCNAME), PORT=L0")

 

This does seem to ensure that the address is set before any of the other records are actioned, with the few PINI Yes and Scan records connecting. However, this doesn’t seem quite right, I’m not even sure that it is meant to work the way it seems to be. I did try having the record in my main db file, I think before any other interactions with the device, although not at the top of the file, and it didn’t seem to work. There is a chance I wasn’t where I thought in the file as this was being tested on a production system, so was a little more hurried and I’m now trying to tidy the code up to be production ready, so the answer of put it at the top of the file might be the solution. A colleague suggested checking to see if PINI respected the PHAS field, but I can’t find this information easily in the on line manuals, and I’m not sure I want to dissect the code to check this out, when someone here might have the answer available easily. The manuals tell me that linking records is a better option than using PHAS, and that PINI is run before the normal scan tasks, which doesn’t exactly answer my question.

 

So, the simple version of the question:

Does PINI respect the PHAS field?

 

Alternatively:

Is there a tidier solution than my one above?

 

Regards,

Kathryn

 


Replies:
RE: Force one record to run before all others Mark Rivers
Re: Force one record to run before all others Andrew Johnson

Navigate by Date:
Prev: RE: Re:RE: Re:RE: the way pv sent to serial changed Mark Rivers
Next: RE: Force one record to run before all others Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Re:RE: Re:RE: the way pv sent to serial changed Mark Rivers
Next: RE: Force one record to run before all others Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·