LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

instrument alias

Solved!
Go to solution

Hi Kaza

 

VISA Find Resource returns you the actual name of the instrument; not alias. If you want to display the alias, you need to make some comparision on the block diagram and display the result on the front panel.

 

For example if you have named your GPIB1::INSTR as "Device1", compare the VISA Find Resource with GPIB1::INSTR and return "Device1", if true.

 

Does it help?

 

 

0 Kudos
Message 11 of 43
(2,004 Views)

Ravi,

         I've connected one signal generator with address GPIB0::12::INSTR, one spectrum Analyser with address GPIB0::17::INSTR to the pc using GPIB.I'm getting GPIB0::12::INSTR,GPIB0::17::INSTR and GPIB0::INTFC.BUT I DNT WANT THIS RAVI.I want the instruments names to be displayed on the front panel with check boxes to see if the instrument  is connected on the GPIB or not.Like Signal generator followed by a check box.

 

           Hope now u understand my problem Ravi...

Thanks
kiranmayi
0 Kudos
Message 12 of 43
(1,982 Views)

Dear gpsrt

 

Have you ever heard the expression "You catch more flies with honey than with vinegar"? Yelling at people who are trying to help you out of the goodness of their heart isn't going to make them more inclined to help you. Espescially when they are giving you valid suggestions. I'm attaching an example VI (written in LV 8.6.1, please let me know if you are using a earlier version and I will be deligthed to resave it for you) that follows approximately what Ravi and Dennis have suggested. Note that the instrument that I want to verify if they are connected or not are called "TDS210" and "TDS211". You will need to change the constants to match the aliases you have set for your instruments in MAX (in the way described in the document muks provided the link for). If you have any further questions please feel free to post a reply at your own leisure.

 

Best Regards

 

David

Message 13 of 43
(1,955 Views)

Try this. I added an expression to just search for GPIB instruments and the code to verify that the instruments are actually connected. Note that the Find Resources does not verify connection. It verifies that instruments were once connected and their aliases exist. Based on the result of the *IDN? query, it updates a listbox and adds the check mark.

 

David,

 

You VI has a bug in that if both instruments are found, it will only show the last one in the list.

Message Edited by Dennis Knutson on 08-10-2009 10:34 AM
Message 14 of 43
(1,939 Views)

You are right as usual Dennis Smiley Very Happy Converted the code from something else and played around with it a bit, not exactly great coding. Thanks for the great example

 

Best Regards

 

David

Message Edited by Davidek on 08-10-2009 01:51 PM
0 Kudos
Message 15 of 43
(1,928 Views)

sorry David

                   I thought Ravi was sarcastically calling me kaza.It was purely misunderstanding.

 

                             I'm using version 8.6.Thanks for your help. 

             

Thanks
kiranmayi
0 Kudos
Message 16 of 43
(1,905 Views)

My motivation was to help you. Sorry if I did hurt! 😞

 

Ravi Shankar

 

0 Kudos
Message 17 of 43
(1,900 Views)
K Ravi leave it.It was purely misunderstanding
Thanks
kiranmayi
0 Kudos
Message 18 of 43
(1,891 Views)

Thanks Dennis,

                       But I'm still getting GPIB addresses only.i want to get the names of the instruments followed by check boxes.

 

          Eg:1. Signal generator (followed by a checkbox)

               2. Spectrum Analyser(followed by a checkbox)

Thanks
kiranmayi
0 Kudos
Message 19 of 43
(1,877 Views)
And what is this -1073807339 you are checking for
Thanks
kiranmayi
0 Kudos
Message 20 of 43
(1,875 Views)