PLC Weidmuller UC20-WL2000-IoT connecting via RS-485

Hi there!

I have Weidmuller UC20-WL2000-IoT controller and some peripheral device which use RS-485 interface for trasmitting read data from prussure/temp sensors on the board.
Also I have UR20-1COM-232-485-422 module for connecting controller through RS-485.

I want realized programming on Nod-RED(web version). The controller must receive pressure and temperature data from sensors via the RS-485 interface. And also convert the received data into understandable values. From voltage signals to bar.

I tried to install the nodes I needed, but constantly errors. Updated the controller to update the version, because the separate node (web version) is not updated.

node-red-contrib-serialport-rs485 installation failed.

The same problem with node-red-node-serialport...
[install_serialport_rs485_error1.jpg - Google Drive]

[install_serialport_rs485_error_log.jpg - Google Drive]

[install_serialport_error1.jpg - Google Drive]

[install_serialport_error_log.jpg - Google Drive]

I can't realize what the problem is...
Sorry if it's seems simple but I'm a new in Node-RED programming.

Regards, Alex.

Does the device running node red have internet access?

Sure! I tried different wi-fi connections.

If you login to the device running node-red and run
ping registry.npmjs.org
does it work ok? If it does then try
wget https://registry.npmjs.org/node-red-node-serialport

How can I check that ping registry.npmjs.org does work?

I tried to install some another nodes or update nodes is use but I got same error.

I connected to two networks with Internet access, in one I tried wireless and wired connection, but the result is the same. Perhaps I need to fix some network settings? Only what?

Regards, Alex.

Run the command in a command window. If it works you will see the replies from the server.

Please look in attachment
ping

I can't open registry.npmjs.org on the browser

Please copy/paste text rather than screenshot wherever possible.
I am confused. You have run ping on your windows machine, but I thought node-red was running on the Weidmuller. Which device is node-red running on?
In an earlier screenshot you showed that the browser was connected to 192.168.10.202. Is that the Weidmuller? That is the device that needs internet access.

Yes you can, that is exactly what it should look like. But again, the browser is running on your PC. Is that the machine where node-red is installed?

Your truth! I have just connected Controller to internet.
I've got new log when I tried to install serialport:

You have not posted all the log so it is difficult to be sure what the problem is. Did you see my earlier suggestion?

However, I can see that you are using node.js 10.15.3. V10 went out of support long ago. The earliest version now supported it v16. You should upgrade to 16 or 18.

I have some problem with update my PLC. Weidmuller technical support will help to fix it... then I will try to update PLC to actual version because Node-red haven't possibilities to update independetly.

Regards, Aex.

Hello, Colin.

I have tried to install node-red-contrib-modbus but failed again

-----------------------------------------------------------
2023-05-05T13:05:10.985Z Install : node-red-contrib-modbus 5.26.0

