05-06-2013 04:34 AM
Hi everyone,
I've just started learning with Labview in my new Job, pretty much learning by myself.
And my first "assignment" is to analyze data that looks like this(in a text file):
2013-04-09T08:13:30.000 324 Ihc 877.201554E-3
2013-04-09T08:13:30.000 324 Vhc 660.746743E-3
2013-04-09T08:15:00.000 262 Iho 614.054623E-3
2013-04-09T08:15:00.000 262 Vho 461.903473E-3
2013-04-09T08:16:30.000 277 Vhc 660.323204E-3
2013-04-09T08:16:30.000 277 Ihc 877.715994E-3
which will be calculated later, but right now i'm trying to get the data calculatable.
My first idea was to put it in an array, but i haven't managed to do it yet, and i'm thinking it might not be the best format to work with later.
I've attached the VI i've been working on, though it's clear to me why it won't work, and it probably isn't the best soloution.
05-06-2013 04:54 AM
Hello,
We need your sub-vi filelinenumberv2 to run the program.
If i have well understood :
you want to get the 877.201554E-3, 660.746743E-3, ... in a tab ?
05-06-2013 05:06 AM
sorry, i forgot that
but i think that my whole approach to the programm is wrong.
I need to have the data of each line in a cluster, so i can calculate the time(the timestamp + delay) and the Power (Ihc*Vhc or Iho*Vho)
out of that i will have to make a graph
05-06-2013 05:26 AM - edited 05-06-2013 05:28 AM
Why don't you read from text file so you will get a 2D array but of strings
Index your 2D array into 1D arrays and typecast them to the correct type (time, dbl,...)
Keep you 1D array of timings
Bring other 1D arrays of data into a for loop with autoindexing ON
Do your calculations inside the forloop for every row
Bring the result of the calculations back out of the for loop. => 1D array of calculations
=> 2 1D array => create graph
If that is what you're trying to achieve...