# Correct communication with PLC

**URL:** <https://discourse.nodered.org/t/correct-communication-with-plc/54406>\
**Category:** Industrial\
**Created:** [28 November 2021 16:38 UTC](https://discourse.nodered.org/t/correct-communication-with-plc/54406 "2021-11-28T16:38:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FrantaD](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/frantad/32/34045_2.png) [@FrantaD](https://discourse.nodered.org/u/FrantaD)\
**Post date:** [28 November 2021 16:38 UTC](https://discourse.nodered.org/t/correct-communication-with-plc/54406/1 "2021-11-28T16:38:15Z")

</div>

I have a connected Omron PLC with Nodered, which I use as a control panel. I have Ethernet/IP communication and it works fine.

But I'm not sure how to use it properly.

**Example:**  
I have a relay, and I want to change its state using the Dashboard element switch.

1. The switch element is connected to the output to the PLC  
_This method does not reflect the changes made in the PLC._  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/435cddc0d761cf9dd121c4d081ef7e51478ebc89.png)

2. The output from the communication with the PLC is connected to the Switch element and the communication to the PLC is connected after the element.  
_This method reacts to changes in the PLC, but sometimes overwrites the switch element command before it is written to the PLC._  

Please advise me how to do this correctly. Thanks!

---

<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:** [27 January 2022 16:38 UTC](https://discourse.nodered.org/t/correct-communication-with-plc/54406/2 "2022-01-27T16:38:32Z")

</div>

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