Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Request/Response #53

Closed
pillh opened this issue Dec 4, 2017 · 6 comments
Closed

Multiple Request/Response #53

pillh opened this issue Dec 4, 2017 · 6 comments

Comments

@pillh
Copy link

pillh commented Dec 4, 2017

Support for multiple requests (read/write) is missing. Implementing these would allow fast access to several variables.

@pbruenn
Copy link
Member

pbruenn commented Dec 5, 2017

Do you mean this #3 ?

@pillh
Copy link
Author

pillh commented Dec 5, 2017

It is close, but not right there. I need to get a set of variables from the PLC and I do have their names, but not their location. So at the moment I cyclically get the handle, read the variable and release the handle for each variable. That produces a lot of traffic.
You do have an example for getting several handles at once, but the functions supplied for reading/writing variables (AdsSyncReadReqEx/AdsSyncWriteReqEx) using the handle do not seem to support multiple variables. Or do I miss something?

@pbruenn
Copy link
Member

pbruenn commented Dec 5, 2017

Did you check ADS-DLL Sample17.zip?

Note: I am not an ADS expert, but as far as I can see our sample is not 100% correct. In my opinion it would read the float, two times, because the second:
pAdsSymbolEntry = (PAdsSymbolEntry)pInfoExFloat
should be
pAdsSymbolEntry = (PAdsSymbolEntry)pInfoExDword

@rhythmchicago
Copy link

rhythmchicago commented Dec 5, 2017 via email

@pillh
Copy link
Author

pillh commented Dec 5, 2017

I do know that there is room for optimization using the functionality already available. That was NOT the initial question.
The reason why i do not use notifications is that I already have bad experience with other protocols (some tags do not get sent anymore).
During commissioning the Location of the variables will Change a lot, thats why i initially intended to get the handles every single time.
At the Moment I'm thinking about reading the INFO (ADSIGRP_SYM_INFOBYNAMEEX 0xF009) and using the stored info for the grouped request.
The initial issue however was about the missing support of the LINUX ADS stack and it's interfaces for grouped variable access.
So far it is still missing, even the structure definition used in sample 17 (AdsSymbolEntry) is not available in the LINUX headers.
If a sample for a multiple variable access using the given Interfaces would be added, I'd be satisfied.
So far I'll just try to puzzle it out and add it myself.

@pbruenn
Copy link
Member

pbruenn commented Jan 12, 2023

struct AdsSymbolEntry was merged with commit 5c7c8d9

@pbruenn pbruenn closed this as completed Jan 12, 2023
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

No branches or pull requests

3 participants