Commanding a 300-series PLC with a GSM-modem

Levanteri

Member
Join Date
Jan 2008
Location
Cluj-Napoca
Posts
18
Hi.
I have a CPU314IFM, CP340 RS-232 and GSM-module(EBG-350) built by Eindrich.
The idea is to control the PLC by sending SMS.
I´ve got the module and the PLC configured, cables built and so on. The only problem now is this:
When the module receives an SMS, the SMS only goes in to the memory of the SIM-card in the module and therefore can not be read by the CP340. I know the commands to read the messages from the module, but now I should command the PLC to read the message from the module and that´s the problem.

So I´d probably somehow modify the P_RCV and P_SEND blocks to cyclically read the data from the GSM-module, so that when a new message arrives, the block send a command to open it and then it´ll be available for reading?
 
Last edited:
Comandos AT de lectura de SMS

Hi Levanteri:

Concerning the incoming SMS, you can configurate a modem in 2 ways:
  • The modem sends an alert to the PLC when it receives a new SMS
  • The modem only stores it. In this case the PLC must ask to it about new messages, cyclically.
The first way has a disadvantage: it is asynchronous, so is not easy to command from the PLC communicaction viewpoint.

The second way is easier: the PLC asks and the modem answers. At the beginning you should set the modem with the commands
at+cmgf=1
at+cnmi=0,0,0,0​
And then you must look in the first SMS box cyclically.
at+cmgr=1
If there is a new SMS you will receive a txt, with "...REC UNREAD... date, origin, etc... and the TEXT"
It's important analize it and just later delete it:
at+cmgd=1
In this way the next SMS will be store again in the first box.

Good luck!

Lorenzo Rivas
www.nubitek.com
GSM/GPRS Solutions for SIMATIC

PD: Levanteri, te he dejado un mensaje privado en este foro, si te interesa ponte en contacto conmigo. Saludos.
 
Thanks for your advice.
I got the thing going on, but encountered some problems;

1.When sending a command like "at+cpin?" to the GSM-module from PLC, it only reflects the command back, so that the receiving
db shows the command sent to the module, but no the desired thing,in this case the pin-code state.

2. Sending commands from the PLC works to any device now, I can receive the message from the PLC, but sending commands TO PLC and receiving there doesn't work properly.

When sending a message like "perkele" to the PLC from Hyper Terminal, only the first receiving bit receives information,
so that the whole word "perkele" is shown charcater by character in the first receiving bit.
Why is this happening?

I'll link a couple of pictures to show what I mean:

http://www.flickr.com/photo_zoom.gne?id=2232115931&size=l
http://www.flickr.com/photo_zoom.gne?id=2232116057&size=l
http://www.flickr.com/photo_zoom.gne?id=2232905764&size=l
 

Similar Topics

We have 6 lexium servo drives that are being controlled from a schneider m340 via canopen baud rate is 1mb. The drives take a commanded position...
Replies
1
Views
2,085
in allen bradley kinetix 300 drive first E31 error shows after resting drive E11 error occurs need solution to reset E11 fault code
Replies
4
Views
157
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
130
So basically i have 2 queries : 1. I have a program file of S7-300 PLC which i want to migrate in RSLogix500.In short i want to convert my simatic...
Replies
15
Views
297
Hi i using Kinetik 300 2097 driver control by EIP with using move absolute and incremental for motion , but i want to add same driver and motor as...
Replies
0
Views
79
Back
Top Bottom