Support Forums
Daily upload other than midnight

Hello, I've got a client who requires their DT80 to upload one day's worth of data daily at 6am. I've come up with a solution, but wondered if there's a better way to do it. My solution (use time based alarm to trigger upload, retry half-hourly on failure) is as follows:

RA"Take readings"
   .
   .
   .

RB"FTP"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)X
   LOGOFFB

  'User defined
  DO{COPYD sched=A id=100 start=new dest=ftp://foo:bar@ftp.etc.etc/DATATAKER/LOGGERNAME/}

RC"FTP_Trigger"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)6H
    LOGONC

  'User defined
  IF(T><05:50,6:10){XB}

RD"FTP_Retry"("b:",ALARMS:OV:100KB:W60,DATA:OV:200KB)30M
    LOGOND

  'User defined
  IF(29SV(LM,"FTP status")<0){XB}

(As you might be able to tell, this was created through the new web interface, and seems to do what it's supposed to.) If there's a more elegant solution, I'd appreciate knowing about it.

However, I couldn't find any information on this in the manual or the FAQ, so thought that others might wish to know of this rather hacky workaround.

Also, I'm pretty sure it's not currently possible, but if someone knows a way to create timestamped files with a non standard name (i.e. something like LOGGERNAME_20110103_215400.CSV rather than 068_20110103T215400.CSV), I'd be grateful.

Thanks,
Bruce.

Hello, I&#039;ve got a client who requires their DT80 to upload one day&#039;s worth of data daily at 6am. I&#039;ve come up with a solution, but wondered if there&#039;s a better way to do it. My solution (use time based alarm to trigger upload, retry half-hourly on failure) is as follows: ```` RA&quot;Take readings&quot; . . . RB&quot;FTP&quot;(&quot;b:&quot;,ALARMS:OV:100KB:W60,DATA:OV:1MB)X LOGOFFB &#039;User defined DO{COPYD sched=A id=100 start=new dest=ftp://foo:bar@ftp.etc.etc/DATATAKER/LOGGERNAME/} RC&quot;FTP_Trigger&quot;(&quot;b:&quot;,ALARMS:OV:100KB:W60,DATA:OV:1MB)6H LOGONC &#039;User defined IF(T&gt;&lt;05:50,6:10){XB} RD&quot;FTP_Retry&quot;(&quot;b:&quot;,ALARMS:OV:100KB:W60,DATA:OV:200KB)30M LOGOND &#039;User defined IF(29SV(LM,&quot;FTP status&quot;)&lt;0){XB} ```` (As you might be able to tell, this was created through the new web interface, and seems to do what it&#039;s supposed to.) If there&#039;s a more elegant solution, I&#039;d appreciate knowing about it. However, I couldn&#039;t find any information on this in the manual or the FAQ, so thought that others might wish to know of this rather hacky workaround. Also, I&#039;m pretty sure it&#039;s not currently possible, but if someone knows a way to create timestamped files with a non standard name (i.e. something like LOGGERNAME_20110103_215400.CSV rather than 068_20110103T215400.CSV), I&#039;d be grateful. Thanks, Bruce.

Good morning Bruce,

That how I would run a 6 am report. It's basically the technique shown in our FAQ's as use by weather stations for the 9 am. You can do a custom time date stamp but it is a bit fiddly.

Note: In dEX you will need to use manual channels.

BEGIN
1$="LoggerName"
RA15M
1ST(=1CV) 'Save seconds to 1CV
2ST(=2CV) 'Save minutes to 2CV
3ST(=3CV) 'Save hours to 3CV
20SV(=4CV) 'Save day of month to 4CV
21SV(=5CV) 'Save month of year to 5CV
22SV(=6CV) 'Save Year to 6CV
DO{COPYD sched=A id=100 start=new dest=ftp://foo:bar@ftp.etc.etc/DATATAKER/?(1$)?(6CV}?(5CV)?(4CV)_?(3CV)?(2CV)?(1CV).CSV}
END

Cheers,
Roger

Good morning Bruce, That how I would run a 6 am report. It&#039;s basically the technique shown in our FAQ&#039;s as use by weather stations for the 9 am. You can do a custom time date stamp but it is a bit fiddly. Note: In dEX you will need to use manual channels. ```` BEGIN 1$=&quot;LoggerName&quot; RA15M 1ST(=1CV) &#039;Save seconds to 1CV 2ST(=2CV) &#039;Save minutes to 2CV 3ST(=3CV) &#039;Save hours to 3CV 20SV(=4CV) &#039;Save day of month to 4CV 21SV(=5CV) &#039;Save month of year to 5CV 22SV(=6CV) &#039;Save Year to 6CV DO{COPYD sched=A id=100 start=new dest=ftp://foo:bar@ftp.etc.etc/DATATAKER/?(1$)?(6CV}?(5CV)?(4CV)_?(3CV)?(2CV)?(1CV).CSV} END ```` Cheers, Roger

As Roger hinted above, with version 8.08 firmware, you can now insert special sequences in the destination path or filename, which will be replaced when the unload is performed.

For example ?(1CV) will be replaced by the value of 1CV, and ?(timestamp) will be replaced by the time of the unload. This feature is not documented in the latest user manual, you need to refer to the version 8.08 release notes for details.

So a simpler alternative would be:

COPYD dest=ftp://foo:bar@ftp.etc.etc/LOGGERNAME_?(timestamp).csv

which will produce a file called LOGGERNAME_20110205T123456.csv.

As for the FTP retry, the technique you have is basically correct (see also user manual rev B3, page 100)

Note that with 8.08 firmware, all FTP unloads are automatically retried 3 times, with 60 s between each attempt. If all three attempts fail then the unload is abandoned, in which case the data will be included in tomorrow's unload. If this level of retry is adequate then you don't need to check 29SV in your program.

Cheers,
Jeremy

As Roger hinted above, with version 8.08 firmware, you can now insert special sequences in the destination path or filename, which will be replaced when the unload is performed. For example ?(1CV) will be replaced by the value of 1CV, and ?(timestamp) will be replaced by the time of the unload. This feature is not documented in the latest user manual, you need to refer to the version 8.08 release notes for details. So a simpler alternative would be: ```` COPYD dest=ftp://foo:bar@ftp.etc.etc/LOGGERNAME_?(timestamp).csv ```` which will produce a file called LOGGERNAME_20110205T123456.csv. As for the FTP retry, the technique you have is basically correct (see also user manual rev B3, page 100) Note that with 8.08 firmware, all FTP unloads are automatically retried 3 times, with 60 s between each attempt. If all three attempts fail then the unload is abandoned, in which case the data will be included in tomorrow&#039;s unload. If this level of retry is adequate then you don&#039;t need to check 29SV in your program. Cheers, Jeremy

Thanks Roger and Jeremy,

As an update, I wasn't able to access these systems for some time, but I've now re-done the filenames as recommended by Jeremy, and the client seems to be happy with it.

Thanks Roger and Jeremy, As an update, I wasn&#039;t able to access these systems for some time, but I&#039;ve now re-done the filenames as recommended by Jeremy, and the client seems to be happy with it.
49
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft