Hi Andrew
Am 05.03.20 um 19:58 schrieb Johnson, Andrew N.:
What we want to do here is write a string to an input link field once
at init time. Link fields can be written to only via CA, which is why
we have to use a CA link.
Do you have to wait until after iocInit to set the value of that
input link field? If you could do it beforehand you could load a
separate .db file that just sets the link field of that record. You
can also use the IOC’s ‘dbpf’ command to write to a link field in
your startup script, and the length of that string isn’t limited to
40 characters any more.
The only reason for the chosen design was to make the database more
modular. We have multiple instances of a template where each instance
corresponds to one device. It is not a priori clear how many will be
needed and perhaps even what the device names will be. But we also want
to calculate a summary status value for all devices together. The idea
was to let the device templates re-write the input links of the summary
calculation. In this way the summary status calculation does not need to
know how the devices are named and how many there are (up to a limit of
course).
Christoph’s original example doesn’t show him writing to a link
field, and I’m still a little confused exactly what you’re trying to
do.
I hope I made that clearer now.
Given the actual complexity of what you’re trying to do (as
against the apparent simplicity that you’re wanting) I suspect using
a sequence program might be simpler, but more detail of the actual
problem might allow us to find a simpler solution.
Link re-writing may be a complex thing when viewed from the inside of
what has to happen on the IOC to make it possible. From a user
perspective, i.e. one who makes databases, it is not complex at all, at
least not until you wonder about the limitations and things not working
as you expect, and then listen to the explanations from the experts...
This is not a matter of not being able to achieve some desired effect.
It is more about how to do that in an elegant and modular way. Christoph
had this idea and I said "fine, why not, let's try that", which is how
we stumbled over the PINI/CA link problem.
Cheers
Ben