LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get "Model" string from MAX

Highlighted

I'm not sure which discovery protocol this occurs via, but most of the instruments I use report their model number to NI-MAX. See the attached image.

 

Is there anyway to programmatically glean this string within LabView? None of the VISA properties seem to contain it. visa_model.PNG

 

I can parse it from the TCP hostname, but that's not as direct as I'd like. 

0 Kudos
Message 1 of 10
(303 Views)
Highlighted

a *IDN? query usually returns that information.

 

How much information depends on how 488.2 compliant the instrument really is...

 

http://rfmw.em.keysight.com/rfcomms/refdocs/gsm/hpib_common.html

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 2 of 10
(302 Views)
Highlighted

Yes, I'm aware that I can communicate with instruments. That isn't what I asked; I asked whether there's a hook to get information that MAX demonstrably has, and I asked this without reference to whether or not MAX will necessarily have that information in all cases. As it happens, in all the relevant cases, it does have the information I'd like to scrape. 

0 Kudos
Message 3 of 10
(296 Views)
Highlighted

Oak let me be more clear.

 

The *IDN?, identification query, is defined in "IEEE Std 488.2-1992", 10.14.

 

*IDN? is used to retrieve information about the test set in ASCII format.

 

*IDN?, returns ASCII codes 32 through 126 excluding comma and semicolon in four comma separated fields. Field 1 returns the manufacturer, field 2 returns the instrument model number, field 3 returns the serial number, field 4 returns 0.

 

The is no "give me the model number", do a *IDN? and parse the data returned.

 

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 4 of 10
(287 Views)
Highlighted

Again, I'm not interesting in querying instruments. That's trivial and I wouldn't post on the forum for help with that.

 

I'm interested in what I asked, which is whether it's possible to query MAX for the model string it clearly has. I want to know what MAX thinks the instrument is, and I'd prefer to access this information directly rather than extrapolating it from other sources. 

 

This is a noteworthy piece of information, because if you set the alias to this string it doesn't display the alias in the item's list entry in MAX. 

 

I have some legacy code where, for the time being, the easiest solution to a problem I have is to change VISA aliases on-the-fly. I use the model string from MAX to "unset" the alias for clean appearance in MAX.

 

I understand that none of this really matters, which is why I attempted to ask my question directly without explaining a bunch of stuff that isn't interesting to the forum as a whole. If the answer is "no", that's fine, but let's be clear that I asked the question I intended to ask, and you assumed I must really be trying to ask some other question.

0 Kudos
Message 5 of 10
(270 Views)
Highlighted

I'd prefer not to get into a contentious discussion here over what constitutes device "discovery" - it's almost certain that MAX gleans its information by testing each connected device using *IDN? anyway, unless it's a register-based interface - but I'll suggest that you *might* want to have a look at the nisyscfg support within LabVIEW.  There's a set of handy VIs and a well-supported set of properties available on the palettes under "Measurement I/O->System Configuration".

 

I've also written some device discovery LV code for, specifically, DAQmx and NI-Switch class devices, using the property nodes available.

 

Best regards,

Dave

David Boyd
Sr. Test Engineer
Abbott Labs
(lapsed) Certified LabVIEW Developer
0 Kudos
Message 6 of 10
(251 Views)
Highlighted

Maybe you're looking for something like this:

mn.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 7 of 10
(246 Views)
Highlighted

Paul (and also David), that is exactly what I was looking for! I figured there had to be a way to get at it, somehow. 

 

Thanks!

0 Kudos
Message 8 of 10
(199 Views)
Highlighted

@marshaul wrote:

Paul (and also David), that is exactly what I was looking for! I figured there had to be a way to get at it, somehow. 

 

Thanks!


A word of warning: If a piece of H/W doesn't provide its S/N, MAX will just makeup a S/N; and that made up "S/N" will change if you disconnect and reconnect the H/W.

"If you weren't supposed to push it, it wouldn't be a button."
Message 9 of 10
(189 Views)
Highlighted

Maybe you can just read "C:\ProgramData\National Instruments\NIvisa\visaconf.ini"?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 10 of 10
(158 Views)