100 tags from history into daily data log file

Hello once again!

I have a new one. My customer wants about 100 tags to be recorded into a .csv file, every hour, once each day.

I have already set up the tag historian into MariaDB.

I also have the reporting module, and logically thought that was the way to go.

My issues are, I can't put the volume of tags onto a report table (or can i?).

I set up the report DataSource with all the tags and unique key aliases, but I am struggling with "Table" or "Simple Table" components in the designer. I can add columns, but 100?

Is there another way, other than the reporting module, or is there another approach WITH the reporting module? I am so very close to having automated .csv logged data.

I ran a small data-set as a test with the report module, and the scheduling/saving to file works perfect.

Thanks,

Tim

Don't use the reporting module for this, unless you need graphics to go with the data.

If you are aiming for just straight CSV data export, use a gateway scheduled script, and in there make a call to system.tag.queryTagHistory to pull the data for all the tags that you need. Then, convert the returned dataset to a csv using system.dataset.exportCSV.

For best results, create a project library script, and define the tags to read, as well as all the logic to fetch/convert and export in a function in this library, and call that function from the scheduled gateway script.

1 Like

Hi Ryan, thanks for your response.

It looks like there is a steep learning curve for this task. I hoped for something easier to follow.

I might just use the report and break the data into smaller chunks, as my customer is one of those do it yesterday types. Maybe I can figure out the scripting after a while.

It really isn't too bad going with Ryan's approach both of the functions are well documented, with examples.

Honestly, everything in Ignition is a steeper than normal learning curve for me. But there are enough resources from tutorials, docs, forum posts, expert members, that a little trial and error and a little time, you will learn another skill and have a new example for your tool kit of solutions. Then those compound and it gets easier next time.

I understand that, and I will be hopefully getting a second project, where I can refine things I have learned into simpler tasks, such as this one.

I will get my three log files working neatly, using the reporting module. I don't need to see the data as a PDF, just a .csv

I will also create a handful of actual reports. Once the customer is happy, I will have time to learn the script approach, for my next project!

Thanks for all your responses. I am half way done with datalog files!

Tim

1 Like