DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

vb dialog passing data?

Hi,

I did an evaluation a few years ago of diadem and got as far as modifying the example vb script to query our mysql database and insert data into the portal.  But at the time management decided to maintain an internal query solution that already existed.  But my current manager is now open to re-investigating diadem.  So I actually added the full license to our VLM about 6 months ago (version 2012) and an just now getting back to where  I left off.  I did save the script in our source code control tree and it actually still works.  I can run it and it populates a couple trees of data from our database, using some hard coded values for the query string in the script.

I had an email thread going with Brad Turpin, who I notice still frequents this forum, but that thread is long gone, I've changed laptops and it doesn't seem to be in my archive.  I remember where I left off was I was at the point of wanting to make some prompts for the user to choose which device he/she wants data for, and then from there query and make  report.

Being a newb to VB, but not to programming in general, what is a good resource to tell me how you get data to/from a vb dialog?  I see there is a tool in the script environment to design a dialog, just not sure where to start.  Thanks 

David Jenkinson

0 Kudos
Message 1 of 7
(5,394 Views)

David, 

 

Data is passed from dialog boxes to DIAdem Script via variables. This link explains how to do so in further detail. Probably the most help tools, though, are the examples shipped with DIAdem. There are several examples focused on User Dialog Boxes and even one that searches for user specifed channels in the Navigator (called 'Searching for Channels in the Navigator').

0 Kudos
Message 2 of 7
(5,369 Views)

OK I'll take a look at that.  I'm also working my way through the diadem 2012 hands on, enlightening how I've been under-utilizing the tdms file we been writing for our battery test.  It seems there some data we can be storing in that file that can be queried with diadem, beside the data samples.

0 Kudos
Message 3 of 7
(5,361 Views)

David,

 

you are right regarding the option to query data (properties) which are stored in TDMS files. In fact, DIAdem comes a a tool called "MyDataFinder" which is integrated into the so called NAVIGATOR module in DIAdem.

Once you configure DataFinder to index the folders containing your TDMS files, you can query files, groups within files or even channels directly. You could even index other file formats as long as a dataplugin exists (see ni.com/dataplugins for a list of supported file formats)

 

Should you have a lot of files on a file share in your network, DataFinder Server (ni.com/datafinder) would be an option to look at. DataFinder Server integrates into DIAdem exactly like MyDataFinder but teh indexing process runs on a server computer and allows other users to share the same index.

 

The general idea behind the DataFinder technology is to make files searchable and in addition allow you to directly load e.g. channels from different files into DIAdem without having to open one file after the other to get access to those channels.

 

Andreas

0 Kudos
Message 4 of 7
(5,330 Views)

We use a tdms file in the context of a battery test.  Samples for voltage and current are saved to a large arrays, or channel data.  There are some clusters of information saved with the tdms file such as what settings were used when measureing the waveform, what overall results there etc. 

We take current measurements of "tasks" during the battery test, and store this information to our database.  I'm thinking it might be pretty powerful to store this summary information to the tdms file itself, in addition to the database.  This is because currently, a result report is being generated manually in excel based on these individual "task" current levels.  If I could store these values to the tdms file, I'm thinking some report information could be generated in an automated way. 

I guess I'm wondering what is the best way to store this information. 

As the test is running, task current measurements are taken.  The test could last a couple days.  During this time certain tasks are duplicated, such as a "callling" task.  At the end of the test, these individual current readings of individual tasks which ran more than once, are averaged together and stored to a summary table which outlines the average current vs. the tasks that were peformed, such as "calling", "browsing" etc.  I'm thinking it might be useful to store the individual task current measurements as they happen to the tdms file, and let diadem make the summary table. 

When I was working with a demo of diadem a few years ago, I had an email thread going with a support engineer (I think it was Brad T), where I was advised of a certain way to save data to our tdms file. I was retasked here, and also I have lost that thread.  If I attach another file to this thread, maybe you could advise as to the best way to store this data?  (And maybe advice on how to better store the data we are already storing, to better leverage diadem)?

 

Thanks

David Jenkinson

0 Kudos
Message 5 of 7
(5,285 Views)

David,

 

Brad is currently traveling. He will be back by Wednesday. I have asked him to take a look.

 

Andreas

0 Kudos
Message 6 of 7
(5,281 Views)

Hi David,

 

My biggest piece of advice would be to have all the metadata attached at the "Battery" Group level instead of to separate Groups with no Channels in them.  There is a detailed white paper that covers this and other common scenarios:

 

http://www.ni.com/white-paper/14252/en/

 

The short rationale is that properties in a property Group can not be used to query data Channels in a separate data Group.

 

I agree that adding roll-up properties will make automated summary and trending reporting possible with the DataFinder and DIAdem.  Either LabVIEW or DIAdem can be used to calculate those.  Usually this post-processing is run as a second step after the data acquisition is complete, so it's really your personal preference whether that's accomplished with DIAdem or LabVIEW.  I'm happy to help with the DIAdem parts.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 7 of 7
(5,256 Views)