Technical Forum

Communication / Networks

S7 1200 : Send/Receive SMS

Thread Starter: blackstarsoul   Started: 5/29/2012 7:59 AM   Replies: 9

« Previous thread Next thread »
Page 1 of 1 (10 items)
  5/29/2012, 7:59 AM
Joined 3/2/2012
Last visit: 5/23/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello,

I need to know how to send/receive messages from mobile to S7 1200 and vice-versa.
Till now I am able to send messages from S7 1200 to mobile but unable to receive messages from mobile to S7 1200.cry

Software :
TIA Portal SP2 Update Professional V11
Blocks Used:
TC_CON
TC_DISCON
TC_SEND
TC_RECV

Hardware :
S7 1200 - CPU 1214 DC/DC/DC fw V2.1
CP 1242 - 7 fw V1.0

If anybody have any kind of knowledge about this, please help !!!!!!

Regards,
blackstarsoul



=== Edited by blackstarsoul @ 5/29/2012 8:02 AM [GMT ] ===


Top
  5/29/2012, 11:12 PM
Joined 3/1/2012
Last visit: 4/12/2013
Posts: 33
Rating:
Rated: Excellent [4.33 out of 5 / rated 6 time(s)]. (6) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Some things you'll want to check:
  • authorized numbers in device config -> just insert * to accept all
  • Parameter Phonenumber on TCON -> leave it empty to receive from all numbers
  • Next look at the Status of both TCON and TRECV (Move it somewhere else with the ERROR bit)

Does CON succeed?

Is RECV going to BUSY?

 

Top
  5/30/2012, 10:29 AM
Joined 3/2/2012
Last visit: 5/23/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello sprawl,
Thank you for reply..

What you have mentioned, we have done that before.
Yes.. TC_CON is working.. but at the time of sending( PLC to Mobile) only..
In TC_RECV block, Busy just toggles.
Do we need any specific format of text-body to receive messages from mobile to PLC?

I have attached snapshots of program. Please take a look at it and tell me if there are any errors
Do you have any sample program?
If you have it, then Can you send me the program?

Attachment: SMS snapshots.pdf  (141 Downloads)

Top
  5/30/2012, 6:22 PM
Joined 3/1/2012
Last visit: 4/12/2013
Posts: 33
Rating:
Rated: Excellent [4.33 out of 5 / rated 6 time(s)]. (6) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
The logic i can see works like:

CON - SEND -DISCON

For sending messages thats fine. For receiving it can't work.

I'd say you set up a second CON with a different ID and give it an empty number (what's +91 supposed to do anyway?)

Make a REQ on CON and wait for DONE.
Then - on the same ID - you call a TC_Recv.

Recv will switch to BUSY and stay BUSY. Only after a message was received it will drop.

This is the only way it works. When the Recv FB is not BUSY while the message arrives - its gone.
No way to get it back.

Top
  6/9/2012, 9:01 AM
Joined 3/2/2012
Last visit: 5/23/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello sprawl,

Few days ago, my program was working with sending and receiving. But then it stopped working. I checked your post to this thread. --> S7-1200 , CP1242-7 , receive SMS without TELESERVIS

You mentioned that an empty sms might cause CP not to receive any messages. Do you think that can be the issue with our case?

The problem is, messages get received in SIM card but are not displayed on Receive DB. I checked all those messages when I inserted my SIM card in mobile. All messages were there.

There were another problems.
1) When i was able to receive messages, the first two characters of sms were always getting clipped.
2) At the time of sending, PLC adds one special character before each message.

Please help me with this.

Best Regards,
blackstarsoul

P.S. I have attached my program with this post. Plz tell me if there is any problem with code.

Attachment: SMS.zip  (97 Downloads)

Top
  6/9/2012, 9:50 AM
Joined 3/1/2012
Last visit: 4/12/2013
Posts: 33
Rating:
Rated: Excellent [4.33 out of 5 / rated 6 time(s)]. (6) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
blackstarsoul schrieb:

Do you think that can be the issue with our case?


Well at least it looks like it.
The only way to find out is to update the firmware.

blackstarsoul schrieb:

1) When i was able to receive messages, the first two characters of sms were always getting clipped.
2) At the time of sending, PLC adds one special character before each message.


Both are about the way stings are handled within the PLC.
The first two bytes hold length information (maximum and current).
So you end up using the length as a char or writing chars into the length.

Shift your data input in SEND/RECV by two bytes right and you're fine.

Greetings.
Top
  6/10/2012, 8:21 PM
Joined 3/2/2012
Last visit: 5/23/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hi Sprawl,

Sprawl wrote:
blackstarsoul schrieb:

Do you think that can be the issue with our case?


Well at least it looks like it.
The only way to find out is to update the firmware.



You said to look for firmware. I got the firmware v1.2. But I am trying to search Hardware support package for CP1242-7 v1.2 to use it in TIA Portal V11.0 Professional. Can you tell me where to find it? Do you have any weblink?

Regards,
blackstarsoul



=== Edited by blackstarsoul @ 6/10/2012 8:22 PM [GMT ] ===


Top
  6/26/2012, 3:56 PM
Joined 3/28/2012
Last visit: 1/22/2013
Posts: 6
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello!
Can someone tell me how can I activate TC_SEND, TC_CON and TC_DISCON data blocks?Rnf:lblSmileyTooltip_  think They are locked.
I have Simatic Step7 Professional SP2 with HSP for CP1242-7.

Thanks in advance!
Top
  7/6/2012, 6:48 AM
Joined 11/10/2009
Last visit: 12/5/2012
Posts: 1
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello blackstarsoul,
you able to receive SMS with the CP1242-7? that you had problems? is that I have your same problem and I can not resolve

thanks,
Rnf:lblSmileyTooltip_  think
Top
  7/23/2012, 1:51 PM
Joined 3/2/2012
Last visit: 5/23/2013
Posts: 5
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello rank,

Yes... I was able to receive and send sms from PLC to Mobile and vice-versa.
The main problem is (I think), if you send any blank message to CP, it stops showing messages in TIA portal... because when I checked my SIM card (after removing it from CP), all messages were there.Rnf:lblSmileyTooltip_
Expert says that we need to upgrade the CP to new version by installing HSP. but we were in hurry.. so we used another CP module..

Regards,
blackstarsoul
Top
Page 1 of 1 (10 items)
Actions