03-13-2009 11:23 AM
Hi
I am probably overlooking something quite simple here. I am reading in commands from a .txt file, one of my commands is used to specify the termination charcters that I want added to the end of all subsequent serial communications message strings. So my .txt file command may read: Termination Characters=\r\n
In my Labview code I need to be able to convert the \r\n text to a real carriage return\line feed string that I can then contacenate onto the end of my message string.
I am aware of of how string controls and indicators can be made to display the \ codes but that is not my probem here as I am actually not using any controls or indicators anyway. I'm simply reading the control code text from a file and want to convert them to "real" control codes for inclusion in another string, as if I had contacenated the carriage return and line feed constants to another string within LabVIEW.
In otherwords how can I parse the backslash codes so they result in their constant equivalents?
Hope this makes sense
Thanks
Tristan
03-13-2009 11:52 AM - edited 03-13-2009 11:52 AM
Take a look at the code below, it uses the Search and Replace String function to do what you are trying to do. Let me know if this doesnt help.
03-13-2009 11:58 AM - edited 03-13-2009 11:59 AM
... and if the cr lf are not always together...
Ben