LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Agilent 54610B Oscilloscope and HP 33120A Waveform Generator

Solved!
Go to solution

Hello,

 

I am currently working on a LabView code that will have a HP 33120A Waveform Generator (Driver: Agilent 33XXX Series) test through a set amount of voltages (typically 0.5V up to 5V), sweeping through various frequencies (typically 1000Hz down to 1Hz) and be read through a Agilent 54610B Oscilloscope (Driver: Agilent 5460X Series).

 

There are two problems that come up:

1) I get the waveform to produce and be read via the Agilent 54610B Oscilloscope no problem and, on the 54610B screen, the waveform looks correct. As the LabView code spits out the data read from the 54610B, randomly (at any frequency and any voltage) the waveform will spike out of range from 1 or 2 points and return back to the original waveform and run as normal (pictured below).

 

2) As the frequency drops, in the range of 10Hz down to 1Hz, the input voltage also drops when it should remain the same. I.e. if the input voltage is set to +1V, at 5Hz the program says it is around 0.7V and at 1Hz the program says it is down to 0.3V (pictured below). 

 

My code is also posted below.

Thanks for any help!

0 Kudos
Message 1 of 6
(2,926 Views)
Solution
Accepted by topic author bengrant18

Your spiking problem is likely a data transmission error.  Many scopes send a waveform by specifying a range (in your picture, it looks like 5 volts) and then sending 8 bits of data per time increment.  The top of the range is therefore a value of 255 and the bottom is zero.  Your range appears to be between -1 and 1, so you'd expect to see all of your values in between 154 and 255 or so.  However, if there's a problem with just one byte being sent, you get a zero, which is at the bottom of your range, and gets converted to -4.

 

The model of scope you're using is around 18 years old. What sort of connection are you using to communicate with the instrument?  I see that it supports a serial connection and that's usually the cheapest option, so I'm guessing it's that.

 

If it is using a serial connection can you try turning down the baud rate, enabling parity, or switching to a different cable.  Possibly switching your USB to serial cable if you're using one.  

 

If you're using a different connection type, then try switching cables and adapters in a similar manner.

0 Kudos
Message 2 of 6
(2,900 Views)

I am using a GPIB cable to connect the computer to both the waveform and the scope. Unfortunately this oscilloscope is old, however, I have access to an Agilent DSO 3202A and a Tektronix TDS 3014C. I have attempted the same code with these scopes and have run into other issues as well. 

 

I will try changing up the baud rate, and the parity. I will also switch around cables and how the devices are hooked up to each other. 

Will keep you posted how that goes. 

0 Kudos
Message 3 of 6
(2,890 Views)

I don't have your code, so some of this is presumption.  You should take the instrument communication initialization and closing out of the loop.  I suspect that the time it takes to reconnect to these might be causing delays and issues with scope triggering.

 

Just setup the sine wave and scope capture parameters before the loop, do the wait and the read inside the loop and then after the loop close the communications.

 

You might as which For loop?  I'd say both, but I haven't seen all the code..which of course you could post..hint, hint.

0 Kudos
Message 4 of 6
(2,857 Views)

Three screenshots of the code are now posted below. 

 

At this point I have solved most of my major issues but still am having other minor issues. Within the 546XX driver, there are plug-ins for a series A device and a series B device. While I am using a series B instrument and was using the B series drivers as well, most of my problems were solved by replacing the B series Read Waveform with the A series Read Waveform. 

 

I also had to take out the Autoscale function as, at frequencies below 10Hz and voltages above 5V, the oscilloscope couldn't process as quick as other frequencies and voltages and, for the input arbitrary sine function, the data would be determined "out of range" and the oscilloscope would read "scope can't find active signal. please check connections." 

 

I will attempt to take the Initialize and Close functions outside of the loop and see how the program functions. 

Download All
0 Kudos
Message 5 of 6
(2,836 Views)

Sorry, I see this thread has an accepted answer.  Did you remove the Initialise VI from inside the for loop to outside?  There's no need to do that every loop -  I still think that is causing you problems.  The scope is old, but I use a similar one everyday and have no issues with it as long as its setup properly.

0 Kudos
Message 6 of 6
(2,792 Views)