LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph Questions...

Hi,
I'm trying to capture an image from an oscilloscope (Screen Dump), the image is transferred as a array of 520(X-values) & 256 (Y-values), it's an black & white image so for every X-value Y is either 0 or the row number..
When I try to visualize the image in LV using a graph there are 256 different lines .
What I would like to do is to give all these lines the
same color and get rid of the lines they draw between 2 following points. I can do this in the properties section of a graph but there I have to change the settings of every individual line, Is It possible to change the parameters of all the lines at once??
0 Kudos
Message 1 of 6
(2,912 Views)
You data is an image (x,y,z), thus if you want to display it natively, you should use an intensity graph (don't forget to set your y scale to 0..1).

If you want to use a a waveform graph you should convert your data into a 1D array where the array index is the column number and the values are the row indices of the nonzero elements.
0 Kudos
Message 2 of 6
(2,912 Views)
While your description is not entirely clear, I assumed that you have a 2D array (520x256) where in each column there is exactly one nonzero element. The index of that element is the y position you want to graph for each column.

Attached is a quick example (LabVIEW 6.1) how to graph this on either an intensity graph or a waveform graph. The waveform graph is highly preferred.

If this is not the solution you need, please clarify how your raw data looks like.
0 Kudos
Message 3 of 6
(2,912 Views)
I will try to make things clear.
The scope I use is a digitizing scope; it is a sort of storage scope with variable persistence. Say you use a waveform generator with a little drift in phase and amplitude to generate a sinwave, if you visualize this on the scope with persistence turned on you will
see a single sinwave the first sweep, but as the sinwave changes a bit in phase and amplitude the next sweep the sinwave will have changed place, because of the persistence you will see the sinwave of the first and the second sweep together and so on ...
Thus for every x-value in the image there will likely be more than one Y-value.
The image is transferred in (16384)bytes, the first 64 bytes (X-axis has 512 pixels = 64bytes) represent the upper pixel row
of the image. There are 256 pixel rows for the Y-axis so there is a total of 64 bytes x 256 = 16384 bytes.

I managed to get this data and putted it in an array.
I know the array is correct cause I succesfully
made a graph of it in Matlab and Excel.

Hope this information helps,

Tx
0 Kudos
Message 4 of 6
(2,912 Views)
OK, in this case an intensity graph seems to be the right thing but there is a small complication.
Since each byte contains 8 pixels, you need to expand each byte into 8 bytes.
Easiest would be to typecast it into a boolean array using "4.x mode" (very important!), then use "boolean to 0,1) to convert it to the final array.


(you might need to transpose the array or flip an axis to make it upright).

I have attached a small demo (LabVIEW 7.0) on how to do this.
0 Kudos
Message 5 of 6
(2,912 Views)
Great solution Tx.
My idea was far more complex, I splitted every byte into the corresponding bits. Analysed the seperate bits and putted the corresponding Y-value into the right place in a 2dim array.
0 Kudos
Message 6 of 6
(2,912 Views)