05-04-2016 08:12 AM
I have a pretty simple VI that communicates to a USB Keithley DMM. I have turned it into an executable for internal distribution but when I try to use the VI with a different DMM it does not work. The only way I can get it to work is to manually change the serial number, save it, and make a new executable. Is there a way to have LabVIEW recgonize any DMM regardless of the serial number?
Solved! Go to Solution.
05-04-2016 09:24 AM - edited 05-04-2016 09:25 AM
Without seeing your code we can only guess...
Chances are the Keithley "Initialize.vi" has an option for ID Check.
Try turning that off in your source code.
05-04-2016 11:49 AM
I have attached the 2 sub VI's that to the setup and read. I appreciate any help, thanks.
05-04-2016 11:56 AM
I notice a lot of numbers in your VISA Resource Name. Are any of those numbers (such as 1242308) Serial Numbers of your Device? If so, you need to interrogate something to get that number, then use it to build the VISA Resource Name as appropriate.
Bob Schor
05-04-2016 11:59 AM
Yes 1242308 is the SN. 2100 is the model Keithly I believe. Not sure about the rest. I guess I dont understand what you mean, because I wont know the SN of any potential device that the VI might see
05-04-2016 12:05 PM - edited 05-04-2016 12:12 PM
If the serial number is in your VISA resource name then that is your problem.
Why not use a VISA alias for the VISA resource?
Then on the target machine you just use MAX (NI Measurment and Automation eXplorer) to set the VISA alias to match.
05-04-2016 12:06 PM
You can try something like this. Use a VISA FInd Resource, load up the results in a combo box, then have the user choose the appropriate device. I pulled this snippet out of a larger program. I don't know if it will work as-is, but you get the point of what to do.
05-04-2016 06:02 PM
So you can use Jamiva's suggestion to enumerate all of the VISA resources, look for which one has 2100 as part of the name, and use that VISA resource, which will already have the serial number of the device that is plugged in. No need to ask the user to choose the device -- just choose the Keithley (based on the model number, 2100).
Bob Schor
05-05-2016 11:09 AM
05-05-2016 11:29 AM
Any removed devices still have their saved aliases hidden and reserved, in case they get plugged in again.
See this article on how to delete them
As for finding it dynamically, try this:
That should search for any Keithley serial number, but only that model and only when connected via USB.