04-14-2015 07:36 PM
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?
04-14-2015 08:01 PM
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.
04-14-2015 08:57 PM
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.
04-14-2015 09:16 PM
04-14-2015 09:31 PM
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.
04-14-2015 09:37 PM
04-15-2015 11:35 AM
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