Hardware description
18/136
3.3.3
RS-232 / RS-485 interface
The terminal block connector (see position
(4)
in section
page 15]) is a 16550 UART-compatible serial port that can be
used either as RS-232 or RS-485 (2-wire) interface.
Serial interface
Pin
RS-232 signal
RS-485 signal
1
RS232_TXD
RS485_NEG
2
RS232_RTS
RS485_POS
3
GND
GND
4
RS232_CTS
N.C.
5
RS232_RXD
N.C.
6
GND
GND
Table 5: Serial interface
The device is shipped with a matching COMBICON connector for easy
wiring:
Figure 7: COMBICON plug
Configuring the operating mode
The operating mode of the interface (
uart1
in Linux) can be configured in
the Linux terminal with the following commands:
Set remanently to RS-485:
sudo sh -c "echo 'mode=rs485' > /etc/default/uart1"
systemctl restart uart1-mode
Set remanently to RS-232:
sudo sh -c "echo 'mode=rs232' > /etc/default/uart1"
systemctl restart uart1-mode
Note:
In case the
/etc/default/uart1
file is missing, the UART is
configured to RS-485 mode by default.
Standard Linux device support
netFIELD OS supports the serial interface as standard Linux device
/dev/
ttymxc0
Note that the
uart1-mode
service must be enabled and running for this
(the
uart1-mode
service is enabled and running by default).
If you stop the
uart1-mode
service (e.g. with the
systemctl stop
uart1-mode
command), the
ttymxc0
interface will not be available any
longer.
netFIELD Compact X8M | User manual
DOC220302UM01EN | Revision 1 | English | 2022-05 | Released | Public
© Hilscher 2022