# How to merge arrays from two Modbus fc 1 and fc 3

**URL:** <https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570>\
**Category:** General\
**Tags:** modbus\
**Created:** [22 December 2022 08:11 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570 "2022-12-22T08:11:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanavit445](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tanavit445/32/73035_2.png) [@tanavit445](https://discourse.nodered.org/u/tanavit445)\
**Post date:** [22 December 2022 08:11 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570/1 "2022-12-22T08:11:09Z")

</div>

![318373576_680125357147991_1654618475488585599_n](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3bcc55b16f73d071cfd864a7eecaf671f36497b3.png)

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

---

<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:** [22 December 2022 09:20 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570/2 "2022-12-22T09:20:52Z")

</div>

Almost always the simplest solution in cases like this is to perform the operations in series rather than parallel. Perform on of the modbus operations and then move the results to a msg property (msg.firstGet for example), then do the second get and you should still have the previous data available in msg.firstGet.

---

<div class="post-metadata">

**Author:** ![tanavit445](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tanavit445/32/73035_2.png) [@tanavit445](https://discourse.nodered.org/u/tanavit445)\
**Post date:** [22 December 2022 09:23 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570/3 "2022-12-22T09:23:17Z")

</div>

Do you have an example for me to see? I'm new in node red. thx

---

<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:** [22 December 2022 12:15 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570/4 "2022-12-22T12:15:17Z")

</div>

It is pretty much as colin said dont do parallel operations, do everything in series...

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

---

<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:** [5 January 2023 12:16 UTC](https://discourse.nodered.org/t/how-to-merge-arrays-from-two-modbus-fc-1-and-fc-3/72570/5 "2023-01-05T12:16:02Z")

</div>

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