0:01
Thank you for joining us back for our webinar series. Today we will be showing you how to take control of your data logging files.
0:10
The presentation is roughly about 18 minutes. As usual, if you have any questions you can put them into the question tab whenever and I’ll get to them at the end.
0:20
Hello and welcome to today’s webinar. Today we will look at taking control of Horner data logging files.
0:28
In this webinar, we are going to be discussing how to take control over your Horner data logging files.
0:36
We will start with an introduction to Horner data logging, how it works, and a typical workflow when dealing with it.
0:43
At the end, we will have plenty of demonstrations, and there will be a Q &A session to finish.
0:51
What is Horner data logging?
0:53
Data logging is a feature which allows the Horner controller to record machine data as prescribed by the system designer.
1:03
This means data can be recorded on a periodic basis or an event basis.
1:09
This data is recorded in.csv file format, which stands for comma-separated values.
1:18
This format is compatible for import into a wide range of applications, including Microsoft Excel.
1:27
Why is data logging useful?
1:29
Horner understands that users want much more than just automation out of their machines.
1:37
Data logging can be employed to easily gather and record many different types of data, including process validation, machine efficiency, historic operation, diagnostic information, and more.
1:52
How is the data logging feature designed?
1:55
Horner data logging is designed primarily for ease of implementation.
2:00
Setup can be done in a few simple steps.
2:03
File creation is fully automatic.
2:05
Files are organized in a spreadsheet format.
2:08
Column headers are automatically created using existing variable names.
2:13
New entries can be periodic or triggered.
2:17
Each row entry is date and time stamped.
2:21
What are the limitations?
2:23
You can log up to 100 variables in a single project.
2:27
Up to 30 variables can be logged per group in a single file.
2:31
And you can have up to 10 groups in a single project.
2:34
For periodic data logs, new entries can be added as fast as once per second.
2:41
And for triggered data logs, new entries can be added as fast as every other scan.
2:46
When are files created?
2:48
This depends on how you decide to set up your data logging.
2:52
For data logs with an interval in seconds, a new file is created once per hour.
2:57
For data logs with an interval in minutes, a new file is created once per day.
3:01
For data logs triggered manually, a new file is created once per day on the first trigger.
3:08
How are files named and stored?
3:10
Data logging files are stored in a folder on either the microSD drive, also called the A drive, or the USB drive, also called the B drive.
3:20
By default, data logging files will save to the A drive.
3:25
Data log files are stored in a folder which matches the name of the data log group.
3:29
Files are named after the timestamp they were created at, so for files created hourly, they are named in the format month-date-hour, and for files created daily, they are named in the format year-month-date.
3:45
How does data logging work at runtime?
3:47
Provided data logging has been enabled, it is fully automatic.
3:51
Because writing to a microSD or USB drive directly can be a relatively slow process, The controller first writes all data to a RAM buffer.
4:01
The controller then writes the data from the buffer to the drive when it is most efficient to do so.
4:07
This buffer can prevent data loss in the event the drive is removed.
4:11
The buffer full percentage can be monitored as well.
4:14
What is the workflow like?
4:15
First, we enable data logging as a feature.
4:19
Then, we configure the global data logging attributes.
4:22
Then, we create a group and configure the group’s attributes.
4:26
Then, we add our variables to the group.
4:29
And finally, for multiple groups, we repeat this process as needed.
4:34
Now let’s take a closer look at each step.
4:38
First we are going to enable data logging as a feature.
4:41
This is done through a checkbox in the Data Log Configuration window.
4:47
Next, to configure the global attributes, we click on the Global Attributes button near the bottom of the window.
4:53
Here, we are asked to assign global status and global enable variables.
5:00
What does the global status variable actually mean?
5:04
The global status variable is a two-word variable.
5:07
The first word is our media status.
5:11
This tells us if our media device is ready, whether it is formatted, whether it is present, and so on.
5:19
The second word is our media full percentage.
5:22
This tells us how much storage space is left on our media device.
5:28
When using modern SD cards and USB devices, it is unlikely that your device will completely fill up.
5:35
It is important, however, to monitor this nonetheless.
5:39
Next, for step 3, we are going to create a group.
5:43
Groups hold all the variables you wish to data log.
5:46
To create a group, simply click on the Add Group button in the lower left side of the window.
5:53
Your group names should have 8 characters or less.
5:58
Next, we must configure the group attributes.
6:01
We are going to assign another status variable, this time to monitor the buffer’s full percentage.
6:07
After that, we can set up how often we want the variables to be tracked, how many samples it should take, and whether or not we want to record based on a trigger variable.
6:17
Similar to the global status variable, the group status variable is also made up of two words.
6:23
The first word, in this case, is the group status.
6:26
This tells us if the data log file is ready, if the file has been corrupted, if there are too many files, and so on.
6:34
The second word is the group buffer full percentage.
6:38
This tells us how full the buffer currently is.
6:41
The buffer is used to temporarily store data.
6:45
This is important to track, as once it’s full, no data will be recorded.
6:49
Finally, we can begin adding variables to the group we just created.
6:57
Now, we are going to begin the demonstrations for this webinar.
7:01
First, we will demonstrate how to set up data logging on a periodic basis, followed by a showcase of the Excel sheets that can be created from those data logging files.
7:11
And finally, we will look at how to set up data logging on an event basis.
7:18
After our main demonstrations, we have included an optional demonstration on how to limit the number of files created per day.
7:27
For our demonstrations, we have made a sample pizza oven controller.
7:32
In our pizza oven mockup, we have several different data points.
7:36
We can monitor the temperature zones, the conveyor speed, the number of pizzas currently in the oven, and so on.
7:46
The purpose of this setup is to demonstrate what can be done with data logging with something that approximates a genuine use case.
7:53
To begin, we are going to return to Cscape.
7:57
Here in Cscape, we will start by selecting the Home tab from the ribbon at the top, and then navigating to data logging in the top left corner.
8:08
Now we will go through the workflow explained earlier.
8:11
We begin by enabling data logging with this checkbox here.
8:15
Then we have to assign our global attributes.
8:19
For the sake of this demonstration, we have already filled in our global variables, but normally you would assign your global status and global enable variables using the drop-down menus provided.
8:32
Next, we are going to add our groups.
8:36
Navigate to the bottom and click on the Add Group button.
8:40
Now enter a name for the group, but remember it can only be a max of eight characters.
8:48
For our demonstration we will call this group Process.
8:52
Now that the group has been created we are going to set some attributes. Click on the Group Attributes button.
8:59
Once opened we can assign our status, and group trigger variables from the drop-down menus provided.
9:06
For our demonstration, we have already created our variables.
9:10
We have named ours ProcessDLogStatus, but yours can be whatever you want.
9:17
Make sure, however, that you select the first word of this variable.
9:22
Next, we are going to decide how often data will be logged.
9:26
In our example, we have chosen 15 seconds.
9:34
In the Data Log Path box, we could specify a different directory for our data logging output.
9:44
By default, your data logging files will be stored in a folder with the same name as the group.
9:51
We are going to leave this blank for our demonstration.
9:54
And finally, here we can change our date and time formats if necessary.
10:00
Once completed, click on the OK button.
10:04
With our group now set up, we can begin adding variables.
10:09
Click on the Add Variable button in the right hand section of this window.
10:14
Here, we can add up to 30 different variables to suit our needs.
10:19
In this demonstration, we are interested in oven zone temperatures, So we are going to start by adding all four oven zones to our variable list.
10:42
We will also add an ovenOn variable, which tells us if the oven is on or not.
10:49
We have successfully set up periodic data logging.
10:52
Now we are going to demonstrate it on the bench.
10:56
Here we are on the bench, with our sample pizza oven interface uploaded to our controller.
11:03
For our demonstration, we have included a removable device menu, and here we can see that no files have been created.
11:12
This is because data logging has not been enabled.
11:16
When creating an interface of your own, be sure to include a button to enable data logging.
11:23
We have placed ours in this data logging menu.
11:26
Here we can also view the percentage full of both our removable device and our buffer.
11:34
Now if we return to our removable device menu, we can now see a process folder has been created.
11:41
Remember, process is the name of our group.
11:45
Inside this folder we can see a file that has already been created and named after the current date and time.
11:52
We have successfully set up data logging on our controller.
11:56
Next, we are going to demonstrate what the resulting file looks like in Microsoft Excel.
12:03
Here, we have opened the file we saw earlier in the removable device menu.
12:08
And as you can see, it has several rows of recorded data.
12:13
We have date, time, oven zone temperatures, and oven on, all recorded correctly.
12:22
Periodic data logging has been successfully set up.
12:27
Next, we are going to demonstrate how to set up triggered data logging.
12:31
Before we show you how to set up triggered data logging, first we are going to return to the bench.
12:38
Here, we have our setup from the previous demonstration.
12:42
However, we have removed the SD card.
12:46
As you can see, the process buffer is beginning to fill up.
12:50
Even without a storage device, your Horner controller will continue to log data and hold it in the buffer until a storage device is reinserted.
13:00
Just ensure that the buffer does not fill past its capacity or your data will be lost.
13:10
We are going to begin in Cscape.
13:13
Here we once again have our sample pizza oven controller, and here at either end we have sensors.
13:22
These can tell us when a pizza enters and exits the oven.
13:29
And we are going to use these to trigger a data log whenever a pizza either enters or exits the oven.
13:37
To make this work, we are going to need some logic.
13:41
Here we have a very simple logic setup.
13:44
Whenever either of these sensors are tripped, it will trigger this bit called pizza log.
13:50
From here, we are going to navigate to data logging, which is in the top right corner.
13:56
As we can see, data logging is already enabled and we have already assigned our global variables as we are still working with the same project as our previous demonstration.
14:07
Since these are already completed, we can simply create a new group.
14:13
We are going to call this group pizzas.
14:16
This name can be any you desire.
14:18
just remember that it can be no longer than 8 characters.
14:22
Next, we are going to set our group attributes.
14:26
Click on the group attributes button down on the bottom here.
14:30
In this menu, we need to assign our group status and group trigger variables.
14:37
In this demonstration, we will name our group status variable pizzaDlogStatus.
14:43
And since this should have two words, we are going to assign it a dimension of 2.
14:49
Next, down here, we are going to select Triggered Logging Only from our dropdown, and then we are going to assign our trigger variable.
15:05
If we select this dropdown menu, we can navigate to Pizza Log, which is the bit we created earlier in our logic.
15:14
Now, whenever that bit is triggered, our data logging will take a sample.
15:19
Now that our group has been set up, we can begin adding our variables.
15:25
For this demonstration, we are going to add pizzas in oven, conveyor speed, and two of the four oven zone temperatures.
15:35
This is just for testing purposes.
15:38
In your controller, you could add up to 30 variables per group.
15:43
We have now successfully set up triggered data logging.
15:47
Now, we are going to demonstrate it on the bench.
15:52
We have uploaded our project from Cscape into our controller.
15:57
Now, every time a pizza enters or exits the oven, we should have a data log occur.
16:04
So once again, we are going to navigate to the settings menu we created and click Enable Data Logging.
16:12
Since there are no pizzas currently in the oven, we should see that no data logging files have been created.
16:18
If we navigate to removable storage, we can verify that our pizzas folder has not yet been created.
16:26
Now, if we go back to our main menu, we can test if our program is working. Let’s put a pizza into the oven, and see if a data log file is created.
16:38
If we check our removable device menu, we can now see a pizza folder has been created, and Inside we have a data log file.
16:47
To demonstrate this further, we are going to put a few more pizzas into the oven and take one out.
16:55
Now we are going to move to Microsoft Excel and show you the resulting data log file.
17:04
Here in Microsoft Excel we can see we have four unique entries and they are all complete as we expected.
17:13
We have successfully set up trigger data logging on our Horner controller.
17:19
For the final segment of our webinar, we have an optional tip.
17:23
We are going to demonstrate a technique to minimize the number of files created for a data log that occurs frequently.
17:32
We are going to start by revisiting the process group, which we created in our first demonstration.
17:38
Navigate to Group Attributes and we can see that it has been set up to record data in 15 second intervals.
17:47
By default, the OCS will create a new file every hour to reduce individual file sizes.
17:55
But, if you instead prefer only one file to be created per day, we can set that up too.
18:03
First, change the data log interval from 15 seconds to triggered logging only, and we are going to create a trigger variable which triggers every 15 seconds.
18:17
For our demonstration, we have created one named dlog 15s tick.
18:24
With this setup, data will still be logged every 15 seconds, but since the group attribute is set to triggered logging only, the OCS will create only one file per day.
18:36
Remember, this technique will result in larger files.
18:41
Ensure that your media device has enough storage space for these files or data could be lost.
18:57
Okay, we are back to doing weekly webinars now.
19:00
So if you’d like to follow along every the links will be put up as they’re ready on the webinar section of the website.
19:07
I don’t see any questions for today so I think on that we can finish the first day back and just say thank you very much and we’ll see you next week.