LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA USB RAW Mode - Transmission Speed BulkIn

Hello everyone,
 
I am developing a High-Speed Labview Interface with an USB device (a PLX NET2272) created by my own. I have decided to use the USB Raw Class, because I won't need any high-level instrument commands. So far USB is working properly, and the steps I did are the following:
 
1.) using VISA Driver Development Wizard
2.) bind it into my Win XP system
3.) using NI-VISA IC to get Bulk In/Out and Interrupt In Status - everything is ok (I can also read the whole bunch of optional strings)
 
In my Labview Application I am doing the following:
- using the Interrupt In Endpoint to determine how many bytes I want to transfer over the BulkIn Pipe
- after a defined message is received over the InterruptIn pipe I am starting the BulkIn Transfer with -->
- VISA Open, VISA Read and VISA Close to get e.g. 100kByte
 
This is all working fine (besides some minor stability problems) - but I have measured the time the VISA Read needs to transfer the data - and it is too slow!
 
The time needed corresponds to the following: the HighSpeed BulkIn MaxPacketSize is 512Byte, and I need for 100kByte approximately 200ms, for 190kByte app. 380ms and so on. That would mean that the VISA Read VI will just get one packet per millisecond (?) - but the USB Spec defines 13 allowed transactions(packets) per microframe, and 104 transactions per frame (millisecond).
 
Do I have to search the error in my firmware or is VISA Read really that slow? I mean there are a lot of High-Speed Instruments on the market. They are achieving a lot more - but with self written Windows drivers I guess.
 
please feel free to comment
 
thanks so far
 
gmb
 
0 Kudos
Message 1 of 5
(3,353 Views)
gmb,

maybe you are using USB 1.1?
There is a forumentry on that here.
Ok, you only get to about 1/30 of the stated transferrate, but maybe you can change the packetsize and check if you get a better result.

Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(3,320 Views)
hello Norbert,
 
no I am not using USB 1.1 - the PLX is a High-Speed USB device and its connected in this mode.
besides - the packet size is already the maximum the USB standard allows in this transfer mode Smiley Wink.
 
but I have located the problem in my firmware and sram read outs. because of a "slow" risc processor with only 50MHz and some unoptimized loadings into the usb buffers I just reacted to slow for IN tokens of the host controller.
 
the actual speed I've reached is about 35MBit/s - that suits my requirements well.
 
summary: VISA read is as fast as your code on any attached device. But now I just have another problem with using interrupt and bulk transfers on the same visa resource. It seems as I have to close the session every time I want to use another transfer type. But a VISA close needs a lot of time...I will see how to handle that problem.
 
thanks so far
 
martin (gmb)
0 Kudos
Message 3 of 5
(3,305 Views)

Hi, I just started evaluating the net2272 which I would like to use as a "low performance" DAQ interface (a few 100 MBit/s).

Did you finnaly solve all the problems you described, concerning the NI-VISA driver development for the USB host, if yes does

it run under Windows XP ?

Did you wirte some initialization procedure on the Local Bus side (for a CPU), if yes could you let me have it just as an additional

source of information ?

thanks 

0 Kudos
Message 4 of 5
(3,115 Views)

hi

it seems you were able to solve issue of unoptimized data in your visa buffer. mine is also getting slow. please do tell me how you calculated speed of your data received in labview


@cube_mb wrote:
 
hello Norbert,
 
no I am not using USB 1.1 - the PLX is a High-Speed USB device and its connected in this mode.
besides - the packet size is already the maximum the USB standard allows in this transfer mode Smiley Wink.
 
but I have located the problem in my firmware and sram read outs. because of a "slow" risc processor with only 50MHz and some unoptimized loadings into the usb buffers I just reacted to slow for IN tokens of the host controller.
 
the actual speed I've reached is about 35MBit/s - that suits my requirements well.
 
summary: VISA read is as fast as your code on any attached device. But now I just have another problem with using interrupt and bulk transfers on the same visa resource. It seems as I have to close the session every time I want to use another transfer type. But a VISA close needs a lot of time...I will see how to handle that problem.
 
thanks so far
 
martin (gmb)

 

0 Kudos
Message 5 of 5
(2,289 Views)