Hi,
Programmatic slot detection of PXI modules is a common application. Normally, one wants to take a given device and determine in which slot that device is installed. In your case, it sounds as if you want to determine if there is a device in a given slot. There are a few different methods for accomplishing this task.
I suppose the easiest way to find all PXI instruments is to use the VISA Find Resources function. This function will return a list of all VISA resources. Fortunately, VISA supports PCI and PXI. You can then use this list to determine what PXI devices are installed. Unfortunately, not all PXI devices support VISA. For more information on using this and other methods, please review KnowledgeBase 2MDFG2WD: Programmatic PXI Slot Detection at ht
tp://digital.ni.com/public.nsf/websearch/2342900AED02975A86256BD800764C8B?OpenDocument. This method is method 2 in the KnowledgeBase and is demonstrated in the Example Program PXI Slot Identification Using PXI VISA Resource Names at http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E10F56A4E034080020E74861&p_node=DZ52405&p_submitted=N&p_rank=&p_answer=&p_source=Internal.
When the PXI system is turned off or disconnected, this method simply will not detect any PXI instruments.
I hope this helps.
Regards,
David Shatila
Applications Engineer
National Instruments