What is the auto-update rate of symbols #416
-
Hi everyone! I'm reading out 10 symbols in a loop with 10Hz using I just read that it would be enough to use |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
The default settings for auto update=True will update the value if it changes on any plc cycle, therefore there is no need to update the rate, it will be as fast as your plc cycle. If you wish to receive notifications cyclically at a set rate you have to attach the notification manually and can set the notification period in ms and the notification attribute to server cycle. https://pyads.readthedocs.io/en/latest/documentation/symbols.html#device-notifications Can I please ask in the future that all questions are directed to Stack overflow using the tags PLC, Twincat and Twincat-ads. There is a small community there that will answer your questions. This is to just keep the Issues log as pyads issues. Thank you. If you could kindly close this issue that would be great, thanks. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the fast reply, I was not aware of the community but will post there in the future. |
Beta Was this translation helpful? Give feedback.
-
Just an additional thought, I don't know your application, but if it is logging based or if you do want to go faster poll time, I often find it is easier to create a cyclic array in the PLC which you populate with values and then do a read by list or read by structure to read all in one go. If you keep track of the read index then you can get a more predictable and time correct value set. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that idea, I will keep that in mind. For now reading them in roughly at PLC cycle is enough for my means but I will come back to it if the amount of read requests increase in the future. |
Beta Was this translation helpful? Give feedback.
The default settings for auto update=True will update the value if it changes on any plc cycle, therefore there is no need to update the rate, it will be as fast as your plc cycle.
If you wish to receive notifications cyclically at a set rate you have to attach the notification manually and can set the notification period in ms and the notification attribute to server cycle.
https://pyads.readthedocs.io/en/latest/documentation/symbols.html#device-notifications
https://pyads.readthedocs.io/en/latest/documentation/connection.html#device-notifications
Can I please ask in the future that all questions are directed to Stack overflow using the tags PLC, Twincat and Twincat-ads. There is a small…