Sending SMS messages with Siemens S7-200

jp_diogo

Member
Join Date
May 2002
Posts
5
I'm trying to send an SMS message using a S7-200 PLC (whenever an input is activated) in his freeport mode connected to an analog modem. I already have some tips about how to do it from the site of LME Engineer entreprise. However, I don't seem do get things work out. If some one can give me a tip about this subject I would be very pleased. Thanks for the attention.

JP
 
Hi JP

"However, I don't seem do get things work out."

What are you trying to do and what doesn't work?

Is the problem/question related to:
- PLC code/hardware?
- Modem handling?
- SMS protocol?
- or all topics??

Look at this old thread if it can give you any tip: http://www.plcs.net/dcforum/DCForumID1/2573.html and come back with new questions.

Regards
Karl Egil
 
Hi Karl:

OK, let's get more specifical:

PLC Code:

At first, I were using a LME's software called EMS in his trial version, that creates the PLC Code necessary for this application (you can check the attachment).
This software demands some informations regarding the type of line one's using, the GSM provider and his SMSC nunber as well as the protocol to be used.

I'm using a direct line with a fixed line modem (Boca). The GSM provider is P TMN (Portuguese) and as I was informed it uses the UCP Protocol whatever that means.

Modem:

As I already mentioned I'm using an analog modem 56k Boca Research. As the PC/PPI cable doesn't monitor the CTS and DTR signal and only monitors the RTS in DTE mode I configured it, from the Hyperterminal with the follow initialization string: AT&F0&K0X0&D0&Q6.

The connection between PLC and the modem is made by the PC/PPI cable and a null modem connector 9-25 pins.

So, by know you should figure that my question is mostly about everything.

What am I doing incorrectly?

Is it from the PLC code? Is it from the GSM provider? is it from the PLC-modem connection? Is it from the modem configuration?

How does that UCP thing works?

If you can give me a hand, please do so.

Thanks a lot!!

JP
 
Hi Karl:

OK, let's get more specifical:

PLC Code:

At first, I were using a LME's software called EMS in his trial version, that creates the PLC Code necessary for this application (you can check it on www.lme.de)
This software demands some informations regarding the type of line one's using, the GSM provider and his SMSC nunber as well as the protocol to be used.

I'm using a direct line with a fixed line modem (Boca). The GSM provider is P TMN (Portuguese) and as I was informed it uses the UCP Protocol whatever that means.

Modem:

As I already mentioned I'm using an analog modem 56k Boca Research. As the PC/PPI cable doesn't monitor the CTS and DTR signal and only monitors the RTS in DTE mode I configured it, from the Hyperterminal with the follow initialization string: AT&F0&K0X0&D0&Q6.

The connection between PLC and the modem is made by the PC/PPI cable and a null modem connector 9-25 pins.

So, by know you should figure that my question is mostly about everything.

What am I doing incorrectly?

Is it from the PLC code? Is it from the GSM provider? is it from the PLC-modem connection? Is it from the modem configuration?

How does that UCP thing works?

If you can give me a hand, please do so.

Thanks a lot!!

JP
 
JP

First, I dont know the Boca Research modem and my practice with Siemens S7-200 is also limited.

So I am going to assume that:

- The PLC code/setup is OK

- PC/PPI + Nullmodem-cable is DTE-DCE (That is, if you dont use the nullmodem cable, you can connect the PC to the PLC with the PC/PPI)

- the init string AT&F0 .... etc is valid for the Boca modem. (I am missing a save command like &W or &W0. If not the commands are gone after the next power up)

- The SMSC number is a fixed phone number and not the same number you use from a cell phone


So, if the input goes high do the modem make a call? (you should hear the sound)

Is there leds on the modem? Like RD/RX, SD/TX or CD? Do the RD or SD led blink? (communication with PLC)

If the modem makes a call, does it get a answer? (your hear the sound and the CD lamp should light.)

The first goal should be to make the modem connect to SMSC. Have you reached this point?


"How does that UCP thing works?"

You send a telegram to SMSC and the GSM provider forward the message to the GSM phone.

The telegram has to be in a given format like this: "<stx>01/xxxxx/O/30/ phone-no. ///1////// message-coded /Checksum<etx>"
 
I am logged in, I see my logged in name and still I got anonymous......
There must be a filter somewhere... My be at FBI?
 
Thanks Karl:

You've pointed me the right question!! The thing is I didn't get yet to the point of making my modem connect to SMSC.

Can I try to do it over the Hyperterminal? How to do this?

how do I send "The telegram has to be in a given format like this: "01/xxxxx/O/30/ phone-no. ///1////// message-coded /Checksum""?


Thanks for the help.

