Closed klauer closed 3 years ago
Chose a 3rd solution: the PLC calculates attenuation on its own now. The status is easy to report back to PMPS by way of EtherCAT IO.
This solution makes providing the status out-of-scope to the calculator - a good thing. Closing.
Expected Behavior
The attenuator is expected to provide the following information to PMPS:
Current Behavior
No information is currently shared beyond EPICS.
Possible Solution
IOC -> PLC communication is typically done by way of
ads-ioc
(m-epics-twincat-ads
). A pytmclink
could bring values into the PLC, reflected as a function block instance (https://pcdshub.github.io/lcls-twincat-general/v2.4.2/LCLSGeneral_LCLSGeneral_source.html#fb-lrealfromepics).An alternative possibility would be using Zach's UDP-based communication protocol (currently intended for encoder positions, and currently only generated from PLC code) could be leveraged allowing more direct communication. This would have to be sent at regular intervals in place of a heartbeat.