06-08-2017 05:37 AM
Is there any function which can detect if one USB port is available to insert to PC? Please help me .
06-08-2017 05:51 AM
Hi,
If you use FTDI devices you can detect them by a name which is programmed into the devices.
Kees
06-08-2017 05:58 AM
google came up with an answer
https://forums.ni.com/t5/LabVIEW/Programmatically-read-list-of-Windows-USB-ports/td-p/1013586
which links to
so you would need the tool "devcon.exe"
see https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/devcon
and run it with the "System Exec.vi"
to get the devcon tool, you would either have to get (and install) the WDK,
or trust this guy http://forums.ni.com/t5/LabVIEW/Device-manager-Disable-the-Secondary-IDE-channel/m-p/793778#M362380
hope that is what you were looking for
06-08-2017 06:00 AM - edited 06-08-2017 06:01 AM
https://superuser.com/questions/1002950/quick-method-to-install-devcon-exe
http://digital.ni.com/public.nsf/allkb/8E19CA81874FFDD786256BE40066C151
06-08-2017 10:53 PM
Thanks your reply, yes, I used FTDI devices, could you help me which function should i use to detect the devices name?
06-09-2017 02:44 AM
Hi,
With the FT_PROG utility from FTDI you can configure your FTDI device. With this you can also give it a custom serial number/name.
One of the FTDI VI's is open device by serial number. With this handle you get from this VI you can retrieve more information like COM port number.
Let me know if you need more information.
Kees
06-09-2017 04:03 AM
Thanks for your reply, I am sure your way may works well. But first ,I need to find this VI(One of the FTDI VI's is open device by serial number), haha, That will be wonderful if your have this VI......
06-09-2017 04:03 AM
Thanks for your reply, I am sure your way may works well. But first ,I need to find this VI(One of the FTDI VI's is open device by serial number), HAHA, That will be wonderful if your have this VI......
06-09-2017 04:18 AM
Well I cannot find it myself anymore at the website. But here is the ZIP with the original VI's and the VI's that I made (as drivers) with error handling.
Kees