# Writing 1 to Mitsubishi PLC results in 256 being written

**URL:** https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010
**Category:** Industrial
**Created:** [1 January 2023 04:32 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010 "2023-01-01T04:32:40Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [1 January 2023 04:32 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/1 "2023-01-01T04:32:40Z")

</div>

Hi team. I connected PLC Mitsubishi Fx 3GC with node red via MC protocol and I write the number to register D200. But when the number is 1 and the D200 is 256. I don't know why. I expect the number D200 similar input. Please look at the picture advise me

 ![IMG_20230101_112903](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/a/1a9cae37ab83394db1c9ec1cf73e54042b2251ad.jpeg)

---

<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: [1 January 2023 09:58 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/2 "2023-01-01T09:58:54Z")

</div>

Firstly, I suspect this is a double word issue but I am confused by the value shown in the single word MOV

1. Using the Gx developer memory view (setup to show 16bit values), what values do you see in D200 and D201.
2. Attach 1 debug node to the dashboard item and another debug (set to show complete message) to the output of the mc-write node. Show us what you see.
3. Is D200 used anywhere else in the ladder?
4. What do you get is you send 1 from an inject?
5. What happens if you send the number 257 to the mc-write node?
6. What is the intention of the D200 number in the PLC? Are you using it in single or double word operations? ( E.g. is to be a 16bit signed or 16bit unsigned or 32bit double etc)?

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [1 January 2023 10:27 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/3 "2023-01-01T10:27:21Z")

</div>

Thank you for your advice. The rootcause from the PLC program. I have one more question. When the PLC lost power and after that on power again. The node red can not auto connect to the PLC. How to solve this case?

---

<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: [1 January 2023 10:28 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/4 "2023-01-01T10:28:20Z")

</div>

Are you using TCP or UDP?

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [1 January 2023 10:29 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/5 "2023-01-01T10:29:10Z")

</div>

I am using TCP.

---

<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: [1 January 2023 10:31 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/6 "2023-01-01T10:31:40Z")

</div>

Firstly, if you can, try changing to UDP. I have had 14 years experience of mitsubishi TCP lock outs.

If you cannot switch to UDP then you might have to resort to sending disconnect/connect messages to the node (see the built-in help)

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [1 January 2023 10:35 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/7 "2023-01-01T10:35:39Z")

</div>

I can not change to UDP.How to send disconnect/connect message to node red in this case

---

<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: [1 January 2023 10:39 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/8 "2023-01-01T10:39:09Z")

</div>

See the built in help

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [1 January 2023 14:43 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/9 "2023-01-01T14:43:53Z")

</div>

Hi Steve-Mcl,  
I follow your advice. Use UDP protocol for PLC Mitsubishi.( PLC: FX 3GC, Module : FX3U-ENET-ADP). The status is display ready but when I press the Switch the error occurs : "Error: timeout"  
Please advise for me next steps.

 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37c888713b0a0b9a760d4deb875ccf2e73d0f11d.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/9997ff631b84543891aeb314c7f28f9acec05b00.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7c8f80f30e9921cc48ad5a5e1c728db7debbe043.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1ff4f75cce0e929d26b46d37940d725fbdc2149.png)

 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/c/8c4d780d76596a60073cb793ca6b58c7163b3e7c.png)

Vào CN, 1 thg 1, 2023 vào lúc 17:08 Stephen McLaughlin via Node-RED Forum \<[notifications@nodered.discoursemail.com](mailto:notifications@nodered.discoursemail.com)\> đã viết:

---

<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: [1 January 2023 14:59 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/10 "2023-01-01T14:59:39Z")

</div>

Make sure to use capital letters for device specifier e.g. D200 not d200

Also, always best to use frame 4E if the PLC supports it

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [3 January 2023 17:03 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/11 "2023-01-03T17:03:17Z")

</div>

Hi Steve-Mcl,  
I am facing an issue when I input the number 99999 to D6 in PLC Mitsubishi FX 3GC. And display this number on Node Red Dashboard is -31073  
Please support and advice help me  
 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/a/1ad0fe027a01fda1ff09888323ebf9d1ae4ade2f.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/7/475c7e8978f2aa1068914fb0ed85425107853113.png)

 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/b/fbf1e7eb9c8891df997d0467d4a250266665d8f8.png)

![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cbe45dc03f8810a75addc92df12bd3bb2b1ce0da.png)

Vào CN, 1 thg 1, 2023 vào lúc 22:09 Stephen McLaughlin via Node-RED Forum \<[notifications@nodered.discoursemail.com](mailto:notifications@nodered.discoursemail.com)\> đã viết:

---

<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: [3 January 2023 17:17 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/12 "2023-01-03T17:17:08Z")

</div>

D6 is a 16 bit signed integer address (-32,768 to +32,767)

Read the built in help to understand how to access double word values.

Alternatively, read 2 values & use the buffer parser to convert to unsigned 32 bit value

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [4 January 2023 12:38 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/13 "2023-01-04T12:38:06Z")

</div>

Dear Steve-Mcl,  
Thank you for your advice.I already solved this case.

 ![image.png](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d2ab4e33f39e55068775adc8ba7cafcb90a9dc9c.png)

Vào Th 4, 4 thg 1, 2023 vào lúc 00:27 Stephen McLaughlin via Node-RED Forum \<[notifications@nodered.discoursemail.com](mailto:notifications@nodered.discoursemail.com)\> đã viết:

---

<div class="post-metadata">

### Author: ![Bao](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@Bao](https://discourse.nodered.org/u/Bao)
#### Post date: [12 January 2023 13:45 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/14 "2023-01-12T13:45:39Z")

</div>

Hi team,  
How Can node red convert ASCII to Binary?

 ![IMG_20230112_204104.jpg](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/0/a00e020953033cb74327de6e6bb2e441de115fc1.jpeg)

---

<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: [11 February 2023 13:45 UTC](https://discourse.nodered.org/t/writing-1-to-mitsubishi-plc-results-in-256-being-written/73010/15 "2023-02-11T13:45:43Z")

</div>

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