2023-05-05T13:05:11.368Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-modbus@5.26.0
2023-05-05T13:05:50.099Z [out] 
2023-05-05T13:05:50.099Z [out] > @serialport/bindings-cpp@10.7.0 install /var/lib/node-red/node_modules/@serialport/bindings-cpp
2023-05-05T13:05:50.099Z [out] > node-gyp-build
2023-05-05T13:05:50.099Z [out] 
2023-05-05T13:06:21.413Z [out] make: Entering directory '/var/lib/node-red/node_modules/@serialport/bindings-cpp/build'
2023-05-05T13:06:21.425Z [out]   CXX(target) Release/obj.target/bindings/src/serialport.o
2023-05-05T13:06:21.512Z [err] make: g++: Command not found
2023-05-05T13:06:21.518Z [err] make: *** [bindings.target.mk:102: Release/obj.target/bindings/src/serialport.o] Error 127
2023-05-05T13:06:21.519Z [out] make: Leaving directory '/var/lib/node-red/node_modules/@serialport/bindings-cpp/build'
2023-05-05T13:06:21.528Z [err] gyp
2023-05-05T13:06:21.538Z [err]  ERR! build error 
2023-05-05T13:06:21.538Z [err] gyp ERR! stack Error: `make` failed with exit code: 2
2023-05-05T13:06:21.538Z [err] gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
2023-05-05T13:06:21.538Z [err] gyp ERR! stack
2023-05-05T13:06:21.548Z [err]      at ChildProcess.emit (events.js:189:13)
2023-05-05T13:06:21.548Z [err] gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
2023-05-05T13:06:21.548Z [err] gyp ERR! System Linux 4.9.155-yocto-standard-weidmueller.1
2023-05-05T13:06:21.548Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-05-05T13:06:21.548Z [err] gyp ERR! cwd /var/lib/node-red/node_modules/@serialport/bindings-cpp
2023-05-05T13:06:21.548Z [err] gyp ERR! node -v v10.15.3
2023-05-05T13:06:21.548Z [err] gyp ERR! node-gyp -v v3.8.0
2023-05-05T13:06:21.555Z [err] gyp ERR! not ok 
2023-05-05T13:06:21.638Z [out] 
2023-05-05T13:06:21.638Z [out] > @serialport/bindings-cpp@10.8.0 install /var/lib/node-red/node_modules/serialport/node_modules/@serialport/bindings-cpp
2023-05-05T13:06:21.638Z [out] > node-gyp-build
2023-05-05T13:06:21.638Z [out] 
2023-05-05T13:06:51.311Z [out] make: Entering directory '/var/lib/node-red/node_modules/serialport/node_modules/@serialport/bindings-cpp/build'
2023-05-05T13:06:51.317Z [out]   CXX(target) Release/obj.target/bindings/src/serialport.o
2023-05-05T13:06:51.394Z [err] make: g++: Command not found
2023-05-05T13:06:51.398Z [err] make: *** [bindings.target.mk:102: Release/obj.target/bindings/src/serialport.o] Error 127
2023-05-05T13:06:51.399Z [out] make: Leaving directory '/var/lib/node-red/node_modules/serialport/node_modules/@serialport/bindings-cpp/build'
2023-05-05T13:06:51.418Z [err] gyp ERR! build error 
2023-05-05T13:06:51.418Z [err] gyp ERR! stack Error: `make` failed with exit code: 2
2023-05-05T13:06:51.418Z [err] gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
2023-05-05T13:06:51.418Z [err] gyp ERR! stack
2023-05-05T13:06:51.428Z [err]      at ChildProcess.emit (events.js:189:13)
2023-05-05T13:06:51.428Z [err] gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
2023-05-05T13:06:51.428Z [err] gyp ERR! System Linux 4.9.155-yocto-standard-weidmueller.1
2023-05-05T13:06:51.428Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2023-05-05T13:06:51.428Z [err] gyp ERR! cwd /var/lib/node-red/node_modules/serialport/node_modules/@serialport/bindings-cpp
2023-05-05T13:06:51.428Z [err] gyp ERR! node -v v10.15.3
2023-05-05T13:06:51.428Z [err] gyp ERR! node-gyp -v v3.8.0
2023-05-05T13:06:51.428Z [err] gyp
2023-05-05T13:06:51.435Z [err]  ERR! not ok 
2023-05-05T13:06:58.558Z [err] npm WARN 
2023-05-05T13:06:58.568Z [err] optional SKIPPING OPTIONAL DEPENDENCY: @serialport/bindings-cpp@10.7.0 (node_modules/@serialport/bindings-cpp):
2023-05-05T13:06:58.568Z [err] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @serialport/bindings-cpp@10.7.0 install: `node-gyp-build`
2023-05-05T13:06:58.568Z [err] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2023-05-05T13:06:58.568Z [err] 
2023-05-05T13:06:58.598Z [err] npm ERR! code ELIFECYCLE
2023-05-05T13:06:58.598Z [err] npm ERR! errno 1
2023-05-05T13:06:58.598Z [err] npm ERR! @serialport/bindings-cpp@10.8.0 install: `node-gyp-build`
2023-05-05T13:06:58.598Z [err] npm ERR! Exit status 1
2023-05-05T13:06:58.598Z [err] npm ERR! 
2023-05-05T13:06:58.598Z [err] npm ERR! Failed at the @serialport/bindings-cpp@10.8.0 install script.
2023-05-05T13:06:58.598Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2023-05-05T13:06:58.668Z [err] 
2023-05-05T13:06:58.668Z [err] npm ERR! A complete log of this run can be found in:
2023-05-05T13:06:58.668Z [err] npm ERR!     /var/lib/node-red/.npm/_logs/2023-05-05T13_06_58_634Z-debug.log
2023-05-05T13:06:58.827Z rc=1

What the problem could be?

You are still using an obsolete version on nodejs, though that is probably not the issue causing this particular problem.

The error seems quite clear, the compiler g++ is not installed. On a Debian based system one would fix that by running
sudo apt-get install build-essential
but that may not apply to your system.
Using node-red on obsolete hardware/software is always going to be problematic.

Try our netGate, pre-installed with Node-RED. We also have some application notes, and the device has been tested with nodes of ModBUS/OPC UA or so.

Here is the link to buy

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.