223
18. Communication with RS232/RS485 serial ports
The following are the naming of Serial ports for different versions of Logic Machine.
Note! LM5 series devices have 1 definitive serial port RS-485 and other one can work either as
RS-485 or RS-232. The one will work which is most recently opened.
If the following command is used, you activate RS-485 second port:
port = serial.open('/dev/RS485-2', { baudrate = 115200, parity = 'even', duplex = 'ha
lf' })
If the following command is used, you activate RS-232 port:
port = serial.open('/dev/RS232', { baudrate = 9600, parity = 'even', duplex = 'full'
})