Data Logging


I thought I would put this one out there to get any advice and help I can from peoples vast experience before I tackle this little and probably simple task.

To set the scene;

I have two PLC’s controlling different machines. Im going to pull data from both machines to create PDF reports and save them.
I have PLC tags from when to save etc.

I want to store 5 minutes of data (per second) pulled from 12 REAL values and store them in a data base from machine A
I want to store around 10 REAL values pulled from machine B after it has complete its cycle from machine B

I then want them to be pulled pulled into a report then saved with either a job number or date/time stamp.

Once its been saved then I want the whole process to start over again with in incrementing job number or time stamp for the saved file.

This will happen probably every 15-20 minutes.

Sometimes the Job might be skipped so the operator will press a button on the screen saying failed. I do this to keep the job counter incrementing. So in this instance the report will still be created but it will be labeled as a failure.

Every day I would like to create a new folder for the stored PDF’s to keep them easy to access, or would it be better to keep adding pages to the PDF for that day ?

I already have logging set up on the siemens PLC’s and HMI’s but they only log as CSV files and because there is two machines it creates two separate files. Im going down this road to create a PDF containing both values. Creating all the tags isn’t a problem, having data store to the data base shouldn’t be a problem. But having the data base overwritten after every job is something I have to learn, as is creating and saving the report for every job based on the incrementing job number.

Anyone done anything similar before in making PDF reports of this frequency and has some words of wisdom


so the question is a bit overloaded and needs some clarification, but I’ll take a shot at this.

My approach to this would be to leverage transaction groups to log this data to the database along with the job number.
1 t-group for machine A, 1 for machine B, logging to two separate tables.
Set it up to be trigger based so it’s only logging data while the machine is active.

Now that you have the data stored, you’ll have a report viewer set up to trigger off this data change based on job numbers. When this data changes, you’re report should be bound to refresh the data on the report- from there you can fire off a save function to save the report pdf to a location.

The only downside with automated report saving is you’ll need an “always” on client to trigger this process (since reporting is client side only).

I hope this helps a bit!

Thanks for that info, Much appreciated and helps a lot.

Im currently setting up all the tags for the data I need and researching which type of transaction group to use.

Its no problem having the client always on as we have a dedicated client for this logging activity.