LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for some help/advice on LabVIEW

Hi Laura

Just to add to Miguels input.
If on the menu bar you go to Help >> Find Examples ..., click on the Search tab and type in "gpib" as a keyword you should get an example "Labview <-> GPIB.vi" which will give you some code to get you going. 🙂

Good luck
Neil
0 Kudos
Message 11 of 25
(1,464 Views)
Thanks, I have found it.

What kind of things are meant to go into the characters to read and write though?
0 Kudos
Message 12 of 25
(1,462 Views)
As Miguel said earlier you need to write commands like "*IDN?" to your device, and it should return response strings. The manual that goes with your power meter will list the GPIB commands that it will accept and the responses it will generate. *IDN? is a universal command that requests the identity of a device. On the Labview front panel set the GPIB address as required, set both toggle switches to up and type in a suitable command that will generate a reply, from those valid for your power meter, into the "Characters to Write" box. Press the Run Arrow and hopefully 🙂 you'll get a response in the "Characters Read" box.

Good luck
Neil
0 Kudos
Message 13 of 25
(1,448 Views)
Thank you for your help. Although I thought the function of the drivers was so that you didnt need to know the commands?
0 Kudos
Message 14 of 25
(1,443 Views)
It's not correct

The function of drivers is to make easier the communication with instruments. Otherwise, you'll have to open a visa session. It's also ok, but more complex.

Today nearly all commercial instruments offers drivers for LabVIEW in order to incorporate them to the costumer applications.
0 Kudos
Message 15 of 25
(1,423 Views)
Thank you. I have the drivers for the power meter anyway. So I do not require to use VISA?
0 Kudos
Message 16 of 25
(1,422 Views)
If you have the drivers, you won't have to open any VISA session.

You only have to specify the address of your instrument and write-up commands that's all

Remember, in GPIB, to obtain a response, you have to send ona command and after, read the number of characters you hope to receive.

I hope to be useful
0 Kudos
Message 17 of 25
(1,416 Views)
Hi Laura

You're right, in that the drivers will give you VIs that will allow you to talk to the power meter without worrying about the actual commands. But you will still probably need to write some code around them depending upon your application.
If you open the "AGE441X VI Tree.vi" which comes with the driver package and look at the block diagram you will see all of the VIs displayed. On the right under the Utility section is a "Revision Query.vi" which does the *IDN? discussed earlier, which you can use to verify comms with your device. You can add these VIs to your app. as required. You will need NI-VISA 2.5.2 or later loaded according to the driver download page.

Regards
Neil
0 Kudos
Message 18 of 25
(1,396 Views)
I tried that earlier but Im getting lots of errors trying to open them and the program crashes. Does it matter what directory the drivers are installed into from the zip file?
0 Kudos
Message 19 of 25
(1,386 Views)
No the dir shouldn't matter.
Can you run any of the VIs ?
Can you talk to the meter at all ?
0 Kudos
Message 20 of 25
(1,369 Views)