# Use function node with node-red-contrib-cip-ethernet-ip

**URL:** <https://discourse.nodered.org/t/use-function-node-with-node-red-contrib-cip-ethernet-ip/69382>\
**Category:** Industrial\
**Tags:** function-node\
**Created:** [21 October 2022 13:53 UTC](https://discourse.nodered.org/t/use-function-node-with-node-red-contrib-cip-ethernet-ip/69382 "2022-10-21T13:53:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federica](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@Federica](https://discourse.nodered.org/u/Federica)\
**Post date:** [21 October 2022 13:53 UTC](https://discourse.nodered.org/t/use-function-node-with-node-red-contrib-cip-ethernet-ip/69382/1 "2022-10-21T13:53:59Z")

</div>

Hello, trying to use node-red-contrib-cip-ethernet-ip. I want to read many variables from an Allen Bradley PLC but with different read-rate, so I wouldn't like to configure the tags and read-rate in the 'eth-ip' node. In a function node, I would like to organize and collect the data I need to read at the same rate in a JSON object and then send the information in msg.payload to the 'eth-ip in' node.  
For example something like this:

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

> [  
> {  
> "id": "783a46ef7d028eb9",  
> "type": "eth-ip in",  
> "z": "8513256d035c03e6",  
> "endpoint": "ec1df2b0f4c16087",  
> "mode": "all",  
> "variable": "SmartClosure.PowerOnTime",  
> "program": "",  
> "name": "PowerOnTime",  
> "x": 430,  
> "y": 360,  
> "wires": [  
> [  
> "4c3421993adc2cf2"  
> ]  
> ]  
> },  
> {  
> "id": "ec1df2b0f4c16087",  
> "type": "eth-ip endpoint",  
> "address": "172.30.48.97",  
> "slot": "0",  
> "cycletime": "5000",  
> "name": "PLC",  
> "vartable": {  
> "": {  
> "SmartClosure.PowerOnTime": {  
> "type": "DINT"  
> },  
> "SmartClosure.RunningTime": {  
> "type": "DINT"  
> }  
> }  
> }  
> }  
> ]

Is there any way to do it? Is there another package to use?  
Thank you.

---

<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:** [20 December 2022 13:54 UTC](https://discourse.nodered.org/t/use-function-node-with-node-red-contrib-cip-ethernet-ip/69382/2 "2022-12-20T13:54:33Z")

</div>

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