# Mitsubishi MC Node read and Function Node help

**URL:** <https://discourse.nodered.org/t/mitsubishi-mc-node-read-and-function-node-help/60546>\
**Category:** Industrial\
**Created:** [30 March 2022 14:54 UTC](https://discourse.nodered.org/t/mitsubishi-mc-node-read-and-function-node-help/60546 "2022-03-30T14:54:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jts450](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@jts450](https://discourse.nodered.org/u/jts450)\
**Post date:** [30 March 2022 14:54 UTC](https://discourse.nodered.org/t/mitsubishi-mc-node-read-and-function-node-help/60546/1 "2022-03-30T14:54:15Z")

</div>

Sorry for the simple question here but I am still trying to learn JSON and need some help with the code for the function node.

I want to poll the MC read node every .1 second (PLC out put is set to 500ms and I don't want to miss) and if the value is true then write a T to the scanner to trigger it. In addition I want to write to a csv file the scan data and hopefully include a time stamp in the csv file. I also am trying to figure out the best way to update a variable that I can see in Node-Red for a current scan counts.

I realize this is probably very easy for some but not for me yet. Any help with the code would be appreciated. Thanks,

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

[flows (1).json](https://discourse.nodered.org/uploads/short-url/aMwHvj4cpqYdd7WHjRimu6iWhlR.json) (8.0 KB)

---

<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:** [29 May 2022 14:54 UTC](https://discourse.nodered.org/t/mitsubishi-mc-node-read-and-function-node-help/60546/2 "2022-05-29T14:54:26Z")

</div>

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