10-22-2009 02:14 AM
Is there any way to autodetect the GPIB instruments connected to my system, like autodetecting the PXI slots & cards?
LabVIEW 8.5
10-22-2009 04:48 AM
Hi..
The only way I know of, in the NI world currently, is with NiMAX (the Measurement and Automation eXplorer) That has funcitons to scan the bus for active instruments, and return a list on screen with their details as found ***
I do not know (but would be suprised if there wasn't) a way to call that from within LV? This is something I've got to figure out too. (LabVIEW that is)
*** Not all instruments will reply to a '*IDN?' query, most modern ones will, but there are even some right bang up to date devices that will stay silent, unless you manually put them into 'Remote' mode first...
Of those that do reply, don't expect any sort of common standard as to the structure their reply, other than somewhere in the string they send you, there will be a manufacturer and model number, maybe a serial number too. Each and every instrument maker has their own idea about the way they do all that...
I think there was a push some years back to formalise that, but it never seemed to get off the ground from what I can see. The idea was to have something along the lines of SCPI in reverse (it might even have been part of the SCPI spec?) so that any software could not only identify an instrument, but learn what it was capable of doing etc... You can immagine that is a somwhat open ended loop of a task, at best.
Otherwise, you're going to have to poll the bus with a short timeout, and effectivly scan all posible addresses, to see if the handshake completes when you try to address something, then try to identify what might be lurking at that address.
Look for NiSpy on your system, then use that in conjunction with NiMAX, and see how it all works, or not as the case may be. Then see if there is a way to use NiMAX from LabVIEW. If it can't it would be good if it could in the future.
Regards.
DJB.
10-22-2009 05:11 AM
Thanks DJB!
Sorry, I ve cross-posted it in the Instrument Control board already, in the hope of getting more responses.
10-22-2009 06:18 AM
What's with "VISA Find Resource.vi"?
Christian
10-22-2009 06:36 AM
Christian_M wrote:What's with "VISA Find Resource.vi"?
Not all the instruments will respond to *IDN?
10-22-2009 06:42 AM
10-22-2009 06:42 AM
No worries, looked at the replies there, and have just had a play with the FindListners function myself.
Cheers.
DJB
10-22-2009 06:45 AM - edited 10-22-2009 06:46 AM
@Mathan I don't really understand what "VISA Find Resource.vi" has in common with writing an *IDN? to a specific insturment?
For GPIB it returns the installed interface (GPIB0::INTFC) as well as the connected Instruments (GPIB0::2::INSTR)
Christian