# Errors in MODBUS RTU communication

**URL:** https://discourse.nodered.org/t/errors-in-modbus-rtu-communication/66255
**Category:** Industrial
**Tags:** modbus
**Created:** [9 August 2022 23:12 UTC](https://discourse.nodered.org/t/errors-in-modbus-rtu-communication/66255 "2022-08-09T23:12:54Z")
**Posts on this page:** 1
**Showing post:** 53

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [19 August 2022 22:15 UTC](https://discourse.nodered.org/t/errors-in-modbus-rtu-communication/66255/53 "2022-08-19T22:15:50Z")

</div>

> [@grant1](#):
>
> Changing to the 1st output DID work

you are absolutely right .. it was my mistake when i shared the flow today with the new changes.  
if you see post [#24](https://discourse.nodered.org/t/errors-in-modbus-rtu-communication/66255/24) it shows the wiring as you did now .. and then i wired it wrong 😴  
im glad you found it!  
so we dont even need a second output on those "error" functions  
just simply blocking the message from going to buffer-parcer when there's a failure

```auto
if (msg.payload == "" || msg.hasOwnProperty('error')) {
    node.status({ fill: "red", shape: "ring", text: `${msg.error}`});
}

else {
    node.status({ fill: "green", shape: "ring", text: ""});
    return msg;
}

```

---

_[View the full topic](https://discourse.nodered.org/t/errors-in-modbus-rtu-communication/66255)._
