LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display all four channels waveform of TDS 3024B Oscilloscope in a Graph?

I am currently working on acquiring all four channels waveform in TDS 3024B Oscilloscope. I am able to acquire 2 using one of the examples that I found under "find examples" that too is not continuous waveform. Also, any idea on how I can simulate zoom function as well.

0 Kudos
Message 1 of 13
(702 Views)

I don't have your 3000 series VIs installed, but most TDS drivers have a READ VI that is polymorphic.  Find the place where the read is done and you should find something like this:

NIquist_0-1715957315994.png

It's probably set to Multiple already if you are reading two channels.  Just expand the Channels array and add channels 3 and 4.

 

For zooming in a LabVIEW graph, why not just use the built-in zoom?  Right-click the graph, Visible Items > Graph Palette.

NIquist_1-1715957582347.png

The little magnifying glass icon has the various zoom functions.

 

EDIT: You will probably have to also make changes to the way the waveforms are sent to the graph if you add channels, but it might just work depending on how the example is coded.  If you have issues, post the code you are using...

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 2 of 13
(659 Views)

tan0709_0-1716187247447.png

This is the example code that I am using to get 2 channels waveform. Could you please give some clue what could be done to get 4 channels waveform. Read.vi doesn't have multichannel option.

 

Zoom is working perfectly now. Thanks

0 Kudos
Message 3 of 13
(623 Views)

The best way would be to convert your code to do only ONE channel, then put it in a for loop which iterates 4 times.

 

However, to keep thing simple, you could just copy the VIs that use the Channel Name inputs (Circled in red) and wire them in line with your current code.  To add the plots to the array, just pull down on the Build Array (red arrow) and add two more inputs.

NIquist_0-1716218846062.png

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 13
(607 Views)

Can you simplify a bit, I still don't understand how 4 waveforms can be displayed. There are 4 buttons in my VI, if channel 1 button is clicked, it should show channel 1 waveform, similarly if channel 2 button is clicked, it should show both channel 1 and channel 2 waveform together. Like this, we should be able to show all 4 waveforms together.

tan0709_0-1716873367442.png

 

0 Kudos
Message 5 of 13
(563 Views)

Hi tan,

 


@tan0709 wrote:

There are 4 buttons in my VI, 


You didn't attach any VI yet, so we do not know how your VI/code looks like!

 


@tan0709 wrote:

if channel 1 button is clicked, it should show channel 1 waveform, similarly if channel 2 button is clicked, it should show both channel 1 and channel 2 waveform together.


Sounds like you want to use a loop (as already suggested) to iterate over all 4 channels and use a case structure to read the channel or not (depending on your 4 buttons)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(555 Views)

tan0709_0-1716880354949.png

There are different buttons, and a waveform chart which should display the selected waveform (if all 4 are selected it should show all 4). I was thinking about using event structure.

0 Kudos
Message 7 of 13
(545 Views)

Hi tan,

 

now you showed an image of a part of a frontpanel. We cannot edit/run/debug images…

 


@tan0709 wrote:

There are different buttons, and a waveform chart which should display the selected waveform (if all 4 are selected it should show all 4). I was thinking about using event structure.


Using a chart might complicate things as you need to fiddle with chart history when you switch between different plots. Otherwise you might simply use the plot visibility property to show/hide the plots!

Right now you always talk about "4 channels": what happens once you also want to handle the MATH plot or cursor(s)? MATH would be a simple additional plot, so you can use the same approach as with the other 4 channels. For cursors I recommend a graph instead of a chart…

 

Using an event structure always is a good idea when you need to handle user actions on a frontpanel.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(539 Views)

Here it is, although the block diagram is almost blank. I have prepared just the front panel. If you could help me with other functionalities too, it would be greatly appreciated. 

 

 

Thanks (keep it in advance),

GerdW 

0 Kudos
Message 9 of 13
(528 Views)

Hi tan,

 

did you read my signature line?

 

To expand on this: when you use a recent LabVIEW version then please downconvert your VIs before attaching (File->Save for previous). I prefer LV2019…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(519 Views)