LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set visa resource name programmatically

There is a way to set visa resource name programmatically,
 
ex; ini file look likes:
 
Id    port 
D1  com2
D2  com3
...
 
Thanks,
 
LabView 8.0
0 Kudos
Message 1 of 3
(3,814 Views)
Is this a question or a comment? If it's a question, what is your question? Are you asking if you can provide a programmable value to VISA Open? If so, the answer is yes. Simply create the VISA resource name as a string and wire it to the "resource name" input. That input accepts a string. You can check the LabVIEW documentation for the proper format of the resource name. If you're using aliases like "COM1", "COM2", etc, these need to first be defined in the visaconf.ini file. This can be done via MAX (Measurement and Automation). Alternatively, you can have a simple VI that creates the proper resource name based on your alias (probably the better approach). So, for example, COM2 = ASRL2::INSTR.
0 Kudos
Message 2 of 3
(3,801 Views)
Yes it was a question and you answer it.
0 Kudos
Message 3 of 3
(3,794 Views)