LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble using Sample Compression VI in LabView

When I run my VI which includes the sample compression sub VI, I get no errors however I get no output onto the graph I am plotting to. WHen I take out the sample compression sub VI, my uncompressed data plots fine.
0 Kudos
Message 1 of 5
(3,072 Views)
Can you post your program?

Thanks,
Randall Pursley
0 Kudos
Message 2 of 5
(3,055 Views)
Hi Tim!

I second Randall's request! It would help to see what you are referring to as your "compression vi."

Thanks Tim!

Travis H.
National Instruments
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 5
(3,042 Views)
Hello rpursley8 and Travis, thank you for your replies.

I have managed to get my data plotting using the sample compression sub VI. The reason I had no data showing up in my plot was that my input to the compression was a series of data points, so when it compresses 1 point by a factor of 10 I got zero points. So obviously nothing showed up on the plot and there were no errors. I had to change my input to a waveform format where the data was interpreted as a group of points it could compress and still be left with data to plot.

I do have one question for you. I have my data plotting, and I am trying to plot it vs degrees. It is a radiation pattern of an antenna I am working on. So I would plot the voltage data (which is turned into the original power levels in dB by a ratio given to me by the receiver I am using) vs degrees ranging from -90 to +90. Into the graph I have both of these sets of data. Ok..now to the problem:) When I plot, the voltage data only covers from -90 to -80. I am not sure why it is doing this. I thought it was because I am compressing the points so there are not as many, so I need to space them out by the same factor as I am compressing them. I tried this but it didnt change anything.

I have attached the VI. If you could help me out that would be great.
0 Kudos
Message 4 of 5
(3,037 Views)
The reason is that you are generating 2489 steps between -90 and 90, which is also how many point you originally acquire, but you reduce this number by whatever factor you enter into the sample compression, in this case 21. Therefore, you need to reduce the number of step between -90 and 90 by the same factor.

I'm not exactly sure what you are doing, but if you don't need that many points, why do you acquire so many to begin with? Maybe you need to average to get a good signal. Also, if you are only really concerned about related the magnitudes to the degrees, then you should just feed the Y part of your waveform into the Sample Compression.
Randall Pursley
0 Kudos
Message 5 of 5
(3,032 Views)