Csv File from Groov View using NodeRed from Codesys Tag

Hi,

I have a codesys program on a groov epic that am trying to get data to a USB key.
From a previous post it seems that Codesys program cannot access the USB Key directly on the EPIC without doing some SSH changes to allow this.
I am looking at using NodeRed to do this.
The problem I am facing is that from what I have read there is no way to move data from from the OPC-UA tag to the data store tag which NodeRed reads.
If anyone has any ideas on how to achieve this, it would be greatly appeciated.

There are a number of ways to accomplish this. If you are dead set on using OPC UA to move the values from CODESYS into Node-RED, you should be able to use OPC UA client node to read values from the OPC UA server in CODESYS and pull them into Node-RED. I found a video online that looks like the one https://www.youtube.com/watch?v=-4tb73oWGxM

You might also consider using our OptoMMP function in CODESYS to move the values you want to save into OptoMMP (AKA scratchpad) registers Getting Started with the OptoMMP Function Blocks for CODESYS | Opto 22 Developer

Then you can use the native Opto 22 groov i/o read node to read the MMP addresses with the values you want.

1 Like

One thing that may be worth considering:

Write your CSV file using CODESYS to the EPIC’s internal storage. This is very fast and very reliable in my experience.

Then, use a Watch node in Node-RED to rsync the CSV file out to your USB drive (or other destination) whenever the local file changes:

Thanks @varland! Another great option!

1 Like