Jump to content

SMS messages stop working after a while


Recommended Posts

Hello Everyone,

I have a problem that I haven't been able to solve for a long time. I have a situation where I use a GSM Modem to send reports and alarms via text messages. Everything works without problems until the PLC sends some 20 SMS messages, after which the Status Modem Busy appears permanently. The only way to get it working again is to restart the PLC and Modem. When the PLC turns on, it sends all the messages that were "stuck", and continues to work normally until the number of 20 SMS messages is reached again. Attached is a PDF with ladder of SMS subroutine and picitures of modem configuration. If anyone has an idea why this is happening, I would be very grateful for help.

Best regards.

SMS subroutine.pdf

image.png.8ce8fabdb9517abd762b3fd1a36f3e9f.png            

 

image.png.4d6dd91a0846f453b063e8c6edb6ff32.png 

Link to comment
Share on other sites

  • MVP 2023

Modems can be cantankerous little critters.  When you reboot you're obviously re-setting the ports and whatever the modem is chewing on.  I have a field installed modem that locks up for no reason every couple of weeks and I finally put a relay in that uses a PLC output to cycle power on itself and the modem if it gets stuck for more than half an hour.

"But Joe, you shouldn't have to do that!  It should work!  You should find the problem!"  After beating on it for a couple of months with no logical explanation and the customer complaining that he had to get up in the night and drive to the remote site to manually reset the system I decided the most reliable thing was to put logic in that reset it for him.  Problem solved - stop the calls.

If you don't get a response on the forum in a day or two I'd send a request to support@unitronics.com.  Or put your own PLC - Hara-Kiri system in place.

Joe T.

Link to comment
Share on other sites

  • MVP 2023

I agree with Joe, I have similar power resets on particular sensors if they don't change at all after X minutes.

However, something that caught my eye is the possiblity that the call to your SMS subroutine is being stopped incorrectly.  Even just one  scan difference might mess things up.  What does MB469 do and how does it relate to everything?   If it only comes on to control a send, try delaying it turning off for a few seconds once everything is meant to be finished.  This is along the lines of me allowing buffer clearance times of a few scans in other areas of the plc.  The extra scans let things work properly, that don't work ok when a "I've finished doing all that" bit turns on/off and your program reacts immediately to that change.

cheers, Aus

Link to comment
Share on other sites

  • MVP 2023

Hi, is it possible that 20SMS is limited by mobile operator for this SIM card? Like spam filter - generally user do not get a lot of message from  one number.

Or sometimes only 20 (or more)  SMS is possible to send free of charge.... (in some operator this number of free SMS is possible for 24hour).

I that case (no money) my operator allow to push new message only after send payment to account  and modem restart.

 

 

 

 

Link to comment
Share on other sites

  • MVP 2023
17 hours ago, Ausman said:

However, something that caught my eye is the possiblity that the call to your SMS subroutine is being stopped incorrectly.  Even just one  scan difference might mess things up.  What does MB469 do and how does it relate to everything?   If it only comes on to control a send, try delaying it turning off for a few seconds once everything is meant to be finished.  This is along the lines of me allowing buffer clearance times of a few scans in other areas of the plc.  The extra scans let things work properly, that don't work ok when a "I've finished doing all that" bit turns on/off.

Always good advice from Ausman. I have another point to add - avoid conditional subroutine calls if at all possible! They are frequently a programmer's undoing. They leave coils hanging in limbo, and as Ausman is pointing out here, you may not end up completing the task.

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...