LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial read issue

Solved!
Go to solution

@

The DUT (device under test) sends data continuously without any termination character till it is stopped.

Also, the bd3 version works fine.

0 Kudos
Message 11 of 17
(491 Views)

Hi jpparmar,

 

The DUT (device under test) sends data continuously without any termination character till it is stopped.

Then you need to DISABLE the TermChar at the VISASerialConfig VI!

 

Did you read the LabVIEW help until now as suggested here?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 17
(482 Views)

@jpparmar wrote:

@

The DUT (device under test) sends data continuously without any termination character till it is stopped.


Unless one of those binary values accidentally happens to be a termination character. If you have flattened floats in the data (or strings!), \r's or \n's can\will occur in the binary data.

 

We're just saying it's a bad idea. It might not be related to the problem. Suit yourself, just be warned.

 

What is the baud rate, and why did you mask it? If the baud rate is very high, I can imagine the serial buffer is full before you read it again. Never been in that situation, but I guess it could happen.

0 Kudos
Message 13 of 17
(477 Views)

@jpparmar wrote:

bd3 works fine. it receives 100 bytes and stops.

while bd1 works but byte locations are shifted.


Does your DUT have a data frame that is uses?  For binary data, that typically consists of a start character(s), a message type and/or data length, data, and a checksum/CRC.  If you are getting shifted byte locations, it is typically due to you not being synced up to the data frame.  If you have the frame definition, we can help a lot more.

 

And, as has already been said, you need to disable your termination character (Boolean input on the top of the VISA Configure Serial Port).  That is only useful for ASCII protocols.


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 14 of 17
(459 Views)

@GerdW

Working fine now after forcing the TermChar to False. 

Thank you.

0 Kudos
Message 15 of 17
(436 Views)

@jpparmar wrote:

@GerdW

Working fine now after forcing the TermChar to False. 

Thank you.


Why could have known...

0 Kudos
Message 16 of 17
(426 Views)

wiebe, GerdW, crossrulz

thanks guys for the help.

0 Kudos
Message 17 of 17
(424 Views)