From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Activating channels on TDS 640

Hi,

 

I am using a Tektronix TDS 640A scope connected via GPIB to my PC running Labview 9.  I am using the TKTDS6XX driver.

 

I am having a problem with turning any channels on the scope on or off.  Channel 1 is on when I begin, however, if I try to turn on channel 2 using TKTDS Traces On-Off.VI, it gives the following error: 

 

Code:  -1073807313

Error: VISA Wait on Event in Wait for RQS.VI:1->TKTDS Traces On-Off.VI

 

Untitled.png

 

The instrument initializes and does everything else fine when I remove the TekTDS Traces On-Off.VI block.  As you can see, I am simply trying to collect channel 1 and channel 2 traces from the scope after a single triggering event.  I can get channel 1, but not channel 2.  I have also tried switching the probes on channel 1 and 2 and get the same error. 

 

Any ideas or thoughts would be helpful!

0 Kudos
Message 1 of 9
(4,355 Views)

egill,

 

I'm not familiar with the exact driver set you are using, but in general it appears that you may not be registering your event before using the event. I've seen this error come up before doing VISA com's using NI VISA drivers. You must first call a VI that will enable the event before actually calling that event.

 

The following links may steer you in the right direction:

 

VISA WaitforRQS Never Catches the RQS (Always Times Out)

 

Timeout on VISA Wait On Event

 

Again however, these are for the NI VISA drivers. I'm assuming similar VIs exist for your driver set.

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,329 Views)

This is just a plug and play driver, so I'm not at all familiar with NI VISA programming.  The documents that you referred me to went way over my head.

 

Does the problem exist in the plug and play VI?  Does the plug and play VI itself have to be modified?

 

I don't understand what you mean when you say that I "may not be registering the event before using the event".  What type of an "event" are we talking about?

0 Kudos
Message 3 of 9
(4,325 Views)

egill,

 

I'm somewhat confused on what exactly you're trying to do...

 

After looking more closely at your VI, you aren't actually specifying the channel(s) you want to read. The TXTDS 6xx Initialize.vi is where you specify the channels you want to read. You do this by wiring a control or constant to the upper left input terminal of the initialize VI. The channel will be something like GPIB::1. Right now, GPIB::1 is the default channel, that's why this VI is running ok. Alternatively you can just make a control for the VISA session (the purple reference wire) and specify the GPIB channel. Depending on the drivers, you can probably call two separate channels in that same control. Just separate the two GPIB channels with a comma and space (i.e. "GPIB::1, GPIB::2").

 

The Channel 1 constant you have is wired to the VI that configures the edge trigger. This means that Channel 1 is the channel that acts as your digital start trigger, not the channel that is actually receiving data. I don't think you'll need to use that Traces VI at all.

 

I downloaded these drivers to see what you're working with. It looks like a couple (albeit very simple) example VIs come with it. You might try experimenting with these to see if you can modify them to do what you are intending.

 

Hopefully this helps,

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(4,315 Views)

Chris,

 

I think when we are talking about different types of channels.  The TDS 640 is a 4 channel oscilloscope.  So when I say that I can't read Channel 2, I mean that I can't read that channel on the scope, or, in other words, I can't read that specific probe that I have connected to 'Channel 2' on my scope.

 

It sounds to me like you are referring to the GPIB channels.  However, my device's GPIB address (my scope) is '1'.  I am not having a problem with that.

 

Essentially, my scope can display up to four waveforms (one for each scope channel), however, I can only get one waveform from the scope, scope channel 1.  My intention is to trigger off of the signal from scope channel 1, and then collect two waveforms from scope channels 1 and 2.  My problem is simply in turning scope channel 2 on (it is by default set to 'off').

 

The above program does not work when I attempt to use Traces VI to turn scope channel 2 to 'on'.  And the examples that come with this driver only show how to collect data on scope channel 1.

 

Does this make more sense now?  Thanks for your help!

 

-Eric-

0 Kudos
Message 5 of 9
(4,312 Views)

Hey Eric,

I did some quick searching for the programmers manual for the Tektronix 6xx family of instruments and I found this link: http://www.photonics.umd.edu/umd/manuals/TDS%20744A/Programmer%20Manual.pdf

 

With a little work I believe you should be able to take this programmers manual and make a few small changes to the TKTDS 6XX Application Function.vi shipping example that comes with the driver. One major difference that I noticed between your screenshot and this example is that you aren't using the TKTDS Measurements On-Off function. The shipping example should only show channel 1 as it has False wired for the other 3 channels:

 

6xxSeries.jpg

 

If you take a look at the programmers manual linked above and search for MEASU then you should find this command from page 38:

 

6xxSeries_2.jpg

 

Give this a try and see if this helps.

 

Lars L

0 Kudos
Message 6 of 9
(4,305 Views)

Eric,

 

Ahhhhh I see now. Heh, sorry about that. Seems we were on different wavelengths (sorry, bad pun...).

 

I don't have the hardware so I can't test it out, but I think Lars has you covered. Try using the TKTDS Measurements On-Off.vi and have each of the measurements wired as true to turn those measurements on. And FYI, if you can't find the shipping examples they should be in the .llb located at <LabVIEW XXXX>\instr.lib\tktds6xx\tktds6xx.llb.

 

Sorry I couldn't be of more help.

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 7 of 9
(4,290 Views)

Hi Lars L,

 

Thanks for your help on this.  The problem is not with the Measurements On-Off function.  The measurements function will simply make a measurement (period, amplitude, max, min, etc.) for any scope channel waveform that is turned on.  However, it will not turn a channel waveform on.  If the channel waveform is not turned on, then the measurement reads 9.9e37, which is obviously incorrect.  This is why I was trying to use the TKTDS Traces On-Off VI, but getting the error noted above.

 

I essentially want to do the same thing as in the example that comes with the driver, only on scope channels 1 AND 2, or even if I could figure out how to do the same thing on channel 2 only, I could probably figure it out from there.  Thanks!

 

-Eric-

0 Kudos
Message 8 of 9
(4,289 Views)

So I haven't really found a solution, but I have found a way around my problem.  If I manually setup the scope the way that I want it (channels 1 and 2 on), and save the setup, then I can recall the setup with the VI and then take my data with the scope.

0 Kudos
Message 9 of 9
(4,287 Views)