LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LFCR Not CRLF

Hi,

 

I am currently reading data using TCP IP Read. The output of the board that i am reading is random in terms of the length of data (not by alot but by a couple of bytes.

 

I have checked to see why CRLF is not working when i read this data and it looks as if the output of the board ends with LFCR and not CRLF.

 

Is it possible to create a new "Mode" for the TCP Read?

 

Does anyone have any suggestions to a simple way around this. I have looked and there doesnt seem to be any solutions to this.

 

I dont have control over what is coming from the board so my only solution will be to control what i read from LabView side.

 

Thanks alot

 

Alex

0 Kudos
Message 1 of 10
(3,248 Views)

Cant you set end of read to just CR?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 10
(3,238 Views)

@detox92234 wrote:

Does anyone have any suggestions to a simple way around this. I have looked and there doesnt seem to be any solutions to this.


I don't know if you would consider this simple, but the answer that comes to mind is to write a wrapper for the function which will read one byte at a time in a while loop and look for the LFCR termination. Note that if you do get some bytes, you will need to adjust the timeout for the subsequent reads to compensate for the time that already passed.


___________________
Try to take over the world!
0 Kudos
Message 3 of 10
(3,231 Views)

What board are you trying to read from?  Is it something you (or your company) developed and you are now trying to test it?  I would consider this a bug in the firware.


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 4 of 10
(3,216 Views)

Hi,

 

Thanks for the quick response. Could you please explain how to do this?

 

I can only see the options of standard, immediate, buffered, CRLF is it possible to create my own modes?

 

Thanks again

 

Alex

0 Kudos
Message 5 of 10
(3,173 Views)

Hi,

 

The boards are developed by the company i work for yes, but i do not have access to the source code to modify it.

 

It is a pain but what can i do,

 

I am basically reading an output that give me a string followed by a LFCR but as i cannot set it to read a certain ammount of bytes, and the last value outputed is constantly changing im not sure what else i can do to isolate the one full string of data.

 

Any help is greatly appreciated

 

Thanks

0 Kudos
Message 6 of 10
(3,163 Views)

I'd guess you can use Immidiate mode to read a byte at a time and search for the end sign?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 10
(3,146 Views)

HI,

 

Just to let you know, i got it sorted by altering the firmware of the board to end strings with CRLF and not LFCR.

 

But thanks anyway.

 

Alex

0 Kudos
Message 8 of 10
(3,082 Views)

That sounds like what Crossrulz was telling you in his message #4.

0 Kudos
Message 9 of 10
(3,079 Views)

@RavensFan wrote:

That sounds like what Crossrulz was telling you in his message #4.


Not only does it sound like it, it is EXACTLY what I recommended.  It's always the simple answer that works the best.


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 10 of 10
(3,049 Views)