11-19-2015 05:42 AM
Hi All,
I'm developing an automated test solution using LV and TS and as part of the configuration of the system I am using the System Configuration API to find out what instruments are present in the system so that I can programmatically determine whether or not certain blocks in the TS sequence can be run. Unfortunately it appears that if MAX has scanned the GPIB bus and found instruments there previously and then susequently an instrument has been removed from the system this will not be reflected in MAX until another manual scan for instruments has been performed. Is there a programatic way of getting MAX to update what instruments are resident on the GPIB bus?
Thanks,
Nick
11-19-2015 05:55 AM
It would have helped if you had posted your code or at least a screenshot...
There are a few options in the System Configuration VIs that help you to detect if a device is present or not - do any of these help?
The first has an option to detect systems (I think that might mean finding remote targets like cRIOs though) and also to ignore cached results (i.e. ones already existing in MAX). The second should allow you to return only systems that are 'present' and the third you can use to detect if a particular hardware device is present or not.
11-19-2015 08:02 AM
Hi Sam,
Thanks for the quick reply. I think you are correct in that the detect online systems finds remote targets cRIO's and RT based PXI etc. I tried the System Hardware "IsPresent" node and was surprised to see that it still returns VISA instruments that are, in actuallity, not present. I think this is because the cached entry in MAX does report that the instrument is present even when it's not, unless you scan for instruments. Of course if the instrument is not connected then it disappears from MAX if you do this. What I'd hoped the IsPresent node would do is exactly what you suggest but it appears that it doesn't, it just reports what MAX has in it's cache. I'm basically using a slightly modified version of the "Find all Hardware.vi" shipping example.
Thanks again,
Nick
11-19-2015 08:13 AM
I guess with Serial/VISA based instruments, the only way to detect if they are present is to probe them and see if they respond? The System Configuration VIs can probably only tell you if the bus hardware is there (e.g. the GPIB / COM port).
Other than, 'write some code to check if the devices are there', I'm not sure what else to suggest.
There are some other VIs related to GPIB (I've only got limited experience with GPIB) such as being able to poll devices etc.?
11-19-2015 08:33 AM
Thanks for your time Sam. I used to interogate the system in this way but didn't like having to perform multiple interogations for each type of instrument, GPIB, Serial, Network, PXI etc..... So hoped that this single API would do it all but alas not. At least not yet.
Thanks again,
Nick