# Codesys and Node-red on the same Raspi?

**URL:** https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007
**Category:** General
**Created:** [24 May 2022 13:41 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007 "2022-05-24T13:41:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![xavier98](https://avatars.discourse-cdn.com/v4/letter/x/f08c70/32.png) [@xavier98](https://discourse.nodered.org/u/xavier98)
#### Post date: [24 May 2022 13:41 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007/1 "2022-05-24T13:41:31Z")

</div>

Hi all,

I have a question. I have a raspberry with the codesys runtime. If I want to use some Raspi sensors with i2c bus, a simple way would be to read then with node-red and then send via OPC UA or Modbus to the codesys runtime ?

I know that technicaly I can use i2c in Codesys but I need to do a library and don't know how to do that ☹

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 May 2022 14:17 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007/2 "2022-05-24T14:17:20Z")

</div>

> Codesys and Node-red on the same Raspi?

I dont see why not. Have you tried?

---

<div class="post-metadata">

### Author: ![xavier98](https://avatars.discourse-cdn.com/v4/letter/x/f08c70/32.png) [@xavier98](https://discourse.nodered.org/u/xavier98)
#### Post date: [24 May 2022 14:29 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007/3 "2022-05-24T14:29:18Z")

</div>

No, i don't know if a Modbus Master/Slave or OPC UA Server/Client work in the same device (IP) 🤨  
I will try and keep you in touch 🙂

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [24 May 2022 14:31 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007/4 "2022-05-24T14:31:07Z")

</div>

Seeing as ModBus uses (usually) PORT 502 and OPCUA uses whatever PORT you have chosen, I see no reason.

---

<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: [23 July 2022 14:32 UTC](https://discourse.nodered.org/t/codesys-and-node-red-on-the-same-raspi/63007/5 "2022-07-23T14:32:00Z")

</div>

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