libplctag / libplctag.NET

A .NET wrapper for libplctag.
https://libplctag.github.io/
Mozilla Public License 2.0
194 stars 50 forks source link

How to batch read multiple tags at once? #373

Closed 313843288 closed 1 month ago

313843288 commented 1 month ago

AB PLC,How to batch read multiple tags at once?

kyle-github commented 1 month ago

If the PLC supports it, the library does this automatically if it has multiple tags with outstanding requests. The simplest way to make sure that this happens is to create several tags and then trigger reads or writes on all of them without a wait time. This triggers the operation in the background. Once they are all triggered, then just wait on all of the tags.

kyle-github commented 1 month ago

I am not a C# programmer, but I think the code at the indicated section does the async read of multiple tags.

313843288 commented 1 month ago

thank you!