2410_LSS100100/LSS100200_SW_03.0

Configuration Commands

  • Open connection:

    require('serial')
    port = serial.open('/dev/RS232', {baudrate = 9600})

  • Write to Port:

    port:write('test data')

  • Blocking Read:
    -- Script will block until 10 characters are read

    data = port:read(10)

  • Timeout Read

    -- Script will wait for 10 characters for 20 seconds

    data = port:read(10, 20)

  • Close serial port

    port:close()

RS-485 serial line

Controlled similarly using the same configuration commands. The only difference lies in the serial.open command:

port = serial.open(‘/dev/RS485’, {baudrate = 9600})

For more detailed information about RS-232 communication, please refer to the respective application note available at www.se.com Application Notes).

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?