I have been playing around with the new V7 firmware to try and overcome the issue of not knowing if the FTP 'push' of a file was successful.
Short story: It seems to work using the new 29SV variable in a simple alarm. I figured that every value below 0 for 29SV was bad and everything 0 or higher was OK, so used a simple regular alarm test every logging scan.
If the last FTP attempt was OK or one was in progress, nothing extra happens. If the last FTP attempt failed, then try again, So the code below should work for a typical task. Scanning and logging every 10 minutes, then FTP a data file at midnight.
If the network was unavailable or the transmission failed at midnight, the alarm in schedule A will cause a retry every 10 minutes until successful.
BEGIN"JOB1"
RA"Scanning"10M LOGONA
1TK("Ambient")
ALARM(29SV<0.0000){[XB]}
29SV("FTP Condition")
RBX LOGONB GB
DO{ARCHIVEA "ftp://username:password@host-IP/pathname/"} RC1D LOGONC GC DO{ARCHIVEA "ftp://username:password@host-IP/pathname/"}
END
Obviously you should adjust files sizes etc to be the minimum required and you may want to tweak the schedules and alarms to give you more information, but for my immediate task this is fine. If it worked, do it again tomorrow.
If it didn't work, keep trying every 10 minutes until it works. Has been tested for concept and basic performance, pulled the Ethernet cable out during a transfer, before alarms etc. Always transferred the file once the network was available again. I'm almost excited!
SuperMono
I have been playing around with the new V7 firmware to try and overcome the issue of not knowing if the FTP 'push' of a file was successful.
Short story: It seems to work using the new 29SV variable in a simple alarm. I figured that every value below 0 for 29SV was bad and everything 0 or higher was OK, so used a simple regular alarm test every logging scan.
If the last FTP attempt was OK or one was in progress, nothing extra happens. If the last FTP attempt failed, then try again, So the code below should work for a typical task. Scanning and logging every 10 minutes, then FTP a data file at midnight.
If the network was unavailable or the transmission failed at midnight, the alarm in schedule A will cause a retry every 10 minutes until successful.
````
BEGIN"JOB1"
RA"Scanning"10M LOGONA
1TK("Ambient")
ALARM(29SV<0.0000){[XB]}
29SV("FTP Condition")
RBX LOGONB GB
DO{ARCHIVEA "ftp://username:password@host-IP/pathname/"} RC1D LOGONC GC DO{ARCHIVEA "ftp://username:password@host-IP/pathname/"}
END
````
Obviously you should adjust files sizes etc to be the minimum required and you may want to tweak the schedules and alarms to give you more information, but for my immediate task this is fine. If it worked, do it again tomorrow.
If it didn't work, keep trying every 10 minutes until it works. Has been tested for concept and basic performance, pulled the Ethernet cable out during a transfer, before alarms etc. Always transferred the file once the network was available again. I'm almost excited!
SuperMono