11-13-2019 07:32 AM
Hello,
I have attached the VI please have a look
There is block called get waveform components from where I am taking time , Data and Attributes.
and data Attributes is in form of strings, which I Need to convert in string to store in text file
11-13-2019 07:44 AM
@vishal231 wrote:
Hello,
I have attached the VI please have a look
There is block called get waveform components from where I am taking time , Data and Attributes.
and data Attributes is in form of strings, which I Need to convert in string to store in text file
data Attributes isn't in form of strings.
Use "Get Waveform Attribute" function. It get's the attributes as a set of names and variants.
Pretty sure you'll get exactly the same names and variants if you use Get Variant Attribute from the unbundled variant of the waveform.
In the variant it looks like a string, but that is just visualization. You need to convert all the attributes, of different types to string.
Use the suggested formatPropertyList.vi for a quick start...
11-13-2019 07:46 AM
Hi vishal,
@vishal231 wrote:
I have attached the VI please have a look
There is block called get waveform components from where I am taking time , Data and Attributes.
and data Attributes is in form of strings, which I Need to convert in string to store in text file
The VI you attached does not contain the code as shown in your last image.
When the "attributes" already contain strings, then why do you need to convert to string???
11-13-2019 08:14 AM
@GerdW wrote:
When the "attributes" already contain strings, then why do you need to convert to string???
I get the confusion: if it looks like a string it must be a string. It's not...
That variant has attributes. These attributes are displayed as strings (by LabVIEW). That doesn't make the variant a string. In fact, the variant value is probably empty (void). It is just used as a container for the attribute set.
It's actually near impossible to get the string that is displayed in a variant indicator. Replicating the string is the next best thing, but bloody annoying. Use the TDMS VI as a starting point...
11-19-2019 07:19 AM
hello,
thnaks for reply
You said to use TDMS VI , Do I have to create TDMS file ? and save the data in TDMS Format?
11-20-2019 02:44 AM - edited 11-20-2019 02:54 AM
What wiebe meant is the formatPropertyList.vi. It is part of the TDMS file viewer vi, but can be used separately.
To get something similar to the probe view, you have to format every property individually into a string. formatPropertyList.vi shows you how to do that. The format might not be what you want, so make a copy of that vi and adjust it however you want. Here is how to use it: