Megatron Posted December 4, 2008 Report Share Posted December 4, 2008 I have a very unusual question. I am accessing my ATmel device from Lab View through USB. Its bulk in format. I am using The VISA open,Read, Close blocks properly as specified in the example provided by NI. I receive 100 packets each of 960 bytes.I a saving this in a text file. Its a simulated data, so each packet will receive only data of that particular packet number(in hex),for eg: packet 1 will receive only 1's and so on. i capture this data and i observe that packet 1 has 500 bytes of 1's and the rest 460 bytes of 2's.What exactly is happening is second packet's data is getting overwritten in the first packet's data. The board is sending data every 20 ms. I crossed checked it in hyper terminal i saw that my device is sending all values properly.So from firmware side there is no issue. I am not doing any sort of processing in between. I directly capture the data received from the board. The timeout given in VISA Open is 2000 ms and the byte count given for VISA read is 5000. Is it a timing issue or anything else? Quote Link to comment
Mark Yedinak Posted December 5, 2008 Report Share Posted December 5, 2008 Can you post an example of your code? I have used the VISA USB VIs for several years to communicate with various printers. I suspect it is something in the way you are doing it that is causing you a problem. Also, is your application going to need to continually read data or is it more of a command and response system? If you are continually reading a data stream is the data formatted in such a way that you can read it in fixed sizes or will you need to simply read and pass the data off for processing? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.