LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of the enumeration returned by NISysCfgFindHardware()?

Solved!
Go to solution

Hi everyone,

 

Does anyone know if there's any particular order to the list of devices returned by NISysCfgFindHardware()?  I'm using a PXI chassis with a bunch of cards, so I'm wondering if it's ordered by the slot number or anything else, or maybe it's just random.  I don't have the hardware available right now, so I can't test it on my own 😞 Thanks!

0 Kudos
Message 1 of 2
(3,492 Views)
Solution
Accepted by topic author BLowery

 I've attached a short piece of code that I used to test this query.

 

When I ran this I always saw the controller at index 0 and the chassis at index 1. After that, generally the modules were listed in the expected order, usually with 'blanks' in indices corresponding to empty slots. I did see interesting behavior after listing the modules; for example, in one situation the chassis was listed again directly after listing the modules without blank spaces . My best advice would be to be safe and check each resource is what you expect before using it - however there does seem to be some consistencies that you could potentially take advantage of. Please feel free to use this code to test it yourself but do remember that this code has not been fully tested and cannot be guaranteed in all situations.

Message 2 of 2
(3,474 Views)