Hej again,
as others mentioned, the READBACK functionality should
be what you want.
And there are (more) existing drives to talk to a TwinCAT
system:
https://urldefense.us/v3/__https://github.com/epics-modules/twincat-ads/__;!!G_uCfscf7eWS!caVLbTl9ZEu0xagc8JuokU3hCqOx0HpDOSEb5MerchWocJ4rKHN1zpvKP2I7vXB4rs57HeCpWLCupl3GYPA$
That reminds me on my homework, which could give some
inspirataion:
<https://urldefense.us/v3/__https://github.com/epics-modules/twincat-ads/pull/21/commits/51b38f43962d97e30442d26b606db6624a783711__;!!G_uCfscf7eWS!caVLbTl9ZEu0xagc8JuokU3hCqOx0HpDOSEb5MerchWocJ4rKHN1zpvKP2I7vXB4rs57HeCpWLCuobcuM4M$ >
Please feel free to ask more questions.
/Torsten
On 2025-08-13 19:31, Thomas, Patrick wrote:
Hi Torsten,
This is device support for Beckhoff ADS, which is a communications
protocol for reading and writing from and to a TwinCAT PLC. So the other
source is anything else that changes the value of the variable in the
PLC. This would usually be a user setting it through the TwinCAT
interface, or the value being requested through EPICS but not
successfully being changed in the PLC.
Thank you,
Patrick
------------------------------------------------------------------------
*From:* Torsten Bögershausen <[email protected]>
*Sent:* Wednesday, August 13, 2025 2:31 AM
*To:* Thomas, Patrick <[email protected]>; [email protected] Talk
<[email protected]>
*Subject:* Re: synchronizing the value of a read/write record
Hej Patrick,
Before answering with a longer answer, I would like to understand
what "the other source" is.
Is it
a)
The same device,that you are controlling ?
May be a device that has a user interface on its own,
display, keyboard, touch screen ?
Or are the values changed throug a user program,
engineering tool, something in that style ?
b)
The new values come from a different device, and are
stored in a different record.
May be a controll-loop where device1 says that device2
(the one you are talking about) "please use this value"
Hope this questions are understandable.
On 2025-08-13 02:41, Thomas, Patrick via Tech-talk wrote:
> 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
>
- References:
- synchronizing the value of a read/write record Thomas, Patrick via Tech-talk
- Re: synchronizing the value of a read/write record Torsten Bögershausen via Tech-talk
- Re: synchronizing the value of a read/write record Thomas, Patrick via Tech-talk
- Navigate by Date:
- Prev:
RE: synchronizing the value of a read/write record Žiga Oven via Tech-talk
- Next:
Re: CS-Studio Phoebus Deployment-Only Version Blomley, Edmund (IBPT) 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:
RE: synchronizing the value of a read/write record Žiga Oven via Tech-talk
- Next:
Re: synchronizing the value of a read/write record 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
|