08-14-2018 07:39 AM - edited 08-14-2018 07:41 AM
@laps682 wrote:
Also, I tried implementing the headers that was suggested and you can see the result below... not sure why the tabs are also not applied in the same way as the numbers but I am assuming it is due to one of the arrays being numeric and the other a string but I am not sure, can somebody advise?
For the file name, I realized that I can just create a control that prompts the user to name their file. However, if the filename already exists, an error occurs at the "close file" block. How do I go about prompting/displaying text on the front panel or even a dialog box that says "Filename already exists, please choose another" whenever this error occurs?
Hello,
I was out of the office yesterday, so I didn't see your message. As suggested to look nicer in notepad you can pad the header with spaces which is easier if you right click the string constant and choose " '\' codes display " and use \s for spacing.
As for your save prompt issue, I use the "create file with incrementing suffix VI" instead of the "create file" as to never worry about losing data, as well as keep my data files organized. This allows for files to never be overwritten due to attempting to create a file with the same name as another.
Hope this helps
08-15-2018 08:35 AM
Thank you those suggestions were helpful.
I attached another image and you can see a comparison between two sample data logging sessions. As you can see, the one with temperature column is improperly formatted whereas when I substituted a string constant with value "blank" it is formatted perfectly... I am wiring a result of a VISA read (a string) directly to the array and I am assuming that the temperature measuring device is sending some kind of new line termination character. Is there anything I can do to make the data log look like the one with the "blank" string?
P.S. I opened the textfile also in Excel and as I suspected the wrongly formatted data wasn't on the same row, just like it looks like in the text file in notepad..
08-15-2018 08:49 AM
@laps682 wrote:
Thank you those suggestions were helpful.
I attached another image and you can see a comparison between two sample data logging sessions. As you can see, the one with temperature column is improperly formatted whereas when I substituted a string constant with value "blank" it is formatted perfectly... I am wiring a result of a VISA read (a string) directly to the array and I am assuming that the temperature measuring device is sending some kind of new line termination character. Is there anything I can do to make the data log look like the one with the "blank" string?
P.S. I opened the textfile also in Excel and as I suspected the wrongly formatted data wasn't on the same row, just like it looks like in the text file in notepad..
Hmm, as a first guess, and possibly wonky work around, try wiring the VISA string to a "spreadsheet string to array" function, then taking the resulting array, indexing it with a "index array" and feed that resulting element to the "build array". I would look at in more detail; however, I do not have labVIEW 2018. Can you File > Save for Previous Version to 2017 for me?
08-15-2018 08:57 AM
OK I will try that, please see the attached VI I believe it is 2017 now.
08-15-2018 09:01 AM
@laps682 wrote:
OK I will try that, please see the attached VI I believe it is 2017 now.
That may not help at all, I'm just curious if it is fussing over it being a string. I'll look at the code.
08-15-2018 09:03 AM - edited 08-15-2018 09:03 AM
My LabVIEW is stilling saying it is in 2018
08-15-2018 09:12 AM
Your guess worked! It is in nice neat rows now thank you once again.
08-15-2018 09:13 AM
@laps682 wrote:
Your guess worked! It is in nice neat rows now thank you once again.
Glad I could help! There might be an easier and/or prettier fix; however, if it works, it works!