Logic Machine Forum
export data on net csv file - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: export data on net csv file (/showthread.php?tid=3399)



export data on net csv file - Frank68 - 03.06.2021

Hello

I would like to know if it is possible to export energy meter data in the following paths.

  • A csv file on the network
  • A csv file in the local FTP folder

using script

Thank you


RE: export data on net csv file - admin - 03.06.2021

See this: https://openrb.com/example-export-last-hour-csv-object-log-file-to-external-ftp-server-from-lm2/


RE: export data on net csv file - Frank68 - 03.06.2021

(03.06.2021, 06:25)admin Wrote: See this: https://openrb.com/example-export-last-hour-csv-object-log-file-to-external-ftp-server-from-lm2/

If I don't have an FTP server but only a network path, can I write to a non-FPT server directory?

thank you very much


RE: export data on net csv file - admin - 03.06.2021

Do you mean a Windows shared network folder? If so then it's not supported.


RE: export data on net csv file - Frank68 - 04.06.2021

(03.06.2021, 06:33)admin Wrote: Do you mean a Windows shared network folder? If so then it's not supported.

Hello

I tried to follow the instructions of the example, to use internal FTP, I would like to mix the 2 possibilities, the first script takes the values from a csv buffer, while later there is the possibility to choose the data to put in the table, how do I tell the first script to fetch the data from the table table (it is possible to display them with a bank for each entry).
In the example there is also a scrip to clean the data older than 60 days (I guess in the ftp folder).
Does the storage table clean itself automatically when it is written to the file or do I need to add a command?

Thanks so much for the support


RE: export data on net csv file - admin - 04.06.2021

You have manually clear it by calling storage.delete('key_name')


RE: export data on net csv file - Frank68 - 04.06.2021

(04.06.2021, 07:42)admin Wrote: You have manually clear it by calling storage.delete('key_name')

OK

I have seen how to delete old files in FTP

In the example script the log data is stored in the CSV, but I should use the data that I have stored in the "MyPowerLog" table which I will then go to cancellaer at the end of the export, so as not to fill the memory with very old data.

Thanks in advance