‎08-28-2013 09:09 AM
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...
‎08-28-2013 10:14 AM - edited ‎08-28-2013 10:15 AM
In actual application sending 71 bytes only but while posted the query as 10 bytes for example.
In receiver receives 72 bytes?
‎08-29-2013 12:11 AM
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
‎07-10-2014 01:42 AM
Did this issue every get resolved? I'm having a similar issue, except that it's intermittent.
‎07-10-2014 06:42 AM
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.
‎07-10-2014 09:36 AM
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