08-03-2020 03:44 AM
Hi Shannara,
you should receive the acquired data as an array of values: use WriteDelimitedSpreadsheetFile to save them!
@Shannara wrote:
because I am having problems with data saving?
Which problems do you have? Do you get any error messages?
Why don't you attach your VI with your problematic code?
08-03-2020 07:44 AM
I have tried but I was having problems, can you help me like I want to have a VI, which is attached here that is labview 19.0 version and I need Labview 18.0 version?
can you please save it as labview 18.0 version and send it to me?
08-03-2020 11:52 AM
Hi Shannara,
right now I'm limited to LV2017…
@Shannara wrote:
I have tried but I was having problems
Again: what have you tried and which problems did you encounter?
08-11-2020 08:33 AM
Hi GerdW,
I was using the write delimited spreadsheet fro saving the acquired data which is in the form of a string array.
The Agilent data logger itself showing e.g. the voltage values as 1.5V. the delimited spreadsheet saved as 1,5.
The Agilent data logger itself showing e.g. the Resistance values as 1173.45747. the delimited spreadsheet saved as 1173,457,47.
How can control the decimal value because I want 2 decimal points only but it is saving 5 digits after a point?
08-11-2020 02:30 PM
@Shannara wrote:
Hi GerdW,
I was using the write delimited spreadsheet fro saving the acquired data which is in the form of a string array.
The Agilent data logger itself showing e.g. the voltage values as 1.5V. the delimited spreadsheet saved as 1,5.
The Agilent data logger itself showing e.g. the Resistance values as 1173.45747. the delimited spreadsheet saved as 1173,457,47.
How can control the decimal value because I want 2 decimal points only but it is saving 5 digits after a point?
The "Write Delimited Spreadsheet.vi" has a "format" string input on top. This lets you set the written format. In your case, using "%.2f" should get you 2 decimal places.
(Disclaimer: I don't know much about localization - if your system uses commas instead of periods for decimal separation, you may need to use "%,2f", but I really have no idea)
But, here's what I'm saying:
If you can get your data as doubles, use the top example.
If it *has* to be a string array, first use "Fract/Exp String To Number" to convert your string array into a Double array, like the second example.
Or, maybe you can just put the "%.2f" directly on a string array - based on the Help, it looks like it would work, but I'm not sure.
The third example does not work. So don't do that.
There are also ways of modifying Strings in a String Array directly - if that's preferable, we can explore that route.
Does this help?
-joeorbob
08-12-2020 04:57 AM
Thank you so much for the answer.
I have found some problems here, I have to save the acquired data with time stamp, I am using a delimited spreadsheet, timestamp is saving only when the data signal which is in string form so, I have converted my data into string format so, that I can save the data in the correct format.
My question is here, I have turned off the localized decimal point to sure it saves the data. when the data is in Numeric array form only %.2f which is working, when the data is in string array it is not working.
may I know How can I solve this problem?
08-12-2020 05:07 AM - edited 08-12-2020 05:09 AM
Hi Shannara,
use the correct format strings - the LabVIEW help describes all their options!
@Shannara wrote:
My question is here, I have turned off the localized decimal point to sure it saves the data. when the data is in Numeric array form only %.2f which is working, when the data is in string array it is not working.
To turn off the local decimal point (aka override its settings) you should use the %.; or %,; format code - as described in the LabVIEW help.
@joeorbob wrote:
(Disclaimer: I don't know much about localization - if your system uses commas instead of periods for decimal separation, you may need to use "%,2f", but I really have no idea)
Again: its all written in the LabVIEW help… 😄
@Shannara wrote:I have found some problems here, I have to save the acquired data with time stamp, I am using a delimited spreadsheet, timestamp is saving only when the data signal which is in string form so, I have converted my data into string format so, that I can save the data in the correct format.
You need to convert thetimestamp to a string, then you convert all sample data also to string (using a proper format string). Then you can write a full line of data to your CSV file.
@Shannara wrote:
The Agilent data logger itself showing e.g. the voltage values as 1.5V. the delimited spreadsheet saved as 1,5.
The Agilent data logger itself showing e.g. the Resistance values as 1173.45747. the delimited spreadsheet saved as 1173,457,47.
There are two possible reasons:
Because of this "Resistance value" example I guess it's an Excel problem. Did you open the delimited text file using a text editor like Notepad to verify your LabVIEW VI really saved this value as "1173,457,47"?
In the end it's not a LabVIEW problem, but a "before the keyboard" problem as not using Excel in the correct way…
08-12-2020 06:29 AM
Is Timestamp can be saved in Array format?
08-12-2020 06:37 AM
This is how I was used to save the acquired data.
May I know is there any mistakes here?
08-12-2020 06:47 AM - edited 08-12-2020 06:48 AM
Hi Shannara,
@Shannara wrote:
This is how I was used to save the acquired data.
May I know is there any mistakes here?
Mistake: instead of attaching real code (aka VI) you just show an image of part of your code…
Mistake: formatting the numbers using ArrayToSpreadsheetString, then again formatting data using WriteDelimitedSpreadsheetFile…
Mistake: using InsertIntoArray instead of BuildArray when you want to build an array…
Simpler: