DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

data finder maximum value

How can I force the Data Finder to index/calculate certain properties (like Maximum Value) so I can execute a query on this.

 

I would like to do this automatically for every channel, or should I run some script to get this?

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 1 of 10
(5,371 Views)

Hi Ton,

 

The DataFinder always index all properties which are stored with the TDM/TDMS data sets.

If you would like to be able to use those properties for queries you need to calculate them (during measurement or as an post process) and store it together with the data.

 

Greetings

Walter

0 Kudos
Message 2 of 10
(5,364 Views)

DF Idea

 

On the Diadem idea exchange, I suggested that the Datafinder include SQL syntax for the queries. As part of the suggestion, I cited aggregate functions. SQL syntax has garnered no support. I would like to see the aggregation functions. I suggest that you make a suggestion for aggregate functions. I will support it. Jim

Message 3 of 10
(5,354 Views)

I assume that you mean data finder queries such as  "Find all of the data in which Joe Test was the driver between January 2010 and August 2010 and the ambient temperature was greater than 23 degrees C."   If so, I agree, the data finder isn't very useful to me if I can't drill into details like this. I tried to search the NI site for things like "Data finder query syntax" without much luck. It would be nice not to have to build a database for my test data but I absolutely need the ability to drill down into our data with more than a simple single parameter search.

0 Kudos
Message 4 of 10
(5,244 Views)

Ok, I see my mistake in interpreting your request. You wanted functions like min, max, avg, count, etc. I can see how this would be useful if you didn't really know in advance that you needed to process your datasets in that manner.

0 Kudos
Message 5 of 10
(5,242 Views)

Hello,

 

I think I have the same problem,

I open my *.ascii files with a dataplugin customize.

Dim Block : Set Block = File.GetstringBlock()
Dim oChn
for i = 0 to ubound(data_chn_name)
Set oChn = Block.Channels.Add(data_chn_name(i), data_chn_type(i))
call oChn.Properties.Item("unit_string").value(DATA_chn_unit(i))
Call ChannelGroup.Channels.AddDirectAccessChannel(ochn)
next

 

I need to calc "minimum" and "maximum" value for every channel.

"for - next" for all values means many time for indexing.

Is there an alternative solution?

 

Thanks.

 

 

0 Kudos
Message 6 of 10
(5,221 Views)

Hi Yustas,

 

As of the DataFinder 2010 there is no built-in feature to calculate channel properties like "Minumum" and "Maximum".  If the raw data file does not have the properties you want somewhere in the data file for you to read, your only options are to calculate them in a tight VBScript loop, which as you said will be a slow solution, or to wait and calculated those properties in DIAdem or LabVIEW after loading the ASCII file.

 

Would it be an option to batch process the raw ASCII files with DIAdem or LabVIEW and create a TDM or TDMS file for each ASCII file?  That way you could efficiently calculate all the properties you want to in DIAdem or LabVIEW and still be able to search on them in the DataFinder.  If this is a possibility, I can help by sending you batch processing code for DIAdem.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 7 of 10
(5,216 Views)

Thanks Brad,

 

I decided to keep ascii format for now because tdm file has double size. I would like to ask you if there is the possibility to generate TDM-files from ascii-files and save them in another place by using dataplugin VBscript. So I need to launch from diadem dataplugin a script like this:

 

Sub ReadStore(File)
......

 Set ChannelGroup = Root.ChannelGroups.Add("test")

....

Call ASCIIConfigLoad(file, "pluginname", 0)

Call DataFileSave("C:\file.tdm","TDM")

......

end sub

 

I know that it's no possibile to use diadem commands in dataplugin. Are there some alternative solutions?

 

I tryed to create vbscript dataplugin that for every ascii file indexed writes a file path to access mdb database and by diadem macro loads ascii file from mbd_file and saves it in another folder. I don't think that is the best solution. Is very long.

 

Thanks,

 

Yustas

0 Kudos
Message 8 of 10
(5,109 Views)

Hi Yustas,

 

Do you already have a DataPlugin?  If so, then you can just use this VBScript to batch convert the ASCII files to TDMS or TDM files.  Just change the file extension filter in line 9 and the DataPlugin name in line 10.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 9 of 10
(5,092 Views)

Hello Brad,

 

Yes, I already have a plugin. I already changed the lines and your solution works. Thank you very much for your help.

 

Yustas

 

0 Kudos
Message 10 of 10
(5,061 Views)