Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a User Interface to control a HAMEG HMF2525 Arbitrary Generator using LabView

Hi everyone!

 

This is my first post here as I'm just starting to learn about LabView at my university and would like some help with a project I'm working on.

 

My general assignment is basically outlined in the post title but I need some help getting a bunch of things set up, and was hoping I could find that here!

To start off:

 

Hardware: 

  • Rhode & Schwarz HAMEG Arbitrary Generator HMF2525
  • HO720 USB Cable

Software:

  • LabView 2013
  • NI MAX
  • NI VISA Driver Wizard
  • Windows 7

With my end product, I would like to be able to create and show waveforms along with harmonics and distortions, and to set up the parameters of these waveforms with a LabView Interface. The generator should then output such waveforms and have it shown on this Interface in various ways.

 

The qualities I'd like to show are:

  • Basic Oscillations (eg: sine curve)
  • Harmonic Oscillations of these basic curves
  • Amplitude
  • Frequency
  • Phase Shift

The ways I'd like to show them are:

  • Waveform (Voltage) over time
  • Polar/Vector Display of the oscillation parameters 
  • A table in which the parameters should be entered in by a user

So that's the plan for the project. I'd like some help getting started. I've already installed a driver for the USB Connection using NI-VISA Driver Wizard and can now see the HAMEG HO720 in NI MAX. 

Is this the right way to go about communicating and getting data from my Generator? I'd like to know if there are any basics I'm missing and how I first go about controlling the generator from my PC by getting it to, for example, produce a sine curve.

I've also found a LabView third party driver for the HAMEG here: LabView HAMEG Driver R&S

Is this all I will need in terms of drivers for this device and my software? I'd also like to know how to install said driver and what I should expect to see in LabView in terms of function blocks and the like.

 

As I'm new to all this, I'd like to ask a few more questions:

 

Is there any other software I'll be needing which I didn't list above?

Are there any important tutorials I should look at to help me through? I've already fone through the getting started modules 1-10 at learnni.com, and am not 100% sure where to go from there.

 

Thank you so much in advance for any help!

 

Josip 

 

Message 1 of 11
(8,046 Views)
The first thing you need to do is to undo everything that you did with the driver wizard. It was a completely inappropriate action. I don't understand why you did this.
Message 2 of 11
(8,040 Views)

Hi Dennis,

 

I will undo the driver installation. 

I did it because I was playing around with connecting the generator to start with simple tasks, but as you can see I'm in a little over my head which is why I'm asking for help here. I hope I won't make you too frustrated, I really do appreciate the help.

Can I ask why it was wrong to use the driver wizard? What would be the correct way to go about communicating with the generator through labview?

 

Thank you for replying!

0 Kudos
Message 3 of 11
(8,031 Views)
The wizard overwrites the Windows driver that you need to use. It looks like the download page you linked has a ftdi driver that is used to make the usb connection into a virtual serial port. I did not download the LabVIEW instrument driver but that would use the VISA serial port functions to talk to the instrument.
0 Kudos
Message 4 of 11
(8,028 Views)

Hello again!

 

I've been successfully communicating with the generator through labview - I've initialised driver sessions and managed to create different waveforms using the hameg driver function blocks.    

 

What I'd like to do now is display what is on the generator display on my labview front panel. Since I cant simply hook up a waveform graph or something similar, I assume I have to use visa read/write functions in combination with something else, but I don't specifically know what.

If someone could point me in the right direction that would be great.

 

Josip 

0 Kudos
Message 5 of 11
(7,925 Views)
Yes, you can drop a waveform graph on the front panel and display data. A VISA Read returns data as a string so you just have to use the string conversion functions to get numeric data that can be displayed on a chart or graph. I'm kind of surprised that the driver doesn't do this already. You also don't mention what instrument you are using to read the signal generator that you have. This is pretty important information to provide.
0 Kudos
Message 6 of 11
(7,923 Views)

 

Hello, 

 

I'm not sure if the driver has this functionality. In the attached picture are all the available driver VIs - the possibly relevant ones I've highlighted at the bottom. There are four "Instrument I/O" Blocks which query either the Boolean, Int, Double or String value. I don't know what these VIs expect in the "Command ("")" Input. 

 

I'm not using an instrument to read the signal generator at the moment, though I do have a Tektronix Oscilloscope available if I need it. I want to put in parameters for an arbitrary curve in LabView, have LabView create a CSV file and then load it into the generator to have this file displayed. 

I'd like to figure out the loading a CSV File into the generator through labview part - Are there visa functions that can help me do this? I don't see how to directly do it with the driver functions.

 

Thanks again,

 

Josip

 

hameg driver VIs.png

 

 

0 Kudos
Message 7 of 11
(7,862 Views)
You can check with the manual or contact the vendor to see if the instrument has a query that will output the generated signal. The arbs/signal generators that I've worked with did not have this capability. You would have to use the waveform generation functions to simulate the actual waveform from the same data you provide to the instrument. If there is a command, you would have to add a function to the driver as a driver is written to control an instrument and does not usually contain the ? SCPI queries that match a setting command.
0 Kudos
Message 8 of 11
(7,856 Views)

@fr00tcrunch wrote:
[...]

I've also found a LabView third party driver for the HAMEG here: LabView HAMEG Driver R&S

Hi,

we think of buying HMF 2525, but we need LabView control and the driver is not accessible any more.

 

Link says:

 

Instrument Driver Erro

We are sorry, but an error has occurred with our application.

No content available with ID: EDC29D45CA25286EE0440021287E65E6

 

Does anybody knows, how to get this driver?

 

thanks a lot!

regards

 

0 Kudos
Message 9 of 11
(7,098 Views)
I believe that driver wasn't from NI and was unsupported. I have no idea why it was pulled. You might want to check with free vendor.

Creating your own driver is not that complicated. Anyone using LabVIEW should be able to write one. Give it a try. There are plenty of resources to help you.
0 Kudos
Message 10 of 11
(7,087 Views)