Author Topic: SETBAUD command  (Read 10621 times)

Allan

  • Guest
SETBAUD command
« on: June 20, 2002, 11:43:08 AM »
Hi

The TBasic reference manual (Part 2)  page 4-17 gives an example on how to change the baud rate on Comm 3 to 9600 as:

BAUDRATE 3,3

To change to another baud rate we are referred to the PLC User manual to find the  baud_nos that represents other baud rates

Looking at User's Manual p1-16 the baud_no is presented in 4 bit binary form rather than decimal.  Do I simply just convert to decimal.  For example if I wanted to set Comm 3 baud rate to 19200 the would the command be:

BAUDRATE 3,4  ?

Allan  :-/
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: SETBAUD command
« Reply #1 on: June 21, 2002, 09:02:48 AM »
That's right. SETBAUD 3,4 will change the baud rate to 19,200. The upper 4 bits are used for determining the comm format such as number of  data bits, number of stop bits,  and use of parity.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS