Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
Hi everyone,
I'm doing a small programm with a wago which is able to send sms. I'm browsing an array which contains alarm message and alarm status, but the problem is due to the delay of the sending (between 2 and 5 secondes), it's possible that my loop has been increased by one or two so I've an offset between the sent sms
So my question is: is there a way to force the programm to wait untill the sms is sent?
Many thanks in advance for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When programming PLCs you are in front of deterministic and realtime systems, this means that you can't pause or loop infinitely till an event happens,
But, you can do this like:
sms :=0;CASEstateof1: sendthecurrentsms.
Β Β state :=state+1;2: if(smsissent)
Β Β then
Β Β Β sms:=sms+1;
Β Β Β state :=1;
Β Β end_if
That will allow you to wait the needed amount of time without locking the task as any PLC task will automatically start from the beginning again once it has finished.
PS: If you are interested on knowing the flags or so that can be used to know if the sms has been sent... then you should give us more information about the instructions you are using...
Hope this helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
I'm doing a small programm with a wago which is able to send sms. I'm browsing an array which contains alarm message and alarm status, but the problem is due to the delay of the sending (between 2 and 5 secondes), it's possible that my loop has been increased by one or two so I've an offset between the sent sms
So my question is: is there a way to force the programm to wait untill the sms is sent?
Many thanks in advance for your help
When programming PLCs you are in front of deterministic and realtime systems, this means that you can't pause or loop infinitely till an event happens,
But, you can do this like:
That will allow you to wait the needed amount of time without locking the task as any PLC task will automatically start from the beginning again once it has finished.
PS: If you are interested on knowing the flags or so that can be used to know if the sms has been sent... then you should give us more information about the instructions you are using...
Hope this helps.