LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial Send speed

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.

0 Kudos
Message 1 of 24
(3,773 Views)

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.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 24
(3,767 Views)

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.

0 Kudos
Message 3 of 24
(3,761 Views)

You dont need 2011 for that. Go to file --> Save for previous version then select 2011

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
Message 4 of 24
(3,754 Views)

Please make sure it is 200000b/s only because it needs to be multiple of 9600

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 24
(3,752 Views)

One more thing, reading two consecutive times may loose some data

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 24
(3,751 Views)

Open and close VISA is slow and should be done outside the loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 7 of 24
(3,740 Views)

Ranjeet_Singh

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.

0 Kudos
Message 8 of 24
(3,734 Views)

Tnx for your reply 

I moved the VISA configuration outside the loop. you can check it in the attachment above.

0 Kudos
Message 9 of 24
(3,733 Views)

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?

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 10 of 24
(3,701 Views)