EPIC csv file from codesys tags

Hi,

I am doing an upgrade of a Snap PAC to a Groov EPIC.

In this project there is a xml file that takes data from the PAC Project and every 5 minutes it posts the values to a csv file.

In the upgrade we have moved to Codesys as the controller and I still need to use this xml file to get the data to the csv file.

Can I ask someone to comment on what modifications need to be made to make this work.

I would say that the tags will need to change to suit new tags. I believe the port number might need to change.

The original xml file is below:

<?xml version="1.0"?> JLHP 3e847246-4fdd-403d-8f66-2be690fff38f [CONT|ip|tcp:172.20.29.3:22001]I32;Value;Total_filtrate_volume [CONT|ip|tcp:172.20.29.3:22001]Apoint;Eu;TK1feed1_pH [CONT|ip|tcp:172.20.29.3:22001]Apoint;Eu;TK1bio1_DOx [CONT|ip|tcp:172.20.29.3:22001]Apoint;Eu;TK1filt1_turbidity [CONT|ip|tcp:172.20.29.3:22001]Apoint;Eu;CL1unit1_free_cl [CONT|ip|tcp:172.20.29.3:22001]Apoint;Eu;TK1sto1_pH [CONT|ip|tcp:172.20.29.3:22001]I32;Value;Membrane_flux 00:00:10 Opto22.OpcServer.2 00:05:00 C:\Opto22\Data\JLHP.csv running

I would recommend taking a look at the Codesys IIoT Library.

It has CSV and XML utilities:
CSV Utility SL

The library CSV Utility SL provides function blocks to read and write CSV files. The library contains the components CSVReader (read a CSV file) and CSVWriter (write a CSV file). All function blocks can be used in a classical or object oriented way. An example project demonstrates the usage of all components.

XML Utility SL

The library “XML Utility SL” contains function blocks to read and write xml files or xml strings on a control. All elements of the xml file are stored in an array of structures. The library also contains function blocks to find elements by name and attribute. The usage of the library is demonstrated by two example applications.

Thanks,

My Client wants to keep this csv file. I have tried changing the port number to different ones but this doesn’t seem to result in any values.

The ports I have tried are:

11740, 11741, 11742, 11743, 1740, 1741, 1742, 1743

Attached is the full xml file. I did see that the pasted file did not give all the file.

CSV File Contents

Where is the csv file located? Is it on the Epic or a PC on the network?

Is the file getting written at all and is just blank?

The file is on a PC.
At present I only see NULL coming up on the csv file.