Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Read USB port data

Hi,

 

I have a circuit board built which is connected to my computers USB port. The device gives me GPS data in hex format.

 

What I need to do is to scan the USB port to read the data and convert it to readable format. I am not required to write anything to the USB port.

 

What toolkits am I required to use to read the data on the USB port?

 

Thanks,

Sandeep

0 Kudos
Message 1 of 9
(4,871 Views)

Sample data that will be sent on the USB port:

 

0x10, 0x8E, 0xA5, 0x40, 0x21, 0x00, 0x00, 0x10, 0x03

 

where 0x10, 0x8E are the start bits and 0x10, 0x03 are the stop bits.

0 Kudos
Message 2 of 9
(4,870 Views)

If you have no form of pre-existing driver, you will want to install NI-VISA which will allow you to program communication with the device using LabVIEW and other languages.  If you have a dll or some other pre-existing driver, you may want to use a series of Call Library Function nodes in LabVIEW to use that dll.

 

This tutorial has some information on how this device would be set up.  You will need to configure the your instrument as a USB RAW class device.

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 3 of 9
(4,849 Views)

I have a temperature sensor that is connected to the PC via a USB. The device manufacturer supplied a simple program that has an exe and a few DLL files. I'd like to read data from this device, but the exact protocol is unknown. I tried to use NI-VISA Read VI or VISA USB Read controls, however it could not detect any USB devices as VISA resource.

 

Does this mean it would be impossible to read data from this device?

0 Kudos
Message 4 of 9
(4,102 Views)

Not impossible but via the dll of the provider is a possibility, The vendor should give that information.

greetings from the Netherlands
0 Kudos
Message 5 of 9
(4,100 Views)

Do you mean the manufacturer would provide a header file .h that is required for importing a DLL? The DLL is available already.

0 Kudos
Message 6 of 9
(4,099 Views)

or even better has a LabVIEW interface....

greetings from the Netherlands
0 Kudos
Message 7 of 9
(4,097 Views)

It is definitely does NOT have a LabVIEW interface. I can definitely say that the interface was written using Microsoft Visual Studio, in C++.

0 Kudos
Message 8 of 9
(4,096 Views)

It always has a hardware interface. And that can be accessed directly in LabVIEW or in C++.

Both are programming languages and also both can call dll's from each other. Only with complex data types you can have real troubles, but still it is doable.

greetings from the Netherlands
0 Kudos
Message 9 of 9
(4,094 Views)