LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

probe a device handle to see if valid

How can I verify a device handle passed to me is valid?
0 Kudos
Message 1 of 3
(2,608 Views)
mykotronx,

What type of device handle are we trying to check?

For VISA, File I/O, DAQ, etc. we do not need a specific check for valid device handle. All of this is done internally with the VIs that act on the refnums. All we need to do is monitor the error cluster coming out of the VIs and act upon it.

Please see the links below for more information on error clusters.

Rule #36 of Rules to Wire By

Error reporting in the development of instrument drivers

Hope this helps. Please let me know if this is not what you are referring to.

Regards,

Mat
t F
0 Kudos
Message 2 of 3
(2,608 Views)
Matt F wrote:

> For VISA, File I/O, DAQ, etc. we do not need a specific check for
> valid device handle. All of this is done internally with the VIs that
> act on the refnums. All we need to do is monitor the error cluster
> coming out of the VIs and act upon it.

But even so the Not A Refnum/Path function in the Comparison palette
also works on at least VISA, network, File I/O and LabVIEW refnums.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(2,608 Views)