# Error Reading Modbus tcp

**URL:** https://discourse.nodered.org/t/error-reading-modbus-tcp/60786
**Category:** Industrial
**Tags:** modbus
**Created:** [4 April 2022 17:31 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786 "2022-04-04T17:31:53Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![motosierra1141](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/motosierra1141/32/43434_2.png) [@motosierra1141](https://discourse.nodered.org/u/motosierra1141)
#### Post date: [4 April 2022 17:31 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/1 "2022-04-04T17:31:53Z")

</div>

Hello everyone i'm trying to read Modbus wirh fc03 holding input register, everytime i get "Error: Modbus exception 3: Illegal data value (value cannot be written to this register)" i know that sounds like i'm trying to write in a read only address, but i'm using de read Modbus node, somebody help me please!!

---

<div class="post-metadata">

### Author: ![MountainKing91](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mountainking91/32/59516_2.png) [@MountainKing91](https://discourse.nodered.org/u/MountainKing91)
#### Post date: [5 April 2022 19:55 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/2 "2022-04-05T19:55:55Z")

</div>

Input registers (read only) are a different memory area than Holding registers (read/write). FC03 is "read holding registers.  
Can you provide some detailed informations in order to reproduce your issue? Maybe paste your code?

---

<div class="post-metadata">

### Author: ![motosierra1141](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/motosierra1141/32/43434_2.png) [@motosierra1141](https://discourse.nodered.org/u/motosierra1141)
#### Post date: [5 April 2022 20:17 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/3 "2022-04-05T20:17:07Z")

</div>

Thanks For answering  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c94278559b93f58663359b5467ac23e4852b86d.png)  
this is the code looks like, the configuration of the node is this  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/8207b7eb15d10e39fe805ff0781919ab188d0c90.png)  
and the error that apper is this one  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/9/b986401c153c3f2587a57f4cf1214991504259f6.png)  
i use Modscan 64 to connect to modbus tcp/ip software to connect to the same device and see if i can see the data, and it works, but in node red i cant

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/d/adad4aa944a0e9674ed541af8280ae1b694c906f.png)  
like you see in the image i can connect to holding register and see the data in addres 2700 and 2701, if i try to do this in to node red i cant, i dont know if holding register and FC 03 Read holding register are not the same thing. please help me!!

---

<div class="post-metadata">

### Author: ![MountainKing91](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mountainking91/32/59516_2.png) [@MountainKing91](https://discourse.nodered.org/u/MountainKing91)
#### Post date: [6 April 2022 20:21 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/4 "2022-04-06T20:21:24Z")

</div>

What node-red-contrib-modbus version and node-red versione do you have?  
Have you tried reading different register addresses?  
What device is your modbus server?

I am a bit confused about unit ID = 15, can you set it to 1 in your device (15 should be ok though)? Check also that you're register address isn't expressed as hex, that node expects it as decimal i think.

---

<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: [6 April 2022 20:28 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/5 "2022-04-06T20:28:46Z")

</div>

Out of interest, what do you get if you try reading

- Quantity 1 from 2700
- Quantity 1 from 2701
- Quantity 1 from 2702

---

<div class="post-metadata">

### Author: ![motosierra1141](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/motosierra1141/32/43434_2.png) [@motosierra1141](https://discourse.nodered.org/u/motosierra1141)
#### Post date: [7 April 2022 20:32 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/6 "2022-04-07T20:32:02Z")

</div>

in other register in other addresses i get the result, but in this adreess i cant read, it is a float 32 bits, i read the register in OPC and then imported to node red to use the data but it looks very weird that i cant read it with modbus node

---

<div class="post-metadata">

### Author: ![motosierra1141](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/motosierra1141/32/43434_2.png) [@motosierra1141](https://discourse.nodered.org/u/motosierra1141)
#### Post date: [7 April 2022 20:32 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/7 "2022-04-07T20:32:12Z")

</div>

i get the same error

---

<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: [6 June 2022 20:32 UTC](https://discourse.nodered.org/t/error-reading-modbus-tcp/60786/8 "2022-06-06T20:32:23Z")

</div>

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