Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial read termination character

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.

0 Kudos
Message 1 of 8
(4,895 Views)
2500 bytes means 25000 bits, so at most 80 sets per second with 2000000 bits/sec.
And what has this to do with an endchar?
Another problem: do you really have 2000000 bits/ sec serial?
greetings from the Netherlands
Message 2 of 8
(4,893 Views)

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.

0 Kudos
Message 3 of 8
(4,882 Views)

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.

greetings from the Netherlands
Message 4 of 8
(4,855 Views)

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.

0 Kudos
Message 5 of 8
(4,839 Views)

Can you post your latest code so we know where you are at?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 8
(4,834 Views)

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.

Download All
0 Kudos
Message 7 of 8
(4,820 Views)

Duplicate thread


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 8
(4,809 Views)