PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically check all of my PXI cards to verify they're "alive"?

How can I programmatically check all of my PXI cards to verify they're "alive"?  I'm looking for a live query of some sort to see if the module is still there and alive.  As a test, I have removed one module, and can't seem to find a way to report that it's no longer there.  The VISA search functions says it searches the bus (with the right option selected), but it still returns data for the missing module.  Also, the DAQmx properties still return values (plus I need a universal method since not all are DAQmx devices, or even NI for that matter).
Thanks.
0 Kudos
Message 1 of 7
(4,253 Views)
Hello needinfo,

What method are you currently using to list the PXI cards? I setup a system and was able to use the VISA Find Resources function to return a list of all the VISA resources on the system. Also, when you remove the module, are you powering off the system and removing it? When I ran a simple program with VISA Find Resources, it returned all the PXI cards; after removing the module, powering back on, and running the same program to find the resources, it no longer showed the card I removed from the system. Please let me know if this is the method you are using and if this method works.
Daniel S.
National Instruments
0 Kudos
Message 2 of 7
(4,230 Views)

I am trying to simulate a card failure and the ability to detect that, so I am not power cycling the system.  Obviously I don't want to do this too many times and risk damage to my expensive card.  I currently sort through the PXISYS.INI file for a list of expected installed devices, and use the VISA Find Resources to get a current list (also with logic to parse out non-DAQ devices like bridges, etc.).  That list apparently does not actually come from a live bus query, as when I remove a card it still reports it as present, and properties all return valid values as if it were still installed.  There seems to be some methods performed in MAX that do a module self test, but they don't appear to be exposed to LabVIEW?  What I think I need is some property query that is actually read from the module that could give me an error if the module is no longer present.

Thanks

0 Kudos
Message 3 of 7
(4,223 Views)
Hi needinfo,

I am still slightly confused how you are simulating removing the card. You mentioned that you are not turning the chassis power off at any time, so how are you actually removing the card? Also, in terms of the self-test feature in MAX, there is not a function to do that in LabVIEW, though you can try the DAQmx Reset function which will provide very similar results as far as returning an error if the device is no longer present in the system. This function can be found in the DAQmx pallette under Device Configuration » DAQmx Reset Device. Hope this helps,
Daniel S.
National Instruments
0 Kudos
Message 4 of 7
(4,201 Views)

Just to clarify, I am physically removing the card from the chassis, and as mentioned I risk damaging the card, so I don't want to do this any more than necessary.  The issue with the reset is that I want to do this health check while the system is running, and hence don't want to reset any output values or port settings.  Another person suggested that perhaps I set up a fake  I/O task with unused pins to test the system, which might prove to be a fair method, but that would have to be customized per design or per implementation.  It sounds like there is currently no good way to do what I hope to do, and DAQmx methods won't work with non-NI cards.

Perhaps an update to the VISA standard????

0 Kudos
Message 5 of 7
(4,191 Views)
Hi needinfo,

I was hoping you were doing something else to simulate removing a device besides actually physically removing the module with the chassis being powered. This is definitey discouraged as it can very likely cause damage to the module and/or chassis. I am interested in knowing if the device no longer appears in Device Manager when you remove it. I tried to simply disable a device in the Device Manager, but this updated MAX and I no longer found the device with VISA Find Resource.

As far as a method for determining if the device is no longer present, I would recommend trying a method similar to the previously mentioned method of trying to reset each DAQmx device and looking for an error. However, instead of using the DAQmx Reset function, I would try to simply open a VISA session to the resources returned by the VISA Find Resource function. If the device is no longer present in the system, the VISA Open function should return an error. Hope this helps,
Daniel S.
National Instruments
0 Kudos
Message 6 of 7
(4,171 Views)
hi needinfo,

Which OS is running the PXI system? Maybe a native call of some PXI/PCI device managing routines can give you the answer. 
How often do you need to check the presence? Once at startup?  Some OS have boot logfiles that might have an answer buried.


Just throwing in some maybe crude ideas (never been there, never done it ,nBTnDT)
(The PXI systems I use are all pure NI, so I hope VISA will give me the answer if I need it)

Good luck

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(4,149 Views)