Log 250 byte string to ftp 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: Log 250 byte string to ftp file (/showthread.php?tid=4350) |
Log 250 byte string to ftp file - Rauschentofft - 04.11.2022 Hi. I want to log 250 byte string to ftp file. And i also want to know how to calculate the time differrence of two 250 byte string. See picture. Br MR RE: Log 250 byte string to ftp file - admin - 04.11.2022 There are many CSV/FTP examples on the forum. There's also example on our website: https://openrb.com/example-export-last-hour-csv-object-log-file-to-external-ftp-server-from-lm2/ As for the difference calculation it should be done on numeric values not on the strings that are formatted using the numeric values. Then you can simply subtract one value from another. RE: Log 250 byte string to ftp file - Rauschentofft - 04.11.2022 Okej, then i look it up. If i understand it right about the difference. Then i should compare the values before i convert it to string? My script is done to log "on" value 1/1/1 and then add it to total value 1/1/2. Total value shows "on" time in: year, month, week, days, h, m, s. Br MR RE: Log 250 byte string to ftp file - admin - 07.11.2022 Any calculations should be done on numeric values. If you have date/time string you will to convert it back to a number before doing any calculations. RE: Log 250 byte string to ftp file - Rauschentofft - 07.11.2022 I don´t know how to convert it to numeric. Could you help me with this? RE: Log 250 byte string to ftp file - admin - 07.11.2022 Please describe exactly what do you want to compare and post the code that you use. Most likely you already have a numeric value before it's converted to a formatted string that is written to 250 byte object. RE: Log 250 byte string to ftp file - Rauschentofft - 07.11.2022 I use this script. I have four timers an i want to compare two. Total time 7/0/4 and 7/0/14. Code: ----------Timer for group 7/0/1 --------------- RE: Log 250 byte string to ftp file - admin - 08.11.2022 Modify storage keys and output address as needed: Code: key_total_1 = 'ontime_total_1' RE: Log 250 byte string to ftp file - Rauschentofft - 08.11.2022 Thanks alot for the help. Br MR |