|
If I do this
grecord(ai, "AI_REAL")
{
field(DTYP, "ADS")
field(INP, "@MAIN.VAR_REAL")
field(SCAN, "1 second")
field(OUT, "AO_REAL NPP")
}
grecord(ao, "AO_REAL")
{
field(DTYP, "ADS")
field(OUT, "@MAIN.VAR_REAL")
field(FLNK, "AI_REAL")
}
then the AO_REAL record value does not seem to reflect changes to the MAIN.VAR_REAL variable made through the PLC interface.
Hi Andrew,
Would it be something like
grecord(ai, "AI_REAL")
{
field(DTYP, "ADS")
field(INP, "@MAIN.VAR_REAL")
field(SCAN, ".1 second")
field(FLNK, "AO_REAL NPP")
}
grecord(ao, "AO_REAL")
{
field(DTYP, "ADS")
field(OUT, "@MAIN.VAR_REAL")
}
When I do this and write to the MAIN.VAR_REAL variable through the TwinCAT PLC interface (not channel access), the value does not take (it changes briefly and then goes back to what it was before).
Thank you,
Patrick
Hi Patrick,
One thing nobody else has mentioned yet is that we do have a couple of example databases in our
Common Database Patterns documentwhich might be a solution for you’re looking for.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
Hello,
I'm attempting to write device support to handle the scenario where changes to the value of a hardware device can be made from both EPICS and another source. I would like the value of the hardware to be changed if I write a value to the record through channel
access, and also to continuously monitor the hardware device for changes made from the other source and update the value of the record to match. One approach I have considered is to use separate output and input records, where the output records write values
set from channel access to the hardware and the input records periodically scan the hardware and update their values accordingly. I am wondering however if there is a way to do this with the val field of just an output record. Is there any way to synchronize
things so that write requests coming from channel access are always written to the hardware and not overridden by periodic updates from reading the hardware?
Thank you,
Patrick
|