LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

instrument alias

Solved!
Go to solution

Also, How do you know the byte count is 500 before hand

Thanks
kiranmayi
0 Kudos
Message 21 of 43
(1,991 Views)

Hi gpsrt

 

The error code -1073807339 means " Timeout expired before operation completed.". You can find the definitions of error codes in "Explain Error" under the Help menu in LabVIEW.

 

If you are still just getting GPIB addresses with the code Dennis provided make sure you have set a Alias for the instrument in MAX(see the link muks provided). You need to do this first.

 

Best Regards

 

David 

Message 22 of 43
(1,967 Views)

And a basic way to find the meaning of any error code is to paste the code into an error indicator. Right click on it and select 'Explain ...'

 

The whole point of the *IDN? is that there will be no response if the instrument is not there and there will be a timeout error. This is what you asked for.

 

As far as the 500 bytes is concerned, I would have no idea how many bytes are available and don't care. It's just an arbitrary number. The VISA Read will automatically terminate when the GPIB EOI is detected so you can specify any large number.

Message Edited by Dennis Knutson on 08-12-2009 08:38 AM
Message 23 of 43
(1,959 Views)

Thanx dennis and David.

                        

                     I'm learning so many things from you people.

Thanks
kiranmayi
0 Kudos
Message 24 of 43
(1,938 Views)

Dennis,You said


  Note that the Find Resources does not verify connection. It verifies that instruments were once connected and their aliases exist.

 


If the instruments were not connected to the PC How come the find resource function returns the instruments list.I dnt understand this.
Thanks
kiranmayi
0 Kudos
Message 25 of 43
(1,929 Views)

"Note that the Find Resources does not verify connection. It verifies that instruments were once connected and their aliases exist."

 

The explanation to this is : MAX remebers the istruments that were connected to the PC.

I dont have GPIB instruments connected to my PC, so I used the DAQ card instead to demonstrate. In the devices and interfaces >> NI DAQmx devices; pci cards have different colors(in figure below). In that, white color (with a cross mark) indicates that the device was connected in the past and is not present now. Green indicats that the device is  connected now, yellow is a simulated device.

 

InstAliasMAX.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Similarly, MAX remembers GPIB instruments and its aliases also. Now when you use the "VISA Find Resource" vi it gets all the instrument resources from MAX. So, the extra part of the code is to verify if the instrument is actually connected or not.

(Dennis and David please correct me if I'm wrong) 

 

And regarding "alias" names:

As the help says if there's no user defined alias name to the instrument, the vi returns "VISA Canonical spec-defined" resource format. So please make sure you have given all the instruments alias as you want.

 

VISA.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

thanx

Ravi

Message 26 of 43
(1,921 Views)

MUKs,

                  I've connected NRT power meter and I want to give alias to Power meter.But in MAX I'm getting 'No Visa resources found' under Devices and Interfaces tab.plz see the attached jpg.

Thanks
kiranmayi
0 Kudos
Message 27 of 43
(1,909 Views)

Dear gpsrt,

 

Are you able to use VISA/NI 488.2 in LabVIEW? Which version of LabVIEW? If you are able to use these drivers without any problem in LabVIEW then there seems to be some problem with MAX. Repair it.

 

Otherwise VISA and NI 488.2 needs to be reinstalled. 

 

Since this post is sooo long i am assuming that the very first question you had asked must have been installed.

.......^___________________^
....../ '---_BOT ____________ ]
...../_==O;;;;;;;;_______.:/
.....),---.(_(____)/.....
....// (..) ),----/....
...//____//......
..//____//......
.//____//......
..-------
0 Kudos
Message 28 of 43
(1,898 Views)

Yes BOT.I'm able to use VISA/NI 488.2 in LabVIEW.

Version labVIEW 8.6


 

Since this post is sooo long i am assuming that the very first question you had asked must have been installed.


I dnt understand this.It is not that the post is too long.More importantly I'm learning so many things on this forum.

Thanks
kiranmayi
0 Kudos
Message 29 of 43
(1,889 Views)

Did you have this problem in MAX, from the beginning of the post?? It answers so many questions.

If you can't detect your instruments in MAX, you can't give an alias, you can't show them on your front panel. 

Probably its an installation problem.

 

 

Alternate: Give an alias name without using MAX.

 

Way to do it: Modify the "visaconf.ini" file where the aliases are saved. For this navigate to C:\Documents and Settings\All Users\Application Data\National Instruments\NIvisa folder for windows xp. then run the "VI Find Resource" vi with "aliases only" as "search mode".

 

thanx

Ravi

 

 

 

0 Kudos
Message 30 of 43
(1,885 Views)