DataDiSaveToCsv function saves basic data of DI tags in csv format.
int @DataDiSaveToCsv(string tag, int timeType, int year, int month, int day, int hour, int minute, string path, int count, string noDataString);
Parameters
tag : DI tag name
timeType: 0 - minute data, 1 - time data
year : year
month : month
day : day
hour : hour
minute : minute
path : csv file storage path
count : Number of data to be stored
noDataString : No data replacement string
return value
Normal save if return value is 1, error if -1
Example 1
@DataDiSaveToCsv("DI_0000",0, 2024,12,14,0,0,"C:\\CATDATA\\DI_0000_Min_20241214.csv", 60*24,"*");
Description: 60*24 (day's worth) data of DI_0000 digital tag will be stored in the path 'C:\CATDATA\DI_0000_Min_20241214.csv' from 00:0:00 on December 14, 2024.
If there is no data, fill it in as * and save it.
Version Information
Supported Version: 10.3.6.25 or later
Related Helps)