Welcome to the EPICS world, Nicklas -
I'll assume that you *really* need the AO record, if you just want a .5 sec pulse all you need is the bo (record ZZ below).
You got the right idea about using the YY.HIGH field, but you'll need an intervening bo record to write the "one" (setting DOL=1 and OMSL=closed loop will set the bo to 1 every time it processes).
Try this :
record (ao, "XX") {
...
field(FLNK, "YY")
}
record (bo, "YY") {
...
field (DOL, "1")
field (OMSL, "closed_loop")
# field (HIGH, "0.5")
field (OUT, "ZZ.VAL PP NMS")
}
record (bo, "ZZ") {
...
field (HIGH, "0.5")
}
Ned
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
|