JP
 
Hi JP

"Can I try to do it over the Hyperterminal? How to do this? how do I send "The telegram has to be in (.....)"

You can use hyper to try to connect to SMSC. Test if you can connect with your modem. Use 8N1.


But to use hyper to send a telegram in UCP format is not easy..

There is several operations available. Here is 3 examples:

Command 01: Call input operation
Command 02: Multiple address call input operation
Command 30: SMS message transfer operation

etc.

I have used command 01 and 30 in my PLC code.

Command 30 example :{STX}01/xxxxx/O/30/ phone-no. ///1////// message-coded /Checksum{ETX}

Short explanation:

{STX} = 02 Hex
01 = TRN Transfernumber 01-99
xxxxx = LEN Telegram lenght
O = 51 hex Operation (R = Result)
30 = Operation type 30 SMS message transfer operation
message-coded: Send each hex value of a char as a ASCII char. F.eks: "T" = 54hex -> Send "5" "4"
Checksum = Byte add. If checksum result= 3A hex then send "3" (33 hex) and "A" (41 hex)
Between the "/" there is other parameters if needed or wanted. You can identify yourself, ask for receipt, give the number to where the receipt should go (phone, modem or fax etc) etc, etc

There is some handy-work to make a PLC code out of this! In addition the PLC must handle the modem, make a call, send the message after connection, receive respons and hang up.


If you are going to test SMS and the SMSC without the PLC, use PC software like this instead:

http://www.freedownloadscenter.com/Network_and_Internet/Misc__Communications_Tools/FreeSMS_.html

http://www.freedownloadscenter.com/Network_and_Internet/Misc__Communications_Tools/Text2GSM.html

http://www.freedownloadscenter.com/Network_and_Internet/Misc__Communications_Tools/index5.html


You didn't answer my questions. How far have you reached?

- PC/PPI + Nullmodem-cable is DTE-DCE? If you don't use the nullmodem cable, can you connect the PC to the PLC with the PC/PPI?

- the init string AT&F0 .... etc is valid for the Boca modem. You received OK from modem?

- The SMSC number is a fixed-phone number and not the same number you use from a cell phone?

- SMSC is analog 1200-9600 8N1? ( have seen default baud 1200,2400 or 9600). The PPI config match this?

- Do the modem try to make a call? (you should hear the sound)

- Is there leds on the modem? Like RD/RX, SD/TX or CD? Do the RD or SD led flash?? (communication with PLC)

- If the modem makes a call, does it get a answer? (your hear the sound and the CD lamp should light.)


If the RD/SD leds doesn't flash when the PLC program should transmit: You have to check the PLC program and/or the PLC-Modem connection. (The modem doesnt receive anything from the PLC)

If you are not sure if the PLC is sending anything, then connect it to the PC instead. (Hyperterminal or other terminal software) If you are not sure about if it is DTE-DTE or DTE-DCE connection, then try both with and without the nullmodem cable.


regards

Karl Egil
 
Hi Karl:

For the instant I've return to the zero point. I've tried to test the modem using the Text2GSM in the site you told me about. How ever it always gave me the answer that there was no dial tone. In the modem settings I've put the option "don't wait for signal call" but it didn't work.

Now answering to your questions, regarding the modem part:

- I don't know for sure if I'm using the right init. string. I've search in Boca site and the only valid information i've been able to get was in the FAQ part saying the init. string was AT&F&C1&D2&K3\N0%C0;

- I'm using the right SMSC that's for sure. 00351 962113000. Not that same that is for a cell phone;

- When I was testing with the PLC the modem wasn't making any call sound. However, now testing with the software you've adviced me it sounds three separeted long bips and then stops and the software gives me the information that there is no dial tone.


The modem is working properly, I'm using ot as I write you to establish the connection to internet.

Thanks you for everything,

JP
 

Similar Topics

Hello all. We have been asked to add a SMS reporting sistem when an error occurs. I found this example...
Replies
0
Views
1,896
I'm currently using Micrologix1400 to send alarm SMS messages via TC35. This Micrologix is a "central node" communicating with all the other nodes...
Replies
10
Views
9,762
Dear you hope to receive your help, I need to make sending and receiving SMS messages between a ( AL2-24MR -A) Mitsubishi controller and GSM modem...
Replies
0
Views
2,579
hello all of you ! i have problem in parametization of FB48 (sms sent) of libaray (teleservice lib) in step7 in service center number , it does...
Replies
0
Views
1,871
Hello! I use SIMATIC S7-1214C PLC. I am controlling with it a farm (lights and food lines). I bought already a GPRS modul CP1242-7. I want the...
Replies
4
Views
5,327
Back
Top Bottom