Jump to content

Recommended Posts

Posted

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 

  • MVP 2023
Posted

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.

  • MVP 2023
Posted

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

  • MVP 2023
Posted

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.

 

 

 

 

  • MVP 2023
Posted
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.