Internet PLC Forum
General => Technical support => Topic started by: kizor on January 11, 2009, 07:15:09 AM
-
Hi
For quite a time I used the plc comm#1 port to sent out sms messages trought a gsm modem.
The connection between the plc comm#1 and the gsm rs232 port is made by a cross over cable.
Now I will use comm#3 instead of comm#1 to send out sms
I rewrite the program so that the (sms command) is now send out to comm#3
I use a auto-485 converter branched with the rs232 port of the gsm modem but it seems not to work to sent out a sms.
Is there someone who knows what I did wrong or any other reason why it doesn't work.
Thanks in advance
Kizor
-
Are you using the same baud rate for COMM1 and COMM3? The default for both COMM1 and COMM3 are 38,400bps. Could it be that you have changed the baud rate of COM1 previously but you did not change the baud rate when you changed to COMM3?
You can connect the RS232 side of the Auto485 to a HyperTerminal and examine what is being sent out of the Auto485 to determine if there is any thing wrong with either the program or the Auto485 hardware. Compare this output with the program that send data out of COMM1 port and that should become clearer. If both are the same then there is no reason why the GSM modem is not accepting the data string.
-
Hi
Now I remember
I think I set dip switch SW1-4 during power-on to set the baud rate of comm#1 to 9600 bit-per-second
How can I set baud rate of comm#3 to
8,1,n 9600bit-per-second
Can I use setbaud 3,00000100 or must I use setbaud 3,?H03
What is the right sign just before H03 because the custom function doesn't recognice ?
Thanks in advance
Kizor
-
SETBAUD 3,3 will set it to 9600bps, 8 data bit, 1 stop bit.
To express a number in hexadecimal, you need to add a "&H" in front of the hex number.
E.g. SETBAUD 3, &H3
means hexadecimal 3, which of course is the same for 3.
-
Hi
One other question
The rs232 port become on the auto 485 converter is this
configured as DTE or as DCE
Thanks in advance
Kizor
-
COMM1 of T100MD is DCE.
-
Hi
Thanks for the quick reply's.
What I want know ,when I branche a auto-485 converter to comm3 , is the rs232 port on the converter configured as DCE or as DTE.
Thanks in advance
Kizor
-
It is the same as COMM1 of the PLC. i.e. DCE.
-
HI
Still not working
I have done a test with the auto 485 connecting to hyperterminal
Now I see that my command doesn't come right true when I trigger custom function
print #3 "at+cmgs=xxxxxx"+chr$(13)+"sms text"+chr$(26)
On hyperterminal I only see smstext(+sign for chr$(26))
Could't it be I must become a litle delay after chr$(13)
What is the best way to become this delay and if posible in the same custom function
Any other suggestion is even welcome
Thanks in advance
Kizor
-
Do you mean you did not see the following?
at+cmgs=xxxxxx"
Try to break them into two PRINT statements:
PRINT #3 "at+cmgs=xxxxxx"
PRINT #3 smstext;
OUTCOMM 3 ,26 ' send out the last "+" character