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  2021  2022  2023  2024  2025  <2026 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  2021  2022  2023  2024  2025  <2026
<== Date ==> <== Thread ==>

Subject: RE: BO which should switch to 1 whenever processed
From: "Pearson, Matthew via Tech-talk" <tech-talk at aps.anl.gov>
To: Majer Karel <Karel.Majer at eli-beams.eu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 23 Apr 2026 14:02:04 +0000

Hi,

 

You may have to have that extra record, although there’s usually a few ways of doing this.

 

In the bo record documentation it says:

 

If closed_loop is specified, the VAL field’s value is obtained from the address specified in the Desired Output Link (DOL) field which can be a database link or a channel access link, but not a constant.

 

The HIGH field function will set VAL back to 0, so after the first processing you’re writing 0 each time instead of 1, unless you have that second record writing a new 1 each time.

 

It might make it easier to digest by renaming the record ‘Go’ (or similar), instead of ‘Constant’, and use another bo instead of longout, like:

 

record(bo, “Go”) {

  field(VAL, “1”)

  field(OUT, “MoveToPos PP”)

}

record(bo, “MoveToPos”) {

  field(OUT, “$(MOVE_OUTLINK) PP”)

  field(HIGH, “1”)

}

 

Or, you could incorporate a seq record to write the position and trigger the move:

 

record(seq, “MoveToPos”) {

  field(DLY0, “0”)

  field(DOL0, “SelectAbsPos”)

  field(LNK0, “$(POS_OUTLINK) PP”)

  field(DLY1, “0”)

  field(DOL1, “1”)

  field(LNK1, “$(MOVE_OUTLINK) PP”)

  field(DLY2, “1”)

  field(DOL2, “0”)

  field(LNK2, “$(MOVE_OUTLINK) PP”)

}

 

Also, this FLNK line:

field(FLNK, "MoveToPos PP")

doesn’t need the PP link attribute.

 

Cheers,

Matt

 

 

record(longout, "Constant1") {

    field(VAL,  "1")

    field(OUT,  "MoveToPos PP")

}

 

record(bo, "MoveToPos") {

    field(HIGH, "1")

}

 

 

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Majer Karel via Tech-talk
Sent: Thursday, April 23, 2026 3:45 AM
To: tech-talk at aps.anl.gov
Subject: [EXTERNAL] BO which should switch to 1 whenever processed

 

Hello, I would like to have a BO record which sets its value to 1 whenever processed (without necessarily writing 1 to VAL), then back to 0. It's part of PLC-based motion control IOC. The database should allow moving the motor to saved waypoint

Hello,

 

I would like to have a BO record which sets its value to 1 whenever processed (without necessarily writing 1 to VAL), then back to 0.

It's part of PLC-based motion control IOC. The database should allow moving the motor to saved waypoint positions; it looks like this:

 

record(ao, "AbsPos") {

    field(EGU,  "step")

}

 

record(ao, "Waypoint1") {

    field(EGU,  "step")

}

 

record(longout, "WaypointIdx") {

    field(FLNK, "SelectAbsPos")

}

 

record(sel, "SelectAbsPos") {

    field(SELM, "Specified")

    field(NVL,  "WaypointIdx")

    field(INPA, "AbsPos")

    field(INPB, "Waypoint1")

    field(FLNK, "DesiredPos")

}

 

record(ao, "DesiredPos") {

    field(EGU,  "step")

    # field(OUT,  "OUTLINK")  link to PLC

    field(DOL,  "SelectAbsPos")

    field(OMSL, "closed_loop")

    field(FLNK, "MoveToPos PP")

}

 

The processing chain is WaypointIdx -> SelectAbsPos -> DesiredPos -> MoveToPos

MoveToPos is a BO which tells the PLC to start motion, and it must have HIGH field set to non-zero. I'm having a problem triggering its processing in a way that its value becomes 1.

I tried this:

 

Record(bo, "MoveToPos) {

    # field(OUT,  "OUTLINK")  link to PLC

    field(DOL,  "1")

    field(OMSL, "closed_loop")

    field(HIGH, "1)

}

 

I expected that processing the record would set VAL to 1, then back to 0 after 1 second. It works only once; subsequent processing does not switch value back to 1. Writing 1 into VAL works as expected. Is this the correct functionality of the BO record?

 

I ended up with the following construct, which provides the desired functionality, but I don't much like having a record which only holds a constant value to be put into the BO. Is there a better way to do this?

 

record(ao, "DesiredPos") {

    field(EGU,  "step")

    # field(OUT,  "OUTLINK")

    field(DOL,  "SelectAbsPos")

    field(OMSL, "closed_loop")

    field(FLNK, "Constant1")

}

 

record(longout, "Constant1") {

    field(VAL,  "1")

    field(OUT,  "MoveToPos PP")

}

 

record(bo, "MoveToPos") {

    field(HIGH, "1")

}

 

Thanks,

 

Karel

 

 

 

Karel Majer | Senior software developer
Phone: +420 266 051 514
E-mail:
karel.majer at eli-beams.eu

ELI Beamlines Facility|The Extreme Light Infrastructure ERIC
Za Radnicí 835, 252 41 Dolní Břežany, The Czech Republic
www.eli-beams.eu 

 


Replies:
Re: BO which should switch to 1 whenever processed Ralph Lange via Tech-talk
Re: BO which should switch to 1 whenever processed Hu, Yong via Tech-talk
References:
BO which should switch to 1 whenever processed Majer Karel via Tech-talk

Navigate by Date:
Prev: PVmapper - another EPICS nameserver Vodopivec, Klemen via Tech-talk
Next: Re: Access Security Config File (ACF) size? Érico Nogueira Rolim 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  2021  2022  2023  2024  2025  <2026
Navigate by Thread:
Prev: BO which should switch to 1 whenever processed Majer Karel via Tech-talk
Next: Re: BO which should switch to 1 whenever processed Ralph Lange 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  2021  2022  2023  2024  2025  <2026
ANJ, 29 Apr 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·