Replies: 1 comment
-
Here is one way to use as function called polling :
Please refer to the Snap7 Communications -> Snap7 CLient -> Async Data Transfer part https://snap7.sourceforge.net/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello if im not mistaken I suppose that as_db_read should be asynchronsou version of db_read function with the better thing that it returns the response code if we are actually able to connect to plc .. bcs as it is written on documentation teh function get_connected() sometimes returns true eventhough we lost connection to the plc.. so I would like to use as_db_read and if having returned code of 1 then try to reconnect .. so we actually try to access the datablock and check the connection by that ... yet the as_db_read is returing nothing for me or rather just zeros.. I created two same while loops one using as_db_read and second db_read and db read returns actual data I have in plc and as_db_read returns only 0
may I ask if im implementing the function not correctly or if its problem of the snap7? or any other solution how to check for established connection? im trying to build app which would run infinitelly .. but with the ability to reconnect automatically
this returns :
and async function
reutrns :
Thanks in advance and have a nice day:)
Beta Was this translation helpful? Give feedback.
All reactions