Beno
February 12, 2024, 9:59pm
2
Welcome to the Opto Forums Matt.
Yes, its a common request.
You can see some solutions here:
Like most things with Node-RED there are many ways to do the same thing.
Here is how I build my reports to send via email…
[image]
The switch node in this case is optional, its just how I trap for a key word that I want to log to my file.
The cool stuff is in the date/time formatter node aka the ‘Moment ’ node. Note, you will need to install this node since its not a core node.
What we are doing here is building the file name that will be used to write the file to the hard drive in the comp…
And here:
I’ve created a data logger pulling analog points from my Opto Epic using the following in Node-RED:
inject (msg.payload = timestamp) > groov i/o read node > change node (msg.payload to the value of “value_name,” & msg.payload) > write file node (path with a file .csv)
Right now I get the proper analog value coming in to the csv file as expected but there’s no timestamp allocated to each interval. I suspect I need to add something in the change node but what??
Thanks,
Spencer
The moment node in conjunction with a RBE/Filter (Report by exception) node will probably do what you are looking for.
The RBE will only output once the date rolls over at midnight, till then, the data will go into the current file.