LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Grabbing an array of y's from a waveform

Hello, I'm trying to take a waveform from an oscilloscope and grab the array of ys. I will then progress through each index of the array to send the point over a TCP port to a Java program. My current program grabs the waveform currently from the oscilloscope but does not increment through the array. Does anyone have any advice on why it is not working?

 

 

 

Untitled.png

0 Kudos
Message 1 of 7
(2,765 Views)

Maybe you are stuck at the listener? If you probe "i" what do you see? Also, you should move the unbundle waveform outside (to the left) of the loop and wire the array into a for loop which will autoindex for you.

0 Kudos
Message 2 of 7
(2,755 Views)

When I move the unbundle waveform, I try to view the array with an indicator and I get values that are always negative, no matter what signal. The increment for the array is working, but the unbundling of the waveform seems to mess up.

0 Kudos
Message 3 of 7
(2,740 Views)
You should be seeing exactly the same values that are on your graph. I don't see the point of a couple of case statements. Why don't you use just one? The sequence structure is not necessary. I agree that you should use a for loop with the y array?
0 Kudos
Message 4 of 7
(2,724 Views)

I just realized the useless pair of case statements, I switched to the for loop and although it increments, the value I get from the index stays the same. Whenever I check the array immediately after the unbundle, it lists 100s of indexes with the same value. The signal on the oscilloscope is a simple sin wave.

0 Kudos
Message 5 of 7
(2,711 Views)
You don't use an index array when you pass in an array from outside the loop. It's called auto-indexing and is a basic feature of LabVIEW.
0 Kudos
Message 6 of 7
(2,705 Views)

 

Hello Ryliu,

 

As Dennis says, I do recommend you to look for auto-indexing elements into an array on the output of a loop. For this you can look into the following links. I also advise you to take a look on a producer-consumer architecture for adquiring and sending data through the TCP port.

 

https://decibel.ni.com/content/docs/DOC-20828

http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/auto_indexing_1/

 

 

Regards,

 

David M.

National Instruments 

 

 

0 Kudos
Message 7 of 7
(2,645 Views)