EPICS Home

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: Generating a 'binary output pulse' by processing an ao record? [SEC=UNCLASSIFIED]
From: "LYNCH, Damien" <[email protected]>
To: Nicklas <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 19 Jun 2014 00:06:28 +0000

Hi Niklas,

 

It looks like when you have a constant in YY’s DOL it is only retrieved when the record initialises. Have a look at init_record() and process() in src/rec/boRecord.c. So after the first time YY processes it’s VAL will remain at 0. One solution is the following. Another might be to set the DOL of YY to a record whose value is always one and FLNK XX to YY. If you only want YY to go high if XX is non-zero you could make ZZ a calc record.

 

record(ao, "XX") {

    field(FLNK, "ZZ")

}

 

record(bo, "ZZ") {

    field(DOL, "1")

    field(OMSL, "closed_loop")

    field(OUT, "YY PP")

}

record(bo, "YY") {

    field(HIGH, "0.5")

    field(ZNAM, "Off")

    field(ONAM, "On")

}

 

Thanks,

Damien

 

From: [email protected] [mailto:[email protected]] On Behalf Of Nicklas
Sent: Thursday, 19 June 2014 8:08 AM
To: [email protected]
Subject: Generating a 'binary output pulse' by processing an ao record?

 

Dear all,

my name is Nicklas and I am a student at Uppsala University, Sweden, who is currently working for the research facility FREIA, which is designed for research and development of accelerators and instrumentation for accelerator based research.

 

I am new to epics so I would really appreciate some help.

Now to my question; as the subject line suggests, I need help/tips on how to generate a binary output pulse by processing an analog output record, i.e. I want the bo value to be 1 for 0.5 seconds (and then return to 0) each time the analog output is processed. My idea of the database setup was the following:

 

record (ao, "XX") {

  ...

  field(FLNK, "YY")

}

 

record (bo, "YY") {

  ...

  field (DOL, "1")

  field (OMSL, "closed_loop")

  field (HIGH, "0.5")

}

 

This works fine the first time "XX" is processed (using dbpf), but the next time "XX" is processed (using dbpf), it doesn't work.

 

Any tips/thoughts on this would be highly appreciated.

 

Best regards,

 

Nicklas Bjärnhall Prytz,

Engineering Physics Student at FREIA

Uppsala University

Sweden


Navigate by Date:
Prev: Generating a 'binary output pulse' by processing an ao record? Nicklas
Next: RE: Generating a 'binary output pulse' by processing an ao record? Arnold, Ned D.
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: RE: Generating a 'binary output pulse' by processing an ao record? Arnold, Ned D.
Next: saveData vs 2G file size limit Mark Davis
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