Just sharing a SMS alarm sending project.
If you have suggestions for improvement, just let me know.
Is the project still available? I get a page not found error.
I made the project public on Gitlab. But it only makes it private. Gave up an moved it to Github.
Please try the new link
Tested the program on a PFC 750-8217 today. First, lots of problems with getting coverage. And when I finally got coverage, I only got a signal in the web interface in the pls. Not in the program. The program didn’t work very well
Fortunately, Wago Support in Norway is very good, so they helped me, and we found what I had done wrong. 750-8217 has a bibilotect to be used. And you should not use WagoAppSerial_sms, which I had used. But you must use the WagoSysModem.
Have tried adapting the code to that instead. Also sent myself a few text messages.
I had also tried using Application.alarm_test.aAlarm.xIO_input
linked directly on IO, but I couldn’t get that to work. So I created xInput variables that I put on all inputs and I also linked them to Application.alarm_test.aAlarm.xIO_input in the program.
But if you have more tips for improving the code, just let me know
Updated the github. https://github.com/espenbo/wago_sms_sending
I have discovered another problem.
When there are several alarms that go off at the same time, not all the SMSs are sent.
It is because I have no buffer in which the alarms are stored before they are sent. I’ll just send the alarm right away.
Does anyone have an example of how one should store the alarms in a buffer before sending them and also delete them from the buffer once they have been sent?
I guess you call a function from the “AlarmManager” to retrieve the Alarm ID?
At the same time, retrieve the alarm text and store it to an array of strings.
Then - in my case, I use a “SWITCH/CASE” (in ST) to sequence and loop through all objects of the array, remember to use a wait-timer to allow the modem to send the SMS before moving on to the next.
No, I haven’t used alarm manager before. But it’s certainly wise to check out to deal with alarms.
Ok, but same situation if you’re just reading bits - put them in an array and check this array regulary to send the SMS.