01-14-2012 04:27 AM
I have to connect usb device for e.g. camera,i/o card,scanner etc...(not NI device) to my pc & want to detect it in a program
So if it is not connected to my pc ,My program should have to give message that,The device is not found.
How can i Do that ?
01-14-2012 10:33 AM
Try this: https://decibel.ni.com/content/docs/DOC-6743
If not search ni website.
01-18-2012 11:18 PM
How can i Write my usb address ?
From which directoey i can start to write address of usb device so i can detect it ?
01-19-2012 12:13 AM
Hello Kaku,
You can use this simple function to know the USB device is connected or not. If you run this function as per the diagram you got all the drives name available in your personal computer. If you got in the function output array size is different with the previous array size. You can easily say that some additional hardware is connected with the PC.
01-19-2012 12:15 AM
Please read the Steps to complete section in the link.
Excerpt here:
Steps to Complete
Identify the device you wish to monitor for:
1. Plug it into the system.
2. Bring up the Windows Device Manager and locate the USB device.
3. Under the details tab Note down the device instance ID, this varies from device to device but the last part after the final "\" is usually sufficient.
4. Bring up the windows registry (regedit in the run menu).
5. Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services.
6. Locate the device ID in one of the USB registry keys ( device must be connected, might be easier to search for it).
7. Note down the subkey (folder) the device is stored in. By default the VI uses USBSTOR, usbccgp, usbehci, usbaudio.
8. If the device falls under one of these subkeys you are ready to go. If not add the sub key to the paths in the VI.
Enter the Device ID into the VI and run it, the VI will check if the device is present and return a boolean. The VI is setup ready as a sub VI.
01-31-2012 02:26 AM - edited 01-31-2012 02:29 AM
Thank you so much for replying !!!
how to read the data coming from that device ?
e.g. if scanner is connected & barcode value have to be read.
From where can I take that value ? or
How can come to know that scanner is currently reading a barcode ?
01-31-2012 07:04 AM
@Kaku wrote:
Thank you so much for replying !!!
how to read the data coming from that device ?
e.g. if scanner is connected & barcode value have to be read.
From where can I take that value ? or
How can come to know that scanner is currently reading a barcode ?
Thant depends entirely on the scanner. Some act as HID devices (click the button and it scans a code and acts just like a keyboard entry) some act like COM serial ports, others have specific hardware adaptors that control IO and triggering.
Be specific about what device you are connecting. Have you read the manual for that device?
01-31-2012 09:34 AM
That Device act as a keyboard HID device
Suppose I want to assign a fixed port for scanner & other port for another scanner
both working simultanously.How to differentiate two data
Or
How can I read data coming from specific scanner
Thank u fr rplying