09-02-2013 01:00 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?
I can upload the VI if you wish.
09-02-2013 01:06 AM
09-02-2013 02:11 AM
Albert, Tnx for your remark.. ur right..
This is my Vi in the attachment.. the program waits until it recieves one byte with value "255" from the port, then recieve 2500 bytes from the serial port.
I dont know what the "endchar" do! and how to define it.
Yes, I Have an electronic board which transfers data with 2000000 bit/sec bouad rate to my computer.
09-02-2013 03:08 PM
Hi
The end character is a way to stop a transfer before the requested number of bytes has been read.
So it is not what you want because in an array of bytes all chars happen and so at a strange point in time your transfer will stop.
In fact for all binary transfers the end char should be disabled.
In your case I would not wait for the second 255 byte but immediately start reading the next transfer. Only the first needs to be synced.
I'm sorry I'm not able to read your vi today because my system broke down and I'm installing a few extra versions of LabVIEW in correct (old to new) order.
09-03-2013 03:49 AM
OK.. I changed the VI and removed the wating sequence for "255". But the problem didn't solve and the transfer rate still is low...
I'm eagerly waiting for your response after installation of Labview.
09-03-2013 07:02 AM
Can you post your latest code so we know where you are at?
09-03-2013 11:23 AM - edited 09-03-2013 11:35 AM
OK. this is my lastest modification of the VI..
When I run the program the number of recieved data sets (5000bytes) is 3 or 4 sets per seccond..
and the actual data tranfer speed is 188717 bit/sec which is shown in the indicator.
you can see the front pannel in the JPG attached file.
09-03-2013 01:33 PM