LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extra one byte data reception in serial (UART) reception

If these pictures accurately reflect your code, it looks like are transmitting a lot more than 10 bytes. The numeric array you assembly before it goes to the for loop has 70 elements in it (a three element array, three scalar values and an array of 64 zeros). At least that's what seems to be in it - the code is very badly layed out. Also, the array isn't of U8s, you can tell by all the coersion dots. Finally the checksum gets appended to the data (to make 71 elements) and it gets coerced to U8s when converted into a string for transmission.

 

All these coersions will probably cause you problems in the future.

 

Now on the receive side, you are setting the read timeout to one minute and then reading some number of bits from the port. The number of bytes is set by a control. This leaves the rest of the message in the receive buffer. You continue this process untill you press the stop button. Assuming you are reading 10 bytes at a time, it will take you more than 8 reads to get one entire message, and the last read will timeout.

 

What are you trying to do?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 11 of 16
(632 Views)

In actual application sending 71 bytes only but while posted the query as 10 bytes for example.

 

In receiver receives 72 bytes?

 

 

with regards and warm welcome,
Ramamoorthy S
0 Kudos
Message 12 of 16
(624 Views)

See this link. This is not exactly like yours but use the VI as upladed there with some modification as per your requirement.

 

Let me know

--------------------------------------------------------------------------------------------------------
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 13 of 16
(605 Views)

Did this issue every get resolved? I'm having a similar issue, except that it's intermittent.

0 Kudos
Message 14 of 16
(547 Views)

This is a stale post that is almost a year old. You should start a new thread and reference this one if it has information that is applicable.

 

Mike...

 

PS: when you repost, include your code. Saying "me too" isn't enough data for us to work with.


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 16
(532 Views)

Hey Mike,

 

I did start my own, but was hoping maybe the user might still be active in the event that he had solved the problem himself. My thread is here:

 

http://forums.ni.com/t5/LabVIEW/Intermittent-Extra-Serial-Byte-in-Visa-Read/td-p/2915952

 

Tino

0 Kudos
Message 16 of 16
(515 Views)