# How to write 100 words via node-red-contrib-cip-to-ethernet-ip

**URL:** <https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403>\
**Category:** General\
**Created:** [8 November 2021 21:38 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403 "2021-11-08T21:38:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JbmDk](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JbmDk](https://discourse.nodered.org/u/JbmDk)\
**Post date:** [8 November 2021 21:38 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403/1 "2021-11-08T21:38:21Z")

</div>

Hi  
I have to send 100 words from a Modbus/Tcp device to a ControlLogix plc.

I need a way to write data to different tag names in the AB plc via a function node. But as I see it it’s only possible if I add a write node for every individual tags. Is this really correct? Or is there a way to do this inside a function node. I have all tags added in the device connection.

---

<div class="post-metadata">

**Author:** ![iiLaw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iilaw/32/14782_2.png) [@iiLaw](https://discourse.nodered.org/u/iiLaw)\
**Post date:** [9 November 2021 10:10 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403/2 "2021-11-09T10:10:42Z")

</div>

I've just installed the node and it looks as you fear you will have to create a 100 output nodes.  
The node doesn't seem to support passing a tag name via the msg object nothing mentioned in "node info". However looking at the code you might be able use `msg.variable` give it a try ...

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

---

<div class="post-metadata">

**Author:** ![JbmDk](https://avatars.discourse-cdn.com/v4/letter/j/f17d59/32.png) [@JbmDk](https://discourse.nodered.org/u/JbmDk)\
**Post date:** [9 November 2021 21:04 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403/3 "2021-11-09T21:04:21Z")

</div>

Thanks for the hint I will give it a try, and see if I can figure it out.

---

<div class="post-metadata">

**Author:** ![iiLaw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iilaw/32/14782_2.png) [@iiLaw](https://discourse.nodered.org/u/iiLaw)\
**Post date:** [9 November 2021 21:24 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403/4 "2021-11-09T21:24:57Z")

</div>

try a inject node you can set both .payload and .variable  
And set .variable to string

---

<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:** [8 January 2022 21:25 UTC](https://discourse.nodered.org/t/how-to-write-100-words-via-node-red-contrib-cip-to-ethernet-ip/53403/5 "2022-01-08T21:25:07Z")

</div>

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