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

**URL:** <https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951>\
**Category:** Industrial\
**Created:** [26 April 2023 10:41 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951 "2023-04-26T10:41:27Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [26 April 2023 10:41 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/1 "2023-04-26T10:41:27Z")

</div>

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](https://drive.google.com/file/d/1ohKm83yx3UGdMd20czuV0woDxHGfiy4R/view?usp=share_link)]

[[install\_serialport\_rs485\_error\_log.jpg - Google Drive](https://drive.google.com/file/d/1DxnacmisWzUjq4fqGIfHco1e13RwlWjY/view?usp=share_link)]

[[install\_serialport\_error1.jpg - Google Drive](https://drive.google.com/file/d/16UPNx3Ev4NIG7cEFYF4yluzBG-w5uF1f/view?usp=share_link)]

[[install\_serialport\_error\_log.jpg - Google Drive](https://drive.google.com/file/d/1fw4SBPFj7EyzpOVplgjsfzuqE6kggaNa/view?usp=share_link)]

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2023 12:09 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/3 "2023-04-26T12:09:50Z")

</div>

Does the device running node red have internet access?

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [26 April 2023 12:11 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/4 "2023-04-26T12:11:01Z")

</div>

Sure! I tried different wi-fi connections.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 April 2023 15:40 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/5 "2023-04-26T15:40:52Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [27 April 2023 05:47 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/6 "2023-04-27T05:47:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2023 06:12 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/7 "2023-04-27T06:12:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [27 April 2023 06:26 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/8 "2023-04-27T06:26:59Z")

</div>

> [@Colin](#):
>
> wget [https://registry.npmjs.org/node-red-node-serialport](https://registry.npmjs.org/node-red-node-serialport)

Please look in attachment  
 ![ping](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/025a5058083588f1cf8c7732adb4ae9a6a5dc2f6.jpeg)

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [27 April 2023 06:55 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/9 "2023-04-27T06:55:42Z")

</div>

I can't open [registry.npmjs.org](http://registry.npmjs.org) on the browser

 ![registry.npmjs.org](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c3138202b385cdb0876fb17835604dc0d3756cb.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2023 06:57 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/10 "2023-04-27T06:57:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2023 06:58 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/11 "2023-04-27T06:58:45Z")

</div>

> [@SANNICAP](#):
>
> I can't open [registry.npmjs.org](http://registry.npmjs.org) on the browser

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?

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [27 April 2023 07:59 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/12 "2023-04-27T07:59:54Z")

</div>

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

 ![serialport_1.0.3 error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d6561c8ae844d89a1be889a4c18cb194fab0376.jpeg)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [27 April 2023 13:32 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/13 "2023-04-27T13:32:55Z")

</div>

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

> [@Colin](#):
>
> Please copy/paste text rather than screenshot wherever possible.

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.

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [27 April 2023 20:01 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/14 "2023-04-27T20:01:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SANNICAP](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@SANNICAP](https://discourse.nodered.org/u/SANNICAP)\
**Post date:** [5 May 2023 13:15 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/15 "2023-05-05T13:15:45Z")

</div>

Hello, Colin.

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

```auto
-----------------------------------------------------------
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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 May 2023 13:33 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/16 "2023-05-05T13:33:51Z")

</div>

> [@SANNICAP](#):
>
> `2023-05-05T13:06:51.428Z [err] gyp ERR! node -v v10.15.3`

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

> [@SANNICAP](#):
>
> `2023-05-05T13:06:21.512Z [err] make: g++: Command not found`

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.

---

<div class="post-metadata">

**Author:** ![magicfire](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/magicfire/32/93420_2.png) [@magicfire](https://discourse.nodered.org/u/magicfire)\
**Post date:** [9 May 2023 23:03 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/17 "2023-05-09T23:03:35Z")

</div>

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.

 ![主图800 (1)](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e1830c8299de88bfc917fd1be88db7199f2613a.jpeg)

[Here is the link to buy](https://item.taobao.com/item.htm?ft=t&id=698582740166)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 July 2023 23:03 UTC](https://discourse.nodered.org/t/plc-weidmuller-uc20-wl2000-iot-connecting-via-rs-485/77951/18 "2023-07-08T23:03:57Z")

</div>

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