The DataDiSaveToCsv2 function saves the basic data of the AI tag in CSV format from the start time at the specified data intervals.
int @DataAiSaveToCsv2(string tag, int timeType, int year, int month, int day, int hour, int minute, string path, int count, int dataGap, string noDataString);
ÇÔ¼öÀÎÀÚ
tag : name of AI Tag
timeType : 0 - minute data, 1 - hour data
year
month
day
hour
minute
path : csv filePath
count : data count to save
dataGap
noDataString : No data alternative string
return value
If the return value is 1, it is saved successfully; if it is -1, there is an error.
Example
@DataAiSaveToCsv2("AI_0000",0, 2025,11,11,0,0,"C:\\CATDATA\\AI_0000_Min_20251111.csv", 30, 2,"*");
Description :
Save 30 data points from the digital tag AI_0000 from 00:00 on November 11, 2025, at 2-minute intervals to the path 'C:\CATDATA\AI_0000_Min_20251111.csv'. If data is not available, record it with *.
Version Information
Supported Version: 10.3.7.6 or later
Related Helps