Jump to content

Sending SMS once


Recommended Posts

  • MVP 2021

The main problem in your program is not sending SMS. The main problem is alarm management.

When an error occurs, you use the error bit as a sign that sends the message.

In my opinion, the bit of a certain error should set (via transition) the bit of sending the appropriate SMS message which will be automatically reset after its transmission.

The main thing to understand - you should not operate with the alarm status.

You must use only the fact of its change - transition to set and transition to reset SMS send bit for manage messages.

That is, operating in this way you will receive as many messages as the number of times the error occurred.

You are now sending a message all the time when the error is active.

Link to comment
Share on other sites

  • MVP 2021

On this image i try to explane....

alarm.jpg.46c07a100bde47f36bc5022de5e7cf42.jpg

I do not know how you build alarms in your project.

On image -  if alarm source is active - "ALARM_1_ACTIVE" bit is enabled. If alarm source is disabled - ALARM_1_ACTIVE bit still enabled.

Only "RESET ALARMS" - disable "ALARM_1_ACTIVE" bit.

"ALARM_1_ACTIVE" bit Positive transition -|P|- set "Send SMS_bit".

"Send SMS_bit" is reset after SMS sended to user. Then SMS is sended once, next one is sended only if "ALARM_1_ACTIVE" bit is reset (by user) and set by alarm source.

 

P.S. Please note - this sample only for idea demonstration.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...