RS232 and RS485 SERIAL ADAPTERS FOR RIO

I received the cable I ordered, it is a DTECH DT-5119 (The model # is on the package, but not on the device). It supports 4-wire RS-422 and 2-wire RS-485 capability. I’m only testing RS-485. Comes with a DSUB-9 to terminal block break out which is nice. Got it for under $17, so definitely on the cheap side.

https://www.amazon.com/gp/product/B076WVFXN8/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1

Unfortunately, I could not test it in my RIO because the USB port is plugged up with conformal coating or some other gooey substance. I was able to remove some of it, but I think the contact pins are coated :frowning: So this RIO needs to go back for some repair. It’s an early model with the thermocouple issue, so I guess it is time to get that taken care of.

I plugged it into my PR1 and it recognized it without issue. I was able to setup a Node-RED flow to proxy between a TCP connection and the serial port, opened the firewall for that port and ran some modbus tests to some Modbus RTU connected WattNodes and it all worked fine.

Since it works in the PR1, I’m going to assume it will work in the RIO. So an adapter and a simple Node-RED flow we should be able to use the RIO as a remote serial device from a PR1, PAC or whatever else. Time will tell on how these work long term out in the middle of nowhere.

Here is the flow I am using (uses the node-red-node-serialport 0.11.1 module):

[{"id":"62e86c82.3896a4","type":"tab","label":"TCP to Serial Relay","disabled":false,"info":""},{"id":"638c889b.8b41d8","type":"tcp in","z":"62e86c82.3896a4","name":"","server":"server","host":"","port":"10502","datamode":"stream","datatype":"buffer","newline":"","topic":"","base64":false,"x":220,"y":340,"wires":[["87ffa453.5c6718","d5f0510e.a7e408"]]},{"id":"87ffa453.5c6718","type":"debug","z":"62e86c82.3896a4","name":"","active":false,"console":"false","complete":"false","x":485,"y":318,"wires":[]},{"id":"d5f0510e.a7e408","type":"serial out","z":"62e86c82.3896a4","name":"","serial":"fc2a26f0.857cd","x":438,"y":395,"wires":[]},{"id":"b9f4569a.a30468","type":"serial in","z":"62e86c82.3896a4","name":"","serial":"fc2a26f0.857cd","x":228,"y":449,"wires":[["6e9401f2.763de","23785617.c0fb2a"]]},{"id":"6e9401f2.763de","type":"tcp out","z":"62e86c82.3896a4","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"","x":460,"y":455,"wires":[]},{"id":"23785617.c0fb2a","type":"debug","z":"62e86c82.3896a4","name":"","active":false,"console":"false","complete":"false","x":477,"y":526,"wires":[]},{"id":"bd54e191.0b47b","type":"comment","z":"62e86c82.3896a4","name":"IP Serial Relay","info":"","x":180,"y":220,"wires":[]},{"id":"fc2a26f0.857cd","type":"serial-port","z":"","serialport":"/dev/ttySer0","serialbaud":"19200","databits":"8","parity":"none","stopbits":"1","waitfor":"","dtr":"none","rts":"none","cts":"none","dsr":"none","newline":"3","bin":"bin","out":"time","addchar":"","responsetimeout":""}]
2 Likes