05-17-2024 01:32 AM
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.
05-17-2024 09:53 AM - edited 05-17-2024 09:56 AM
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:
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.
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...
05-20-2024 01:42 AM
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
05-20-2024 10:27 AM
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.
05-28-2024 12:18 AM
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.
05-28-2024 01:16 AM
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)…
05-28-2024 02:14 AM
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.
05-28-2024 02:34 AM
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.
05-28-2024 05:54 AM
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
05-28-2024 07:43 AM