From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically changing device ID/name in VISA or IMAQdx session?

Solved!
Go to solution

I have an application where I have a camera (running through IMAQdx) and a motor running through serial communication (VISA).

 

My challenge is this: The solution is deployed across a number of computers and the camera and motor IDs may change from one computer to another. To deal with this, each computer has a unique config file that contains amongst other things the IDs of the devices attached to that computer.

 

Is there an easy way to read a text string and have that entered as the device ID handle in both VISA and IMAQdx sessions? (The solution may be different for the two.)

 

If I take a VISA reference, for example, I cannot find an option on the properties drop down menu to change the session identifier. I can read it, but I can't write to it. Any ideas?

 

 

 

0 Kudos
Message 1 of 3
(3,372 Views)
Solution
Accepted by caleyjag

Hello,

 

you can use Visa Find, set the search mode to Alias Only, then use index array for its find list, or you can leave the find list of Visa Find as is, depends on waht you want to do. then try to use type cast for your proper visa ref.

 

See my example below;

visa find.PNG

 

 

 



Thank you & Best regards
syrpimp

=======================================================
“You must continue to gain expertise, but avoid thinking like an expert." -Denis Waitley
Message 2 of 3
(3,344 Views)

Great. I did not think to use this type of approach. I tried it and I think this is going to work. Thanks!

0 Kudos
Message 3 of 3
(3,334 Views)