LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Index Waveform Bug - can't index by relative Time.

The Index wfm and Get wfm subset VI have two modes of operation:
1. By index
2. By Relative Time

For Relative time - one actually has to wire the absolute time of the point desired not the time relative from the starting point of the waveform. This appears to also be true with "Get Subset".

I cannot get "Subset" to work at all - I keep getting a silly error that the Duration is not a multiple of the Dt - Who Cares? - But no data comes out.

Can I get a corrected accurate description of theses functions?

Please fix this bug!...
0 Kudos
Message 1 of 14
(4,286 Views)
Could you please post some code...I have not been able to reproduce your issue.


Regards,
-Brett
0 Kudos
Message 2 of 14
(4,276 Views)
Well, now the problem is worse, I've found a few more bugs...

When I tried to wire up an example for you -- I noticed another bug! "Generate Waveform" functions DO NOT output a valid t0 timestamp!. Example wfm timestamps are 0.000000 so of course - the index - relative time functions work.

BUG 001: So then I tried to modify the sample wfm timestamp with a timestamp of 10seconds ago - Bug is: resultant wfm timestamp still reads 0.00000??@#$!?

That code is attached.

The problem I am having is with acquired Wfm from a DAQ card - which DOES have a valid t0 timestamp. I don't have a DAQ card in this computer to acquire a valid timestamped wfm and this atribute bug won't allow me to create a valid timestamp...
0 Kudos
Message 3 of 14
(4,275 Views)
The attribute functions for waveforms are intended to add other data objects to your waveform datatype. The "value" input is a variant and accepts any data you wire to it. An example of how this should be used is shipped with LabVIEW and is named "Create Waveform Example.vi". You cannot get an attribute until you set one.

Maybe this will fix the other error that you have occuring.

Let me know
-Brett
0 Kudos
Message 4 of 14
(4,263 Views)
Brett,

Thanks for the reply. I looked at the "Create wfm example.vi" I guess it side-steps the problem of the null timestamp with the wfm generation functions.


I not really getting, t0, dt, etc are attributes of the wfm. Also it's really 2 bug issues:
1. Why are the 'generate sample wfm" functions returing a null timestamp?
2. How would one - then modify the t0 to correct this problem?

It's very clumsy to deconstuct the wfm using the "Get" and "Build" functions - Also I'm trying to extract some data for real-time analysis and this is a whopping amount of code to do something so simple! I would also suspect the "Build wfm" function would create a new copy of the entire wfm in memory - very bad for performance. My code is clocking at 60kHz.

If I acquired the data as a 1D array - the parsing would be simple - the wfm parse should be analogous, I just shake my head when I look at all the coding I have to do to get a portion of the array out. Not to mention that I am slicing part of the array out to actually do something with it! I've already used up quite alot of CPU budget, manipulating the wfm data.

I've been coding in LabVIEW for awhile - I'm not new to it. But the more I work with the wfm data type it seems clumsy and not well planned out.

This concept of the t0, dt and data is pretty simple - it seems NI has made it overly complex.
0 Kudos
Message 5 of 14
(4,261 Views)
Do not use Set Waveform Attribute. What you are doing is adding an new attribute which is different than setting the timestamp value of the waveform. The correct function to use is the Build Waveform. See the attached picture.
Message 6 of 14
(4,256 Views)
Denis,

Now that, that issue is out of the way, I can get to my original bug post.

The 'wfm subset' still does not return the correct t0 - this was my original post.
0 Kudos
Message 7 of 14
(4,247 Views)
It does seem that there is a bug in Get Waveform Subset. The section of code that is supposed to be adding an offset to t0 doesn't appear to be adding anything.
Message 8 of 14
(4,240 Views)
I agree. Though it can be easily programmed around...the SubVI as written does not seem to operate as we are expecting it to. I will show this to R&D via a report.

-Brett
Applications Engineer
National Instruments
Message 9 of 14
(4,224 Views)


I agree. Though it can be easily programmed around...the SubVI as written does not seem to operate as we are expecting it to. I will show this to R&D via a report.

-Brett
Applications Engineer
National Instruments


Either I am using this wrong, or this bug still exists in LabVIEW 8.2.1.  Can anyone shed some light on this?




CLA, CTA
0 Kudos
Message 10 of 14
(3,896 Views)