LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create VISA Resource Names

Solved!
Go to solution

Creating a VI to interface with a Tektronix Oscilloscope. The Tek drivers all use and pass VISA Resource Name formatted instrument handles.

 

Yesterday, I simply wired a text string with the proper text characters into the Tek driver and it was happy. String = "GPIB::12::INSTR"

 

Today, LabVIEW doesn't like this format mismatch, and I get driver errors.

 

My string format looks OK, but I must be doing something wrong. None of the VISA tools simplty poll the device for its VISA Resource Name. How do I get it?

 

Thanks.

Message 1 of 21
(1,823 Views)

A little more investigation reveals that the variable type the driver is looking for is NOT VISA, but an IVI input. I spent some time creating an IVI control. The wires connect properly (data type matches), but the control apparently can not be configured in any simple way. Possibly this data type is actually quite complex and can not be simply created as a simple string.

 

Still no idea why the string input worked yesterday but not today.

 

Apologies for the VISA misdirection, but any input would be appreciated.

0 Kudos
Message 2 of 21
(1,818 Views)
First, to create the control, all you had to do was right click on the function input and select 'create control'. When you have the control, click the arrow on the right side to select from the IVI resources you created in MAX. What's the instrument? Is IVI your only choice?
0 Kudos
Message 3 of 21
(1,812 Views)

Thanks Dennis. Yes, I had found the Control to create both VISA and IVI values on the panel. Unfortunately, the drivers for this instrument don't like the formatted string for the instrument address entered into the IVI as an instrument handle.

 

This is a Tektronix TDS784D Oscilloscope, which is discontinued and out of support. The available driver VI's use a library bundle that won't open up; or at least I haven't figured out how to get inside them. So figuring out what format is needed for the IVI instrument handle is taking me some time.

 

Thanks for your response.

 

Paul

0 Kudos
Message 4 of 21
(1,801 Views)

I have no idea what you mean by 'library bundle'. The IVI drivers all use a Call Library Function Node.

 

You select the instrument like I said and like I said, you first have to configure MAX for the instrument. Follow the directions in MAX for configuring an IVI driver.

 

I also asked why you are using IVI in the first place. You don't seem to understand the basics of that. There is a native LabVIEW driver available. Why aren't you using that?

Message 5 of 21
(1,795 Views)

Good question.

 

I'm simply trying to grab traces off the scope in the field. We are running it manually, and I am just trying to download the traces without messing with the scope settings. The Tek drivers reinitialize the scope settings and make it somewhat unwieldy to operate it. I was just trying to make a simple VI to download data without changing the setup. The supplied VI's don't provide that capability, but require the IVI instrument handle to access them; and I do need to use the drivers for the file write operation.

 

You are correct; IVI is a new thing for me. Haven't written VI's since about LabVIEW 5.

 

Thanks

 

Paul

0 Kudos
Message 6 of 21
(1,790 Views)

BTW, I am also unfamiliar with the Call Library Function Node; understand the idea of it, but have no idea where the call goes to. That's why I'm having difficulty recreating the IVI handle.

0 Kudos
Message 7 of 21
(1,789 Views)

I agree with Dennis.

 

There is no need to use the IVI drivers when you have LabVIEW drivers available (from Dennis' link).  Unless you want to use IVI.  But you should not have to create them.

 

Try downloading and using the drivers that Dennis suggested.

______________________________________________________________________
0 Kudos
Message 8 of 21
(1,788 Views)

Sorry guys, perhaps I am not communicating very effectively. I had downloaded the driver that Dennis linked to. I have the associated software initialized in MAX. All that software works as designed. No problems there.

 

We need a VI to simply transfer scope traces off the scope into a laptop in the field. The Tek Driver software does not just do that. It takes control of the scope and reinitializes it. Somewhere in there, it creates an IVI based "Instrument Handle," which is subsequently trransfered to and required by every single supplied VI in the driver suite. I can not use any of the VI's in the driver suite without having that IVI based "Instrument Handle" created; and the way the software is written, I have to reinitialze the scope to get that paramter. I don't want to re-initalize the scope before every data save.

 

To grab the traces, I do need to use SOME of the VI's that are in the Tek driver suite. So, I am trying to recreate the IVI "Instrument Handle."

 

The Tek "Initialize" VI, in which the "Instrument Handle" is created, uses an icon showing an open book with a script "ivi' written on it. It is not apparently documented, because no LabVIEW Help or tip information is available, and I don't find it in any pallettes. Pasting it into the Trace Grabber VI still leads to an unrecognized instrument handle error.

 

I can run the Tek Initialize VI, then run the Trace Grabber VI. But I don't want to do that.

 

Appreciate the input and not trying to be stupid.

0 Kudos
Message 9 of 21
(1,777 Views)

There might be a way around having to use the IVI code.

 

Do you have the Programmer's Guide for the scope?

If so, look for commands that transfers the data through whichever means you are connected to the instrument (can't remember if I read that in the thread).  Then try that command using MAX.  If you are successful, then simply send that command directly from LabVIEW to the VISA session.  No IVI code... 

______________________________________________________________________
0 Kudos
Message 10 of 21
(1,773 Views)