03-22-2012 05:33 AM
Hi there (again),
I had some problems with LabVIEW for ARM 2010 with strings (and sending this string data to UART and USB, to my pc)
I was adding <CR><LF> to end the lines and in hyperterminal/putty/LabVIEW pc application I always receive just a single <CR>
I've looked to what to code generation does with "End of line" constants and strings that have "\r\n"
A end of line constant difers from which version you are using of LabVIEW (windows = <CR><LF>, Linux = <CR> or something like that)
You can find this in LVDefs_plat.h with the define SSEOL, this is "\r" (Carriage return)
programming my code I use string constants to add an end of line ( "\r\n" )
Also here, the LabVIEW code generation makes it just a Carriage Return.
Looking at the code, it is placing also a SSEOL, which is a "\r"
If I make a constant like "\r\nblablalb\r\n", I have a string with <CR><LF>
I think it's a problem when you define a constant (not a end of line constant vi) string explicit with just "\r\n" that it makes it a SSEOL ( "\r" )
My workaround is:
defining two constant strings ( "\r" and "\n" ) and concatenate those strings. LabVIEW code generation will make two constants "\r" and "\n" and your code makes it a "\r\n".
I will use this workaround for myself and I hope that others can use this if they have this problem also.
Wouter
01-04-2013 04:50 AM
Hello Sir, I am currently working on a vi which sends commands and in return gets the response from the device like the parameters, but i get only responses for few commands and if i ask for few others it throws an error, could you please help me with it? the device i am communicating is a small signal board. thanks in advance
01-04-2013 05:03 AM
Hi Vinod00,
I think you should start a new topic.
But I've done a quick look at your code.
you are sure that the commands you send are correct? (with spaces etc and checking on end of line) windows EOL and ARM EOL are the same?
why you are reading 100 bytes back exactly? is this always 100 bytes? otherwise the function will wait for 100 bytes. (try to just reading the bytes that are at port)
01-04-2013 05:29 AM
So could you just try modifying it and sending it back to me, as i have to finish this within today.Thanks in advance.
06-16-2018 08:52 AM
I am trying to send a character R through serial port to a sensor through arduino board. My program is attached here. Unfortunately im not able to read my sensors and getting error. I have attached my program and error snapshot.
The same sensors in arduino IDE does read on sending R in the serial monitor of arduino but not sure why not displaying results in labview. please check
Thanks for the help