Internet PLC Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
Internet PLC Forum
»
General
»
Technical support
»
auto 485
« previous
next »
Print
Pages: [
1
]
Author
Topic: auto 485 (Read 14512 times)
kizor
Newbie
Posts: 15
auto 485
«
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
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:auto 485
«
Reply #1 on:
January 11, 2009, 09:22:13 AM »
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.
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
kizor
Newbie
Posts: 15
Re:auto 485
«
Reply #2 on:
January 11, 2009, 11:55:59 AM »
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
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:auto 485
«
Reply #3 on:
January 11, 2009, 12:30:55 PM »
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.
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
kizor
Newbie
Posts: 15
Re:auto 485
«
Reply #4 on:
January 11, 2009, 02:20:09 PM »
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
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:auto 485
«
Reply #5 on:
January 12, 2009, 08:32:11 AM »
COMM1 of T100MD is DCE.
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
kizor
Newbie
Posts: 15
Re:auto 485
«
Reply #6 on:
January 12, 2009, 09:10:03 AM »
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
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:auto 485
«
Reply #7 on:
January 12, 2009, 10:03:32 AM »
It is the same as COMM1 of the PLC. i.e. DCE.
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
kizor
Newbie
Posts: 15
Re:auto 485
«
Reply #8 on:
January 13, 2009, 01:43:35 PM »
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
Logged
support
Global Moderator
Hero Member
Posts: 3174
Re:auto 485
«
Reply #9 on:
January 13, 2009, 02:45:48 PM »
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
Logged
Email: support@triplc.com
Tel: 1-877-TRI-PLCS
Print
Pages: [
1
]
« previous
next »
Internet PLC Forum
»
General
»
Technical support
»
auto 485