Hello,
I am using a FB in witch I want to wait for a reply. For example: a bit is set (e.g. M0.0 - request) and after 10 seconds (or sooner) if another bit is set (M0.1 - reply) then do an action, otherwise generate an error.
The problem: if I wait in a loop (made with a Timer) the execution of the program is frozen there, and inputs are not read (and for that reason I can't exit the loop). I think that an interrupt should be used but I don't know how.
Thanks!
PS: this sould be done in STL
I am using a FB in witch I want to wait for a reply. For example: a bit is set (e.g. M0.0 - request) and after 10 seconds (or sooner) if another bit is set (M0.1 - reply) then do an action, otherwise generate an error.
The problem: if I wait in a loop (made with a Timer) the execution of the program is frozen there, and inputs are not read (and for that reason I can't exit the loop). I think that an interrupt should be used but I don't know how.
Thanks!
PS: this sould be done in STL