# Modbus Serial In Test File

**URL:** <https://discourse.nodered.org/t/modbus-serial-in-test-file/31181>\
**Category:** General\
**Created:** [5 August 2020 14:40 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181 "2020-08-05T14:40:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)\
**Post date:** [5 August 2020 14:40 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/1 "2020-08-05T14:40:39Z")

</div>

Hi All,

So I`ve been reading data through the serial modbus node. I then connected it directly to a write text file node hoping that I could use the data later. Only issue is - the data comes through as a raw format like this ----

í~ 9Ì•èB@B¾€ 9“7 ? DÂšàÈC|HC ¬ Q ?šõ`BêÉ 9Ì•èAüÓ€Bº€ 9“7 ? " HÂ™¡ÈC|HC ¬ Q ?š^\BeY 9Ì•èAùG B  
uÀ 9“7 \> DÂ“älC|HC ¬ Q ?›ÀÞB ž• 9Ì•èAö\< B r 9“7 ? BÂ”$ÔC|HC ¬ Q ?œóñB  
­è 9Ì•èAó³ B Q€ 9“7 ? ! FÂ—¤C|HC ¬ Q ?œ[

* * *

How do I convert this into something I can use from the text notepad document?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 August 2020 16:08 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/2 "2020-08-05T16:08:52Z")

</div>

apologies as I know nothing about modbus - but that looks more like serial data received at the wrong speed / baud rate - does modbus have a fixed baud rate ?

---

<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 August 2020 16:22 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/3 "2020-08-05T16:22:10Z")

</div>

In addition (or alternatively) is not modbus data binary rather than human readable?  
I would start by feeding the output of the modbus into a debug node and make sure you get sensible data.

---

<div class="post-metadata">

**Author:** ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)\
**Post date:** [5 August 2020 17:54 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/4 "2020-08-05T17:54:27Z")

</div>

The modbus response reads it as a buffer but I dont know what the initial decoder is doing , ie what the serial modbus node reads it as before its changed into something else

---

<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 August 2020 19:32 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/5 "2020-08-05T19:32:40Z")

</div>

The question is, what is in the buffer. Is it binary data or some human readable form? If it is binary then what are you expecting to see in the file?

---

<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:** [4 October 2020 19:32 UTC](https://discourse.nodered.org/t/modbus-serial-in-test-file/31181/6 "2020-10-04T19:32:47Z")

</div>

Closed on 4 October 2020 19:32 UTC

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