From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

storing data

Solved!
Go to solution

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


 

 

 

 

 

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 1 of 8
(3,162 Views)

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

Message 2 of 8
(3,138 Views)

Sorry

 

here the .ctl

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 3 of 8
(3,130 Views)

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.

 

- tbob

Inventor of the WORM Global
Message 4 of 8
(3,124 Views)
It can be even easier to implement tbob's suggestion if you use the OpenG VIs. They have VIs that can read and write clusters to config files automatically. To get the OpenG libraries download and install the community version of JKI's Package Manager. Then install the OpenG libraries. These are extensions of the native config file VIs.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 8
(3,121 Views)
Solution
Accepted by topic author tinnitus

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

0 Kudos
Message 6 of 8
(3,114 Views)

Hello,

 

i try to clear my ideas ,and i ll be back

 

best regards

 

Tinnitus

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
0 Kudos
Message 7 of 8
(3,099 Views)

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

 

 

CLAD / Labview 2011, Win Xp
------------------------------------------------------
Mission d'une semaine- à plusieurs mois laissez moi un MP...
RP et Midi-pyrénées .Km+++ si possibilité de télétravail

Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
Don't forget to valid a good answer / pensez à valider une réponse correcte
Download All
0 Kudos
Message 8 of 8
(3,091 Views)