# How to write to two registers simultaneously using the FC 16

**URL:** https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191
**Category:** Dashboard
**Created:** [16 November 2024 19:50 UTC](https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191 "2024-11-16T19:50:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Desmond-Zeh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/desmond-zeh/32/92216_2.png) [@Desmond-Zeh](https://discourse.nodered.org/u/Desmond-Zeh)
#### Post date: [16 November 2024 19:50 UTC](https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191/1 "2024-11-16T19:50:58Z")

</div>

Hello Team!  
I’ve developed a small supervision system for my generator using node red nodes. On the system, in order to reset an alarm, I’ll have to send two values ( 35707 and 29828) to two separate registers ( 4104 and 4105) simultaneously. I’ve tried this using the FC 16 function but no positive result.  
Here below is the code

```auto
     value: 35707, 
     'fc': 16, 
     'unitid': 1, 
     'address': 4104 ,
      'quantity': 1 
      }, {
     value: 29828, 
     'fc': 16, 
     'unitid': 1, 
     'address': 4105 ,
      'quantity': 1 
      }]``
This returns an error code ''Wrong FC used''.
I think it has to do with the FC 16 I've used.
But, how do I get around this. Please any help will be highly appreciated.
```

---

<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: [16 November 2024 19:59 UTC](https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191/2 "2024-11-16T19:59:02Z")

</div>

As the built in help says:

> **msg.payload** must be an array`[]` of comma separated values between 0:65535 each

And there is a built in demo

![chrome_Z5n0GXaAXR](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/8/687861afb56cef970db41eb104e5ac0fd6575989.gif)

---

<div class="post-metadata">

### Author: ![Desmond-Zeh](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/desmond-zeh/32/92216_2.png) [@Desmond-Zeh](https://discourse.nodered.org/u/Desmond-Zeh)
#### Post date: [16 November 2024 21:10 UTC](https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191/3 "2024-11-16T21:10:23Z")

</div>

Thank you Steve.  
I got it.

---

<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: [30 November 2024 21:10 UTC](https://discourse.nodered.org/t/how-to-write-to-two-registers-simultaneously-using-the-fc-16/93191/4 "2024-11-30T21:10:43Z")

</div>

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