SERIAL_BAUDRATE

SERIAL_BAUDRATE N,R

DEFINES THE SPEED (IN BAUDS) FOR THE SERIAL LINK NUMBER N

  • Type: Command
  • Parameters: 2
  • Group: Input-Output

ACTION

The command SERIAL_BAUDRATE N,R defines the speed R in Bauds for the serial link number N.

R must be one of the following values : 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 56000, 57600, 115200.

The commands SERIAL_BAUDRATE, SERIAL_STOPBITS, SERIAL_DATABITS, SERIAL_PARITY configurate a serial link before using.

SYNTAX: SERIAL_BAUDRATE N,R

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • R = rate (integer or real).

USE

  • The command SERIAL_BAUDRATE is used to define the speed of a serial link.

ERROR

  • If number N is not a correct expression.
  • If number N is greater than 10.
  • If number N is less than 0.
  • If system object number N does not exist.
  • If system object number N is not of the type : SERIAL.
  • If value R is not a correct expression
  • If the value R is not one of the following value : 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 56000, 57600, 115200

EXAMPLE

label received

rem create object for serial link

serial 1

rem configuration of serial link

serial_port 1,3

serial_baudrate 1,1200

serial_databits 1,8

serial_stopbits 1,1

serial_parity 1,0

serial_open 1

rem if data received

on_receive 2,received

rem transmission

serial_write 1,"A"

end

received:

print serial_read$(1)

return

SEE ALSO

SERIAL

SERIAL_PORT

SERIAL_STOPBITS

SERIAL_DATABITS

SERIAL_PARITY

SERIAL_OPEN

SERIAL_CLOSE

SERIAL_WRITE

ON_RECEIVE

SERIAL_PORT_EXISTS()

SERIAL_READ$()