09-02-2013 03:41 AM
Hi all
I want to read an array of 2500bytes from serial port with bouad rate set to 2,000,000 bit/sec. I'm supposed to have 2500 bytes 100 times in every seccond ((2000000/8)/2500) ,but I just have it 3 or 4 times in a seccond... what should I do?
This is my VI in the attachment..
My program waits until it recieves one byte with value "255" from the port, then recieve 2500 bytes from the serial port.
09-02-2013 04:06 AM
What do you mean by 2,000,000 bit/sec, never heard about it....
((2000000/8)/2500) here instead of 8 it needs to be 10 or 11...
Upload the VI in 2011 format.
09-02-2013 04:36 AM
Thanks for your time.
I'm Sending the data with a ATMEL XMEGA micro controller which provides a bouad rate equal to 2,000,000bit/sec.
I don't have LabView 2011 but I attached a jpg of the block diagram.
09-02-2013 04:54 AM
You dont need 2011 for that. Go to file --> Save for previous version then select 2011
09-02-2013 04:57 AM
Please make sure it is 200000b/s only because it needs to be multiple of 9600
09-02-2013 04:58 AM - edited 09-02-2013 05:00 AM
One more thing, reading two consecutive times may loose some data
09-02-2013 05:47 AM
Open and close VISA is slow and should be done outside the loop.
/Y
09-02-2013 06:12 AM
1- I have attached a modified VI in 2011version.
2- I made sure that the transfer boaud rate is 2,000,000bit/sec.
3- I moved the VISA configuration outside the loop.
09-02-2013 06:13 AM
Tnx for your reply Yamaeda
I moved the VISA configuration outside the loop. you can check it in the attachment above.
09-02-2013 10:35 PM
Buffer size needs to be always greater then expected bytes to be read. Instead of two consecutive read, read all bytes all the time and after completion of reading if 255 is there then read next 5000 bytes otherwise discard it.
Is it ok?