macro_command main()
short data_log_number = 1, year, month , day , index
short success,tt,tt1
tt=0
tt1=1
SetData(tt, "本机 触摸屏", LW, 105, 1)
GetData(year, "本机 触摸屏", LW, 110, 1)
GetData(month, "本机 触摸屏", LW, 111, 1)
GetData(day, "本机 触摸屏", LW, 112, 1)
// 若存在一数据取样文件20101210.dtl,其数据取样编号为1,档案索引为2
// 则success == 1,index == 2
success = FindDataSamplingIndex (data_log_number, year, month, day, index)
if success==1 then
SetData(index, "本机 触摸屏", LW, 100, 1)
end if
if success<>1 then
SetData(tt1, "本机 触摸屏", LW, 105, 1)
end if
end macro_command