Skip to content

Add output readback#8

Merged
exzombie merged 4 commits intoCosylab:mainfrom
redpiramide:add-output-readback
Jun 4, 2024
Merged

Add output readback#8
exzombie merged 4 commits intoCosylab:mainfrom
redpiramide:add-output-readback

Conversation

@redpiramide
Copy link
Copy Markdown
Contributor

This PR will introduce the following changes:

  • Add a new Operation Operation::ReadWrite with RW in the asynUser text
  • Add all variables with Operation::ReadWrite to both lists ads_read_vars and ads_write_vars
  • Prevent readback caused by info(asyn:READBACK, "1") by allow to write only if ads is connected
  • On write, a flag and the written value is stored in ADSVariable. Until the written value is read back, the written value will be returned.
  • Update of the documentation and examples

The new Operation::ReadWrite should not interfere with existing configurations. I have successfully tested the readback with all scalar and array datatypes.

Closes #6

@exzombie exzombie self-assigned this Apr 25, 2024
@exzombie exzombie requested a review from jevarlec April 25, 2024 10:55
Copy link
Copy Markdown
Collaborator

@exzombie exzombie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally found some time to look at this. Thanks for posting it! I haven't tested it yet because I need to set up the PLC first. But at a glance, the PR looks nice. I always appreciate it when people take time to update the docs and examples together with the code 😄. There are two things that occurred to me while reading the code, addressed in separate comments.

@redpiramide redpiramide requested a review from exzombie May 31, 2024 08:49
@exzombie
Copy link
Copy Markdown
Collaborator

exzombie commented Jun 3, 2024

Looks good to me. Many thanks! Testing took a while because it exposed unrelated issues, some of them seem to be in asyn: it looks like mbboDirect records ignore asyn:READBACK. I will need to triage that further, but it doesn't prevent merging of your work.

I took the opportunity to make a small tweak and remove a bit of deprecated code. I will rebase and squash, hopefully tomorrow.

redpiramide and others added 4 commits June 4, 2024 13:20
The write variables marked for readback are added to the sum-read list.
This bug started to manifest after the asyn:READBACK changes.
@exzombie exzombie merged commit 8b77f18 into Cosylab:main Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Readback of output variables after iocInit

2 participants