# How To: Using PFC200 Onboard Serial Port with Node-RED

**URL:** https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68
**Category:** Node-RED
**Tags:** pfc200, serial
**Created:** [May 26, 2022, 10:09pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68 "2022-05-26T22:09:05Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)
#### Post date: [May 26, 2022, 10:09pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/1 "2022-05-26T22:09:05Z")

</div>

How to use the onboard serial port of a PFC200 with Node-RED running on Docker.

 ![Screen Shot 2022-05-26 at 3.08.36 PM](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/9713797940c8b1355d9baacb6634726d7ef3c895.png)

[HowTo PFC200 Serial on Node-RED.pdf](https://www.wago.community/uploads/short-url/35Em6wMrqAZGaqogamSUKOkpwMc.pdf) (2.8 MB)

---

<div class="post-metadata">

### Author: ![WagoKurt](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagokurt/32/11_2.png) [@WagoKurt](https://www.wago.community/u/WagoKurt)
#### Post date: [July 29, 2022, 2:39pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/2 "2022-07-29T14:39:07Z")

</div>

To change the serial port mode you can use the command line tool found in /etc/config-tools directory called set\_serial\_mode.  
`cd /etc/config-tools/`  
To use RS485 (default):  
`./set_serial_mode rs485`  
To use RS232:  
`./set_serial_mode rs232`

![image](https://us1.discourse-cdn.com/flex016/uploads/wago/original/1X/c0df9595b3dda56f73ce9ed33256b31f03565379.png)

---

<div class="post-metadata">

### Author: ![ivanolivas28](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/ivanolivas28/32/389_2.png) [@ivanolivas28](https://www.wago.community/u/ivanolivas28)
#### Post date: [June 16, 2023, 11:46pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/3 "2023-06-16T23:46:11Z")

</div>

hi kurt, rs232 didnt work to me, im trying to use serial port node, but when i deploy the flow, node-red closes and then its impossible to restart node red container

---

<div class="post-metadata">

### Author: ![StefSoma](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@StefSoma](https://www.wago.community/u/StefSoma)
#### Post date: [June 17, 2023, 10:50pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/4 "2023-06-17T22:50:18Z")

</div>

Same thing I explained here? I tried to restart, reboot, created new containers, reset everything to factory settings, tried 3-4 different ways to run the docker container. No matter what I’ve tried node-red still crash when using serial nodes.

[https://www.wago.community/t/using-rs485-port-on-cc100-with-nodered/202/7?u=stefsoma](https://www.wago.community/t/using-rs485-port-on-cc100-with-nodered/202/7)

---

<div class="post-metadata">

### Author: ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)
#### Post date: [June 21, 2023, 1:47am UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/5 "2023-06-21T01:47:47Z")

</div>

Here is a possible fix:

> - I you don’t have Portainer:  
> Login in the CC100 with SSH then go to elevated user by using the command `su -`  
> Then use the command `docker exec -ti --user root <containername> /bin/bash` to open the container console as root.
> - If you have Portainer, use it to log in the container console in root.
> - In the container console, go to the node-red data folder `cd /data/`
> - Execute the command `npm rebuild --build-from-source`
> 
> This will rebuild the serial node from source to the specific of the CC100 system.

---

<div class="post-metadata">

### Author: ![StefSoma](https://avatars.discourse-cdn.com/v4/letter/s/a3d4f5/32.png) [@StefSoma](https://www.wago.community/u/StefSoma)
#### Post date: [June 21, 2023, 7:42am UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/6 "2023-06-21T07:42:00Z")

</div>

@WagoIcard Thank you so much! I can confirm it helped in terms of stopping node-red from crashing. Tried so install serialport pallet and use a serial in node, crashed again. Guess I just have to rebuild again. Not able to read anything from the modbus node, but I assume that’s another issue 🙂

---

<div class="post-metadata">

### Author: ![WagoIcard](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/wagoicard/32/1508_2.png) [@WagoIcard](https://www.wago.community/u/WagoIcard)
#### Post date: [June 21, 2023, 7:56am UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/7 "2023-06-21T07:56:07Z")

</div>

This bug of the serialport library is known and should be fixed in the latest version (according to the Github notes).  
I just hope this will work and be also updated in the different nodes using serialport.  
unfortunately this bug is present in the all ARM architecture 32Bit (PFC, CC100, rPI, etc …).  
What was the last crash log file ?

---

<div class="post-metadata">

### Author: ![ivanolivas28](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/ivanolivas28/32/389_2.png) [@ivanolivas28](https://www.wago.community/u/ivanolivas28)
#### Post date: [October 25, 2023, 9:17pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/8 "2023-10-25T21:17:05Z")

</div>

i solve it in a pfc200 i uninstalled the serialport node, and installed an old version (0.15.0)

---

<div class="post-metadata">

### Author: ![Lauri](https://avatars.discourse-cdn.com/v4/letter/l/9f8e36/32.png) [@Lauri](https://www.wago.community/u/Lauri)
#### Post date: [November 23, 2023, 11:54am UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/9 "2023-11-23T11:54:53Z")

</div>

Is it possible to use serial port in Node-RED while keeping PLC Runtime in use? In all tutorials it is mentioned that runtime must be set to “none”…

There is a need to use PLC Runtime in parallel with Docker+Node-RED. Serial port would be used only in Node-RED.

---

<div class="post-metadata">

### Author: ![quenorha](https://sea2.discourse-cdn.com/flex016/user_avatar/www.wago.community/quenorha/32/429_2.png) [@quenorha](https://www.wago.community/u/quenorha)
#### Post date: [November 23, 2023, 2:10pm UTC](https://www.wago.community/t/how-to-using-pfc200-onboard-serial-port-with-node-red/68/10 "2023-11-23T14:10:55Z")

</div>

Yes you can, just make sure there’s no concurrent access to the same ressource (the serial interface or the k-bus)
