10-16-2014 01:53 PM
I am able to access and modify registry values for some of my USB devices through LabVIEW, but only when I know the exact key name.
For example:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6001+FTH9KY10A\0000\Device Parameters
This works great assuming I always use th exact same device (VID_0403+PID_6001+FTH9KY10A is specific to the device)
Is it possible for me to search through HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\ and load all of the subkeys into an array?
10-17-2014 07:55 AM
It's not ideal, but one way I have figured out to search for attached USB devices using the FTDI driver is by looking in the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FTDIBUS\Enum\
It contains a DWORD number called "Count" which tells how many devices are connected
and also contains the name of the device starting at number "0"
If I pull the data from "0" into a string then i can retrieve the VID, PID and serial number of the device and use that to generate the subkey I need change settings settings such as 'Polling Period', 'Timeout' and 'Latency'.
Subkey:
SYSTEM\CurrentControlSet\Enum\FTDIBUS\VID_0403+PID_6001+FTH9KY10A\0000\Device Parameters\
10-17-2014 09:25 AM - edited 10-17-2014 09:26 AM
I don't know if this is faster or better, but I think one method that would work is using the command line tool Devcon
https://forums.ni.com/t5/LabVIEW/List-of-USB-devices-and-port-ID/td-p/1475836
I downloaded devcon, and ran the VI posted, and it listed all kinds of devices USB and other. Not sure if yours would be in the list or the format.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-17-2014 10:29 AM
Thanks for pointing me to the link. The vi included on that thread works great for looking up devices. I will definitely keep that program handy for later.
However, as far as using it to get the subkey location I want, it is as cumbersome as my previous post.
I would need to scan for the device, pull the VID, PID and serial number over and concatenate them into my subkey string.
I really would just like to search all paths located underneath a registry path
Example: List all paths located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
From the picture below I would like to see; Control, Enum, Hardware Profiles and Services returned