07-07-2011 08:32 AM
Hello,
I was working on a simple program and found the problem whose image is attached in this post. I have a cluster of 31 elements, and I am concatenating all inputs and also using end of line constant.
If I dont use end of line constant, data from outrush_limit_state (cluster element) & vo1(cluster element) appear in same line,.
After using end of line constant, I can see that there is blank line between 2 values in the final output (which I want to see) but not with some data, why is this behavior?
I am using 8.6.
What basic understanding am I missing ?
Solved! Go to Solution.
07-07-2011 08:47 AM
Can you post your actual code with data? It would be much easier to help that way.
07-07-2011 08:50 AM
1) Are you sure that the individual strings don't have a new line / carriage return already appended to them?
2) Are you sure your text box is wide enough and isn't somehow wrapping the text?
I ask 1) because your front panel is showing a blank line... you wouldn't get this from concatenating a EOL. The EOL would just give you a new line, not a blank line. The offending outputs may be missing an new line character whilst the others are not.
As always, posting some code and default data would help...
07-07-2011 08:52 AM
A single EOL should not give you a blank line separator. That takes two EOLs. You seem to have some EOLs embedded in your original text strings. Show the codes on your output text string and you will probably see them (right click string indicator and select '\' Codes Display). Do not be surprised if you see either CR or LF by itself next to your EOL (which is a CR/LF in Windows). You can also create a custom probe with the codes shown to probe your original values.
07-07-2011 10:10 AM
Please...
If you really want all cluster elements in the existing cluster order, your current code can be replaced by "cluster to array" followed by "array to spreadsheet string with newline as delimiter. To cleanup your array elements, use "trim whitespace" first.
07-07-2011 10:20 AM
Thanks all for the reply, had forgotten that response what I am getting from serial device adds new line character, I used trim whitespace to remove unrequired stuff, I am getting what I expect. Its all good, thanks
07-07-2011 10:34 AM - edited 07-07-2011 10:34 AM
Staying on topic, don't forget to support Jim's Idea to make "trim whitespace" work on arrays directly. 😄