LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically check if instrument is connected

I have also run into this same issue and don't believe I like any of the provided answers for my particular situation. As opposed to starting a new thread I thought I would keep this one going. 

 

Before running my program, this popup comes up to show the user whether the insturments are connected or not. In the case that an instrument is not connected, I would like the VISA resource name to come up empty. The problem is however that because of the default value set, it still comes up with the values in it, whether or not the actual VISA connection shows up in the list when clicked on. Is there a way to still have default value, but to not populate those if the insturment isn't connected when checking? I'd like the be able to make it so the user typically doesnt' need to mess with the selection of the VISA insturments, but can just click continue.

 

VISA_PANEL.png

0 Kudos
Message 11 of 15
(1,264 Views)

hi rkmadse,

 

It seems like your VI is already set up to add this functionality quite easily. You already have logic implemented to detect if instruments are missing by checking if the resource names match the default values, so you could add logic in that case structure that would overwrite the VISA name strings with a blank value  if the resource name is empty (without having to change the settings for default resource name values).

0 Kudos
Message 12 of 15
(1,221 Views)

My problem is that by default these names populate, whether or not the resource is actually on the drop down list. I was hoping to programmatically refresh the list and remove the default string value in the event that the default isn't actually connected. Did that make any sense.....?

0 Kudos
Message 13 of 15
(1,205 Views)
one of the best example for this question is what you can find in arduino toolkit for find visa port
0 Kudos
Message 14 of 15
(1,189 Views)
You changed the default value for a VISA Resource Name. If you don't want to change the default back to something empty, just write to a local of the control. It's just an empty string.
Message 15 of 15
(1,168 Views)