Flexy occasionally sending all historical data

I have a number of eWon Flexy 2XX’s on site recording data from mostly Modbus tags. I’ve written a basic IDE script which wraps the data up into a text file and sends back to our server via FTP every 15 minutes. The IDE script is set to only send the data since the last export and this has been working well when if the signal drops out or we loose connection for a while.
However, every now and again (1-10 days) the Flexy sends a huge file containing all the historical data despite having sent data 15 minutes prior - this inevitably slows down our parser as the files can contain over 1m data points.

Has anyone got an idea why this is happening?
I’ve tried moving the $ut block discriptor around but get the same result each time.

The Basic IDE script is as follows:

ONDATE 1, “*/15 * * * *”, “GOTO SendData”
// Starts a counter for sending the data. Uses Cron type time stamp

SendData:
T$ = Time$
year$ = T$(7 To 10)
mon$ = T$(4 To 5)
date$ = T$(1 To 2)
hour$ = T$(12 To 13)
min$ = T$(15 To 16)
sec$ = T$(18 To 19)
//Breaks down the current time into sections.
A$=“SiteNameData”+T$(1 To 2)+"-"+T$(4 To 5)+"-"+T$(7 To 10)+"-"+T$(12 To 13)+T$(15 To 16)+T$(18 To 19)+".txt"

PUTFTP A$,"[$dtHT$ftT$stL$et_0$ut]"
//Puts the FTP data onto the server with the filename (A$)
//$dtHT - Data Table
//$ftT - File Type = Text, $ftH = HTML, etc
//$stL - Start time = Last time data was sent
//$et_0 - End time = Now
//$ut - updates the internal memory saying what time the export was last run
END

My guess is that the internal memory to track when last ran is not being retentive.

What about putting last ran into a memory tag and then using that to build the ebd

1 Like