02-02-2016 02:21 PM
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!
Solved! Go to Solution.
02-03-2016 10:21 AM - edited 02-03-2016 10:23 AM
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.