Send SMS from PLC-5

T

Thread Starter

Tiko

Is there any solution to send SMS from PLC-5 through RS232 to communicate with GSM modem?
 
K
Hi, I have not used a PLC5 for a long time, but sending at text is relatively simple. All you need to do is send a series of ASCII commands (using the AT command set of the modem).

Typically;
'Setup com port parameters
com port settings 19200,N,8,1

'Init
ATE0 <cr>

'Set Text Mode
AT+CMGF=1 <cr>

'Set Number
AT+CMGS="01234567890" <cr>

'Send Message
Message & Chr(26) 'ctrl Z

You should of course check for the correct response after each command i.e. 'OK'. I would connect the modem to a PC first and use something like hyper terminal to test the commands. I assume the PLC com ports can be configured the same way as an SLC where the serial DF1 port can used as plain ASCII port.

Regards Kevin
 
Top