02-13-2012 08:45 AM
ok, this config produces data that has timestamp issues. it generates blocks of 10 identical timestamps per iteration.
02-13-2012 09:55 AM
I don't see any timestamps generated. All I see is an array of DBLs. Given that you did not include the subVI, I have no idea what those values are supposed to mean. You previously uploaded a VI called "Example Sub VI", but given that if I open that one, the "Example 3" shows a need to relink, it tells me, that the "Example Sub VI" was changed somehow.
02-13-2012 10:34 AM
I didn't change anything that i know of. really, the only thing in the sub vi are math nodes. add, subtract, multiply...
example 3 is just a small sample of a larger program. it is quite posible that these problems are generated outside the scope of the example. upon further investigation, the timestamps look like attached. I am still wondering if a queue would work better, eliminating the need for the for loop. I went with the for loop b/c I thought it would be hassle free.
02-13-2012 10:46 AM
Since you are not creating an actual Excel file, do not give it an xlsx extension. It's just confusing.
Why do you think there should be any valid timestamps inside any file you write since you are not passing any valid timestamps to the write file function. As already mentioned, you have an array of DBL. That is much different than the dynamic data you start with and then strip of all time information.
If you are going to play with (evil) dynamic data, leave it alone and don't convert back and forth to other data types. You don't understand what the conversions are doing.
02-13-2012 11:19 AM
so what would the easiest way be to retain timestamps?
the xlsx format is due to post processing. the tdms file is called, converted to excel 2010 and then it calls a macro. so after testing, all results are in excel. everything worked peachy until I had to add in the subvi that scales the measurement to temp. LV does not provide scaling for this particular device.
02-13-2012 11:21 AM
would using daq mx and getting a dbl output work?
the express vi only outputs dynamic.
02-13-2012 11:39 AM
Getting a DBL will not work. That is what you have now. The only things that have timestamp information is dynamic or waveform data types. I avoid dynamic data but you can certainly perform any math function you want on a waveformdynamic data - without that silly conversion and for loop and autoindexing the array. Your code is already doing it with the two add functions so I don't see why you thought you needed to convert from dynamic data in the first place.
02-13-2012 11:44 AM
right. I could pull everything out of the sub vi. it just takes up a lot of space. that would be the easy solution. i was hoping to keep the subvi w/o having too much trouble. In addition, keeping it in a sub vi would allow me to drop this code into an automated program. that program is considerably more involved and resizing everything would be PITA
02-13-2012 11:54 AM - edited 02-13-2012 11:55 AM
That comment makes no sense. There is nothing that I said that would require you to pull anything out of a subVI. What I said was that it was silly to convert from dynamic data to a DBL array and then convert element by element inside a for loop. Pass the subVI the waveform data type. Wire your numeric functions directly to the waveform. They operate on arrays as you are already doing.
02-13-2012 12:19 PM
I understand that the dynamic data and waveform datatypes can be wired to math nodes. the reason that the math nodes are in the sub vi to begin with is that it takes up a little more than a full screen to do the math. it is real-estate intensive. on other projects, LV scales things like thermocouples and RTDs for you. so I wired up my program with dynamic data from the express vi to the write to file vi. worked fine. this new project requires custom scaling. I contained it in this sub vi. the sub vi is causing problems. maybe i am not clearly articulating the problem.