07-03-2023, 04:24 PM
I have an EWON with a BASIC script setup to FTP files back to my server. The function is as follows and runs on a ONDATE timer.
The generated file that uses the above function is differing slightly each time it is being ran.
E.g. The above script generates a file every 10 mins. I've have attached two files generated from the EWON (Converted to .txt)
[attachment=1577]
[attachment=1578]
If you look at the values, you'll see that they differ even though the timestamp is the same. This is also different from the Historical Logging file.
Can you please explain how the export block descriptor works from a timestamp perspective as the generated files timestamps also differ from the Historical logging files of each tag.
I need to ensure the data is consistent across all files as this is paramount for our energy consumption data.
Thanks in advance.
Code:
FUNCTION FtpHourlyInit()
fileName$ = ewonName$ + "_eWON_Hourly_" + @GetDateTime$() + ".csv"
exportRequirements$ = "[$dtHT $ftT $st_m60 $et_s0 $in60]"
PUTFTP fileName$, exportRequirements$
//PRINT "FTP Hourly Sent"
ENDFN
Code:
ONDATE 1, "*/10 * * * *", "@FtpHourlyInit()" //Execute every 10 minutes
The generated file that uses the above function is differing slightly each time it is being ran.
E.g. The above script generates a file every 10 mins. I've have attached two files generated from the EWON (Converted to .txt)
[attachment=1577]
[attachment=1578]
If you look at the values, you'll see that they differ even though the timestamp is the same. This is also different from the Historical Logging file.
Can you please explain how the export block descriptor works from a timestamp perspective as the generated files timestamps also differ from the Historical logging files of each tag.
I need to ensure the data is consistent across all files as this is paramount for our energy consumption data.
Thanks in advance.