07-17-2023 06:13 PM - edited 07-17-2023 06:13 PM
Hi,
I'm going to do a drift analysis to some current values (sleep/load).
Therefore I will look over the values of a day and filter for special temperatures.
Afterwards there's a mean calculation and I will save the day in a Time channel and the value in a data channel.
Is there any better solution for this or does this seem ok? Values I get are valid but it seems not that elegant.
So my solution works fine for one day and one device.
Is there a possibility to look over all files in a root folder and get only the data analized, which belongs to one device?
Maximum number of devices is 6.
folder strucure is like this:
Root
- 20230701 (day 1)
- device 1
...
- device 6
- 20230701 (day 2)
- device 1
...
- device 6
- 20230701 (day 3)
- device 1
...
- device 6
- 20230701 (day 4)
- device 1
...
- device 6
- 20230701 (day 5)
- device 1
...
- device 6
in each device folder there is one file and there is much data that isn't needed.
I only need 4 channel groups out of 16 in each file but they shouldn't be deleted because they could be needed for other calculations.
Is there a possibility to walk through the devices and to the calculation to it and go on with the next?
I need the means of all 6 devices for about 3 months so at the end 90 times and 90 mean values in the result channel for each device.
As mentioned I already have it working for one day, but loading the data seems not that easy to me or am I wrong on this point?
Thanks in advance for your help.
Regards
Thorsten
Solved! Go to Solution.
07-20-2023 02:37 AM - edited 07-20-2023 02:42 AM
Hi TLG90
I would suggest you use scripting in python or vbs to carry out your task. This is a very typical task which is often required. I've copied some python lines below from a similar script I've used with amendments to assist your task which you might find useful.
07-20-2023 05:47 PM
Thanks for your suggestions and script.
I guess I have to do it with the os library.
This will help me to go further.
Thanks again