LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with vi program

Hello
I've got a big problem and i hope you will help me.
The problem is :

I am a LabView newbie, but i have to update a program that comunicate PC and hp 33120A generator. The old program use RS 232 , and my job is to change this to GPIB.
But I've never been using LabView so i don't how to do that.

So please help mi with this and I will be grateful.


0 Kudos
Message 1 of 8
(2,523 Views)
Since the code is written using VISA, your job is pretty much 90% done. All you need to do is to delete all the serial port controls on the front panel, delete the "VISA Configure Serial Port", and just wire the "VISA resource name" control to the "VISA Open" function. Then, change the resource name from "ASRL2::INSTR" to "GPIB0::nn::INSTR" where nn is your instrument's GPIB address.
0 Kudos
Message 2 of 8
(2,509 Views)
It sounds like the driver for the instrument wasn't used. If it had been, then the only thing required would have been to change the VISA Resource Name.
0 Kudos
Message 3 of 8
(2,503 Views)
As an addendum, you may also want to correct a couple of things. In the first frame the error out of the VISA Write is not being sent out. You need to use a sequence local to pass the error into the next frame. A better solution is to simply eliminate the frame structure, as you can use the error clusters to chain your code.
0 Kudos
Message 4 of 8
(2,502 Views)
Thanks for fast answer, Tomorrow I will check how it is working.

I've got one more question:
One of you wrote that if in this program will be used instrument driver, the only thing to do will be change the Visa Resource Name.
So I found in the NI Developer Zone file hp33120A.LLB, but i don't know how to use that file?

This is only a library which I have to use in new program or something else ?

0 Kudos
Message 5 of 8
(2,486 Views)

Okay, first of all, you need to specify which driver you actually downloaded. The LabVIEW plug and play driver is called ag33xxx and I think only the IVI driver is called hp33120A.llb. You probably want to use the LabVIEW driver if you are first starting out and want to make things simple. The IVI driver is actually LabVIEW wrappers around code a DLL created with LabWindows/CVI. The other drivers are witten with LabVIEW and you can view and edit the code.

Assuming that you download the native LabVIEW driver and install it in the correct location, then all of the functions of the driver will be on your Instrument Driver palette. There are functions like configure waveform which sets waveform shape, frequency, etc. There are even a couple of shipping examples in the driver that help you get started using the lower level functions in the driver. Go to http://www.ni.com/devzone/idnet/ and look at the subjects under the learn topic for more information on what is a driver, the types available, and how to use one.

Message 6 of 8
(2,482 Views)
I've downloaded two types of driver

1. hp3312A.llb - ther is a lot of *.vi inside that file.
2. hp3312A_lv80.msi and as you wrote when I installed this file I've got  a hp3312a in my Instrument Palette.

Thanks for help, this night i will read information in the link above.
0 Kudos
Message 7 of 8
(2,473 Views)
You've got the IVI driver. I would recomend you download the other LabVIEW (either the 7.0 or 8.0) driver from NI's web site. Unless you really need the capabilities that an IVI driver gives you, the native LabVIEW driver (ag33xxx) will be much easier to use.
Message 8 of 8
(2,470 Views)