Datalog Function - Regular Save
Regular Save refers to saving data at main task interval or a set interval. Data is saved at the interval without considering the status of the data. This method is most useful for collecting data at fixed intervals. Datalog functionality works with %M, %I, %Q, %U, %K or %F addresses and variables that reference them.

-
The scan interval save method saves the data after the end of the main task cycle.
-
The data collection is accumulated in the motion controller’s internal buffer.
-
When a certain amount of data is stored, the data will be saved into SD memory.
-
If the set interval is too short or the data to collect is too large, a scan watchdog timer error may occur and the XMC will go to STOP mode.

After configuring a regular save datalog, The datalog needs to be enabled in the project code if not using auto logging.
-
Each of the 16 available datalogs has its own enable flag.
-
If you want to use auto logging, follow section 3 first then proceed to section 4.
Variable Name | Memory Address | Data Type | Description |
---|---|---|---|
_DL00_Enable | %KX8224 | BOOL | Group 00 Enable Flag 1: Operation, 0: Stop |
_DL01_Enable | %KX8225 | BOOL | Group 01 Enable Flag 1: Operation, 0: Stop |
_DL02_Enable | %KX8226 | BOOL | Group 02 Enable Flag 1: Operation, 0: Stop |
_DL03_Enable | %KX8227 | BOOL | Group 03 Enable Flag 1: Operation, 0: Stop |
_DL04_Enable | %KX8228 | BOOL | Group 04 Enable Flag 1: Operation, 0: Stop |
_DL05_Enable | %KX8229 | BOOL | Group 05 Enable Flag 1: Operation, 0: Stop |
_DL06_Enable | %KX8230 | BOOL | Group 06 Enable Flag 1: Operation, 0: Stop |
_DL07_Enable | %KX8231 | BOOL | Group 07 Enable Flag 1: Operation, 0: Stop |
_DL08_Enable | %KX8232 | BOOL | Group 08 Enable Flag 1: Operation, 0: Stop |
_DL09_Enable | %KX8233 | BOOL | Group 09 Enable Flag 1: Operation, 0: Stop |
_DL10_Enable | %KX8234 | BOOL | Group 10 Enable Flag 1: Operation, 0: Stop |
_DL11_Enable | %KX8235 | BOOL | Group 11 Enable Flag 1: Operation, 0: Stop |
_DL12_Enable | %KX8236 | BOOL | Group 12 Enable Flag 1: Operation, 0: Stop |
_DL13_Enable | %KX8237 | BOOL | Group 13 Enable Flag 1: Operation, 0: Stop |
_DL14_Enable | %KX8238 | BOOL | Group 14 Enable Flag 1: Operation, 0: Stop |
_DL15_Enable | %KX8239 | BOOL | Group 15 Enable Flag 1: Operation, 0: Stop |

Note: This example shows configuring Datalog Group 0. Other groups can be configured in the same manner.
Step | Action |
---|---|
1 |
In the Project window, double-click on Internal Parameter è Data Log.
|
2 |
Set Group Settings value to Use to allow Group 0 to be used for datalog functionality.
|
3 |
Double-click on the Data collection mode entry to configure the saving method.
|
4 |
Select Data logging (General) and Configure the logging to use the desired method of saving data. Press OK when done. Event Based Saving: Saves data at every time event that is configured.
Time Interval: Saves data at the time interval configured.
Main Task: Saves data at the main task interval time.
|
5 |
Double-click on the Save Settings entry to configure the save settings. Press OK when done.
|
6 |
Configure Buffer size to determine how much data is accumulated before it is written to the CSV file.
|
7 |
Setup the Data 0 section to add a datapoint to the datalog function. There are 64 datapoints available to be logged. This example will just show configuring Data 0.
|
8 |
Double-click in the Device area of Data 0 to choose variable to log. This variable must have a %M, %I, %Q, %U, %K or %F address to be used in the datalog functionality.
|
9 |
Choose your variable that has a supported memory address. This example shows a global UDINT variable with a %MD address.
|
10 |
Add program code to enable or disable _DL00_Enable to control the datalog Group 0 if not using auto data logging. Skip to step 11 if using auto logging.
|
11 |
After completing the data logging, the log files will be saved in XMC-E08A\MAC<macaddress>\LOG\GROUP00 directory of the SD memory card.
|
LM307