LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Dataset Names in VI

Hi all,
just another question regarding the storage of data in a database.

First I'll describe what we do and how we want to do it:
We run a test system with a main module in it which is replaced quite often. Inbetween the replacements we're doing some tests with it. 😉

All data we get is logged to a Citadel 5 database. And now we're just about to start creating real data and we don't want to get lost in it. So far so good.

Now I'd like to log all data into one database and to sort it there a bit. My plan was to name data sets after the module name (serial number, whatever is unique) and for the tests we do with each module I'd like to use data runs.

Now I found that I can set the run names programmatically (I read
the data set logger tutorial), but I didn't find a way to set the data set name in a VI. Is this possible?

The result should be a VI in which a user just enters the name of the new module and the name of the test and this VI creates then the new data set or the new data run respectively.

Thanks for any comments,
Carsten



PS:Maybe I could use a dirty "workaround" and mess around with 'dscdatasets.ini'? Could I use the INI-VIs to create a new section with the new data set name?


0 Kudos
Message 1 of 6
(3,198 Views)


Hi,

Though it may seem that we can create new DataSets programmatically by modifying the dasdatasets.ini, it is not that easy (or even possible??).

Modifying the dscdatasets.ini file will get us the info' about the new dataset, however, since DataSets are nothing but VI-based servers internally, they have to be registered. So, the next step is to register the new dataset. You will register the new dataset by simply running the DSCDS_regServer.vi from vi.lib\lvdsc\servers\DataS Set Logger\DSCDS_Server.llb. This will also let us browse the new dataset in the tag creation wizard.

The final step is to create a tag from this new dataset so that the DataSet server is launched with this new device, i.e., the new dataset we just added. An
d this is the difficult step as we cannot create/add Tags to the SCF programmatically.

One approach to solve this (and the above) is to have pre-canned datasets already in the scf. We can make sure only one of them can be "running" by having unique Start and Stop conditions. So, when the user wantes to "create" a new dataset, he provides these unique Start conditions and then that particular dataset "starts". This way, you create all the possible datasets beforehand (and don't have to modify the INI at run-time).

The other approach is to have multiple SCF files -- as many as your possible datasets -- beforehand with the right tag for the dataset in them. And you can then launch the engine with the right SCF file to get the right dataset.

Finally, since you all you really seem to want is to be able to sort the datasets, you may just decide on a naming policy for your runs that will help you do this without creating new datasets. You will then avoid all the has
sle. E.g., you may name your runs as:

Module1_Run1
Module1_Run2
Module1_Run3

Module2_Run1
Module2_Run2
Module2_Run3

and so on.

Hope this gives you some ideas.
Regards,

Khalid 🙂


Message 2 of 6
(3,198 Views)
CS42,
In LabVIEW DSC you can not programatically create a tag. This would mean that any work around is hard.

My two suggestions are:
1) Configure several data sets and use them as needed. This would work for a finite number of units. Basically you would have to create a dataset for each unit.
2) Use a string tag as the identifier. Then you can place the model name, serial number and name of the test in the datarun identifier. The heirarchy will still be flat when viewing the data in the Historical Dataviewer in MAX. However you can create your own utility for retrieving the data sets. Take a look at the examples (Help>Find Examples in LabVIEW) then browse according to task and choose Toolsets and Moduels>Datalogging Supervisor Control>Retrieving Hist
orical Data and you will find a Data Sets Viewer. You could expand on it so that it parses the indentifier and allow the user to first select the model then serial number and last the test run.

Carl L
National Instruments
0 Kudos
Message 3 of 6
(3,198 Views)
Hi Kalid,

thanks for your very detailed answer.

I think I'll decide on a naming policy for the runs to include the most important information. Or maybe I'll live with creating the datasets by hand if the main module is changed.

But some questions are left: if I use runs I'll need a dataset, right? Are there performance issues when using data sets? As there is an additional VI based server running...

For the future: it would be nice to add datasets programmaticaly and adding tags to the scf too. 🙂

Thanks very much,
Carsten
0 Kudos
Message 4 of 6
(3,198 Views)
Hi Carsten,

Yes, you will need a DataSet for the Runs and this means the VI-based server needs to be running. The preformance cost of this however should not be much to be noticed, especially given today's fast machines with lots of memory. However, switching Runs very quickly (every couple of seconds for instance) would mean increased CPU activity. I woul not worry about it otherwise.

You may want to however pay close attention to the DataSet retrieval part of your application. Retrieval of Runs from a DataSet (especially if you are planning to have one big DataSet with all the Runs in it) can take some time. But then again you would not query your Runs very often, normally.

Regards,

Khalid
0 Kudos
Message 5 of 6
(3,198 Views)
Hi Khalid,

well for the "quick" look we use MAX and for the real analysis I use DIAdem. Right now I'm evaluating the DIAdem 9 Beta to have full Citadel 5 access.

Until now we didn't use Data Sets frequently. We did try sometimes in Citadel 4 but got problems there -- maybe because of a misconfiguration (the complete data was accessible but not the runs).

So I'll give it a try and decide later what to do actually.

One further option I have also is to setup a new database to manage the different modules (it's not more work to change the location and name of the database than to add a new dataset).

Regards,
Carsten
0 Kudos
Message 6 of 6
(3,198 Views)