Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

several problem about USB-RAW develop!

Hello everyone!
I'm working on USB-RAW device recently!The firmware is the EZ-USB FX2  !After develop its driver by VISA Driver Developent Wizard! The test of Basic I/O& Interface I/O  in VISA Test panel can working well.
 
The first question is that: To test acquisiton data  whether missed,  i control the firmware send 1 to FFFF to the application program which read data from Read Buffer of Visa Read function(and the byte count of visa read is 512).And i use Visa Read function in For Loop to read buffer every 10 ms for 4 times, and do the same test using 100ms and 1s .However i found that for the first frame (buffer) the front 256 datum are sequence(such as 1 to256 ), the back 256 datum will abnormal. And the same thing happened for the second frame(buffer)More , the second frame data is not started form 257. What's happened !!!The problem happened in my firmware program or the vi!
 
The second, after reading buffer from firmware ! I want save all the data to a file. In which way should i choose to save and so many data(more than 40K byte/s)! And more,if there is more than one channal.That to say i should split the data from read buffer first, then save it in the same file and later i can read the separated date from file!
 
Any suggestion!
And sorry for my poor english!
0 Kudos
Message 1 of 3
(3,155 Views)
Anyone help me!!Smiley Sad
0 Kudos
Message 2 of 3
(3,127 Views)

Your vi opens the link to usb and the file

then you start reading the data and write this to the file without checking for an error in the read.

You can also display the dat i the for loop in a second array so you see what happens realtime

and you can do it slower.

Does your device always send 512 bytes?

why do you typecast the string to u16? what are you expecting to receive?

 

A lot of questions but maybe you find the answer yourself now, without hardware and .sys file I cannot directly help you

greetings from the Netherlands
0 Kudos
Message 3 of 3
(3,122 Views)