03-30-2010 07:59 AM
Hello,
I have few questions about how to manage and store data.
I 'm witing a calibration software where i have to display graphic with all probes,
then array of 10 times ref vs current probe then calculs like mean , sigma, then converting and storing data.
Using data files of previous program i identified a format type.
I reproduced it as a cluster with array of cluster like following that im using as temporary variable during acquisition and waiting for user validation.
after i will have to pass cluster to a vi to convert him into a txt file to be exploited by other application.
my question is:
is that a good way using cluster instead vs string array
one is typed so easier not to make error affecting each measuring and calculated data to the right place
but less if cluster format have to change
with a string array change can be easier but it s easy to make index error and placing it at wrong cell
what you would use?
Best regards
Tinnitus
vi of cluster attached
Solved! Go to Solution.
03-30-2010 10:21 AM
Hello tinnitus,
Your message is difficult to follow (I suspect this is a translation issue). Could you please give an example of what you are trying to do? The VI that you provide only contains an array of typedefs for which you did not provide the typedef. Maybe something showing how you are currently doing what you are trying to improve?
Peace, Matt
03-30-2010 10:46 AM
Sorry
here the .ctl
Tinnitus
03-30-2010 11:00 AM
Vous pouver poser votre question en Francais si vous avez un problem avec l'Anglais.
I'm guessing that you want to save your cluster data to a file without having to use string arrays instead of clusters. My advice is to use configuration files. On your block diagram, look for a set of functions in the functions palette under File I/O - Config File VIs. You can use the section name to label each cluster and use the key name to label each element in the cluster. Save the value of each element under the key name. The file produced will be an ini file and would look like this (using just one cluster for an example):
[repet] - this is one of your cluster names
time = 0
Dref Brut = 0
and so on....
You will need to organize the sections and key names according to your clusters. Unbudle the clusters and write the values to the proper section and key. When you read back the ini file, you can easily see where each value goes by its section and key name.
03-30-2010 11:09 AM
03-30-2010 11:29 AM
While I will agree with Mark that using the OpenG software makes writing a configuration file considerably easier (in fact you can use the Variant to ini cluster to just write the array one time), it seems that you are actually asking how to store data, no? In that case the configuration file format would seem to be inappropriate if you wish to plot the data as you will require yet another script to extract the data from this format. If you are trying to write data that the customer can extract, then the way you suggest (without having seen it) is not unreasonable. That being said, have you considered TDMS. There are plugins for reading this file format for many data analysis packages (Igor, Matlab, Excel, etc.) and writing to file in this format is a breeze. There are even converters to ascii that others have developed available on this site (I haven't really tested this one). Anyway, just a thought.
Cheers, Matt
03-30-2010 12:03 PM
Hello,
i try to clear my ideas ,and i ll be back
best regards
Tinnitus
03-30-2010 12:34 PM
its done,
In fact that i wanted to know is
with my cluster based (formated) on previous txt file, is there a way
to analyse this cluster and make a kind of export that match with the txt file.
i saw flatten fonction but without success
this because this file is analysed thereafter (excel macro) and structure file as to be the same as previous.
In fact i think i will have the same problems if i want to save this cluster into other format
joined : clust typedef and txt file to obtain
regards
Tinnitus