RS232 [message #1791448] |
Fri, 29 June 2018 10:25  |
Eclipse User |
|
|
|
Hi,
I would like to read some data from the TX/RX of the Raspberry Pi and I don't see the RS232 communication FB in the 4diac. Is this discontinued in the latest version?
Thanks,
|
|
|
|
|
Re: RS232 [message #1791622 is a reply to message #1791581] |
Tue, 03 July 2018 02:19  |
Eclipse User |
|
|
|
Hi,
The PARAMS data input is not only the name of the interface, but an array of strings like this:
raw[].ser[INTERFACE_NAME, BAUD_RATE, BYTE_SIZE, STOP_BITS, PARITY]
where:
INTERFACE_NAME: is the name of the file that will be use.
BAUD_RATE: Just a number according to the connection
BYTE_SIZE: Byte size of the connection
STOP_BITS: 1 for one bit, 2 for two bits, 3 for one comma five bits
PARITY: 0 for no parity, 1 for odd parity, 2 for even parity, 3 for mark parity (only windows), 4 for space parity (only windows)
So, an example could be:
raw[].ser[/dev/ttyS0, 115200, 8, 1, 1]
which will use the /dev/ttyS0 inteface, 115200 as baud rate, 8 bits byte, 1 stop bit and odd parity.
|
|
|
Powered by
FUDForum. Page generated in 0.04061 seconds