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,075
Hey all, first time poster here. I am wondering if anyone has tried using a Keyence SR-X300 barcode scanner to a Micrologix 1400. Keyence sent...
Replies
0
Views
32
Hi Siemens guys! I am experiencing SF fault on our S7-300 (6ES7 315-2AH14-0AB0) CPU from time to time. I've checked the diagnostic buffer and...
Replies
13
Views
174
Have a system that has been running for over a year and all of a sudden getting a ExcessiveVelocityFault on one of the drives when the MSO command...
Replies
2
Views
144
Hello PLCS.Net Forum, First time posting. Let's assume I am a novice. BASIC PROBLEM: My servo/linear piston is no longer zeroed to the...
Replies
9
Views
218
Back
Top Bottom