Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I determine the device number of NI-5112 (scope) and NI-4060 (dmm) card?

Hello,

I have to set up an automated installation process for NI-5112 and NI-4060 card in a PXI chassis. Although I run an absolutely identical process two times on an absolutely identical PXI chassis, it's not sure that the device numbers in Measurement & Automation Explorer of both cards are the same. For this reason, I'd like to determine the device number in an unattended way, e.g. by a command line tool, so that I can at least tell the user to change device numbers manually if they aren't assigned correctly. Of course, the best solution would be to check device numbers and change them if necessary... Does anybody see a solution?

I would appreciate any help! Thanks in advance.

Regards,

Thorsten

0 Kudos
Message 1 of 6
(3,741 Views)
Thorsten,

what about saving your master configuration using MAX and installing this configuration file on new systems? This requires, of course, that all 'child' systems are identical, not only in their contents, but as well in where the different cards are installed (which slot etc.).
This would ensure those devices have always the very same device number,

BTW, at least for the DMM I'd consider using IVI drivers, where you create and use an alias (e.g. 'myDMM') as device name/reference. This way you  decouiple you acrtual configuration from your programming..
If the scope has no IVI driver and/or you prefer staying with your existing solution, you could use a global device number for each of the devices. This one might be filled by just trying any typical device number (try to get some self identification strings or so) until you have success.
Just my Euro 0.02!
Greetings from Germany!<br>-- <br>Uwe

Message Edited by LuI on 12-19-2005 10:52 AM

0 Kudos
Message 2 of 6
(3,738 Views)
Thank you very much for the fast reply. As the configurations of the child systems are not always the same, I can't take the solution using a master configuration file.
I didn't properly understand the procedure concerning global device numbers. Could you explain it more detailed please?

Greetings from Germany, too

Thorsten

0 Kudos
Message 3 of 6
(3,733 Views)
Thorsten,

as I do not know which driver you use, I can just provide some symbolic code:
..
get first devicenumber
repeat
  open_device (devicenumber)
  get_deviceID
  get next devicenumber
until deviceID equals a given device ID


With LabVIEW you could use the property NIDMM.Inherent_IVI_attributes.Instrument_Identification.Instrument_Model, which is a string. This could be compared with the expected string.

Its a simple search for all possibel device numbers and ignoring errors when trying the wrong device number...

HTH   and Greetings from Germany!<br>-- <br>Uwe
Message 4 of 6
(3,733 Views)
OK Uwe, I will give your solution a try. If it works, it's just for checking device numbers. Do you know a possiblilty for changing device numbers automatically in case that they don't match given device numbers?

Greets

Thorsten

0 Kudos
Message 5 of 6
(3,729 Views)
You don't need this if you read the device number from a global that was filled during initialisation phase with the above mentioned algorithm.
0 Kudos
Message 6 of 6
(3,725 Views)