12-09-2014 06:51 AM
Hi,
I have a C++ library called by a CLF in the LabVIEW RT from my cRIO. I am trying to use the cRIO serial number in my C++ code for licensing purposes. Is it possible to get the cRIO serial number using the C++ API?
I found information on how to do this from LabVIEW itself (http://digital.ni.com/public.nsf/allkb/74924FEE303440998625727D005197FA), but it would be really helpful to be able to do it from the C++ code.
Thanks in advance!
Solved! Go to Solution.
12-09-2014 08:36 AM
You know how to call the VISA library from C++ code ?
Then do it in the same way as described in the first method for Labview.
Open a VISA Session for your RIO device and use viGetAttribute() to read the Instrument description property ( VI_ATTR_INTF_INST_NAME)
12-09-2014 09:15 AM
Hi mkossmann,
Thanks for your suggestion. I have never used the VISA library from C++ or from LabVIEW, actually. I'm a newbie using NI hardware so sorry if the questions are too basic.
Is there documentation on the VISA library? I have found the DLLs on my windows machine, but I don't find any other documentation.
Thanks,
Sara
12-09-2014 06:15 PM
The more modern way would be to use the System Configuration API to query this information. This is the same API that MAX and other software internally uses to get this information for display. This API is available in C (nisyscfg.h) and I assume should work on RT controllers as well.
12-12-2014 04:43 AM
Hi BlueCheese,
Thanks for your answer. That's exactly what I was looking for!! I will give it a try and let you know if it actually supported in the RT controllers.