LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

“Visa Read” read nothing when doing USB communication

    Hi,as a rookie in the labview field, recently I am doing USB communication between the lower computer and the upper computer, but my vi has read nothing.I used two I used two methods, respectively, using visa read and interrupt communication as shown below. After creating a new usb driver through NI-VISA driver ,both of them show the vid and pid of the usb device as shown in #-based programfig3, but the visa read of 1.vi outpost nothing while  2.vi shows an error Hex 0xBFFF003A which means illegal installer as shown in fig4. I'm sure the USB device have send something like #0000010BF9710.005656* because I've received it in another C#-based program. So can someone give me some suggestions for modification or some examples of usb communication. Thanks in advance.

Download All
0 Kudos
Message 1 of 13
(780 Views)

Hi 777,

 

which kind of device are you trying to communicate with?

Can you attach a manual, describing its communication protocol?

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 2 of 13
(774 Views)

Thanks for your apply,the device is a microfluidic device,the chips inside use TEXAS INSTRUMENTS. As for communication protocal, for the device is immature,I can only give a demo translated by me.

#           Data head   

0000     Time stamp 

01         Address

0B         Length

F9         Command 1

7           Command 2

1           Data 1 

0.00      data 

5757     CRC check    

*            End of data

So the #0000010BF9710.005757* is the message I should have received.I hope the  information above is helpful . I have been troubled by this problem for several weeks, and there is no similar example to refer . Thanks again.

0 Kudos
Message 3 of 13
(730 Views)

Hi 777,

 


@llllllx777 wrote:

the device is a microfluidic device,the chips inside use TEXAS INSTRUMENTS. As for communication protocal, for the device is immature,I can only give a demo translated by me.


Do that device come with some software (aka drivers to be installed)?

Which kind of USB communication type does that driver implement? (HID, TCM, VCP?)

Do you have any specific device type numbers?

 


@llllllx777 wrote:

#           Data head   

0000     Time stamp 

01         Address

0B         Length

F9         Command 1

7           Command 2

1           Data 1 

0.00      data 

5757     CRC check    

*            End of data

So the #0000010BF9710.005757* is the message I should have received.I hope the  information above is helpful .


That data message looks like intended to be sent over serial port: see my questions above.

(Your information is helpful, but still not enough to provide any better help…)

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 4 of 13
(721 Views)

Hi GerdW,

       Thanks for your reply. In fact the device comes with two software, one of them connects PC with wifi. And the other connects with usb, the second software only has the function of sending and receiving three protocol, so I decided to replace it by labview. As for driver, I create C:\UERS\\DOCUMENTS\NATIONAL INSTRUMENTS\NI-VISA\PREFIX by NI-VISA driver and  install it. The driver is  displayed in Device Manager as C:\WINDOWS\SYSTEM32\DRIVERS\winusb.sys. fig1 and 2 shows the device manager and the driver of device.

       I have no idea of the second question about USB communication type,the staff who developed the usb communication software also did not know. They told me the chip model is tms320f28377d, but I didn't find the key words like HID, TCM, VCP in the Technical Reference Manual of it.

       I also have no idea of device type numbers, you can give me an example and I will look for it. Maybe the USB information of the device can provide some help,so I put them in the txt below.

 

Download All
0 Kudos
Message 5 of 13
(687 Views)

Has anyone encountered the same problem?

0 Kudos
Message 6 of 13
(627 Views)

VCP is Virtual Communication Port. It is a USB Class device that all modern OSes can recognize and then will install as a normal RS-232 COMM port in the system. If your device is such a USB Class, creation of a VISA USB Raw device driver with the Instrument Driver Wizard and installing it was a bad movea as it now claims the device and doesn't let Windows handle it anymore. Otherwise it would have shown up simply as a serial port in VISA!

 

So try to deinstall the VISA driver for now and restart the computer and then see if you can find an additional RS-232 COM port under Window. If so you can simply open a serial port connection in VISA and be done with it!

Rolf Kalbermatter
Averna BV
0 Kudos
Message 7 of 13
(615 Views)

     Thanks for your advice!When I uninstalled the VISA driver, the driver became as shown in the below.2bbe70ae909363977f3d0fcaea7bfbc.png231324d9888612fb63e813af881f676.png

     Regrettably,I can't find an additional RS-232 COM port. So does this result reveal that my device is not  VCP?

     Thanks again for your help.

0 Kudos
Message 8 of 13
(591 Views)

According to this manual on page 1-18 the USB port on the smaller side of the board has three functions:

 

ICD  JTAG Debug interface

ICD DFU Firmware update Interface

Stellaris Virtual Comm Port

 

These will require drivers that should get installed automatically (I do assume that that requires that you have installed the TI development toolchain). If this is not the case and you installed the TI tools, then you have a problem with that installation (which might have been caused by you creating a VISA driver) and you need to resolve that, possibly by completely deinstalling the TI software and reinstalling it.

 

The BulkDevice seems to be the other USB connector when you run some of the firmware examples for comunication over this secondary interface (Lab 7 Example in that manual).

Rolf Kalbermatter
Averna BV
0 Kudos
Message 9 of 13
(576 Views)

      Thanks for your reply. In fact, I don’t think there is a problem with my driver. The reason is that no matter I use my own driver or the driver installed by NI VISA driver, I can receive information from the device on C#-based software. And when I run the labview vi I wrote, this C#-based software cannot communicate successfully, so I think the two occupy the same interface.

      On the other hand, the chip used in my device seems to be different from the chip in the manual you gave, I am not sure whether they use the same logic. Here's its manual but I havent found anything help yet.(also because I have no idea of what to found).

      Thanks anyway!

0 Kudos
Message 10 of 13
(540 Views)