Internet PLC Forum
General => Technical support => Topic started by: Tito on August 09, 2012, 06:57:19 AM
-
Hi I am trying to open serial port by using basic coding. I am quite new for basic coding. Please do assist me. Hardware FMD88-10
-
In TBASIC there is no need to open the serial port since it is dedicated and it is always open.
So you simply use the PRINT #n or outcomm n, x to send ASCII or binary data out of the serial port n and use INPUT$(n) or INCOMM(n) to read ASCII string or binary data from serial port #n.
-
Hi, In my serial, i am connecting GSM modem. My GSM modem setting is the Baud rate is 115200, Databits 8, Parity None, Stop Bits 1.
How I can set this to my port before send Commands
-
Check the SETBAUD command.
To change baud rate to 115,200, 8, n, 1
SETBAUD 1,9
-
Hi, After go through in User Manual, I did set as :-
SETBAUD 1,&H9,
is that make different with SETBAUD 1,9
Please do advice.
Do i have to do anything with Dip switches? I am using FMD88-10 board.
-
&H9 is the hexadecimal representation which is the same as decimal 9.
You don't have to do anything else. You need to run the SETBAUD 1,9 once only in order to change the serial port #1 to the desired baud rate. After that you can use PRINT # command and Input$() command at the new baud rate until power is reset to the PLC.
-
:) Thank you.