DocsArrow - Elements Webflow Library - BRIX Templates
RS232

RS232

RS232 CM4 Industrial has a serial port with standard RS232. The wiring diagram of RS232 serial port is as follows:

RS-232 PINOUT WIRING DIAGRAM

RS-232 TERMINAL

RS-232 for C#

Install ParallaxControlSystemLibrary nuget package.

See below console application example:

Run the application from console, or trigger it from the web page dashboard. In this example we are using a loopback test to receive the response (wire the Tx pin to the Rx pin).

pi@cm4-d83add8da9b7:~ $ ./ConsoleApp12
Hello, World!
/dev/ttyAMA5 registered!
val: testing
Program started.
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /home/pi

RS-232 for Node-RED

Install node-red-node-serialport package from within the Node-RED dashboard (hamburger menu -> manage pallet)

In this example we are using a loopback test to receive the response (wire the Tx pin to the Rx pin).

Configure the ports according to the following port maps:

"RS485-1"=/dev/ttyAMA4
"RS485-2"=/dev/ttyAMA3
"RS232-1"=/dev/ttyAMA5