DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for ArtemiS Single Values with DIAdem DataFinder

Solved!
Go to solution

Hello Everybody,

I'm currently looking for a solution to Search with the DIAdem DataFinder for Single Values that were generated in Head Acoustics' ArtemiS.

One possible way I know is to first export the Single Values in ArtemiS as .hsvx Single Value files. Then I run a DIAdem Script that extracts the Single Values from the .hsvx files and stores the Single Values as Properties into one Channel. After that I just save that Channel as .tdm file at the same path where the .hdf with the original data is stored. Now the DataFinder is able to index over the .tdm and find the Single Values with the original .hdf next to it.

Unfortunately this solution takes a lot of time when doing this multiple times every workday.
My dream is to have a completely automated solution.

Does anyone have an idea how to do this?
I'm about to become frustrated because I can't find a way.


-------------------------------------------------------------------------------------------------------------------------------
Here are some more ideas I had but didn't work out yet

  • NI offers a Head Acoustics Data Plugin with which it is possible to load and to index .hdf files. The channels loaded into the data portal from the .hdf file even have Additional Properties e.g. "Moniker = Audio.Decoded". After I opened the .hdf files in Notepad++ I could also find those properties listed. The Data Plugin probably just takes those, checks them and then writes them as Channel properties. I hoped that maybe it is possible to add customized properties for the channels in Artemis similar the existing ones (like "Moniker = Audio.Decoded" or "dB_reference = 1"). Then I could just index over the .hdf files and wouldn't even have to touch them once. However the properties don't seem to customizable. Or I just didn't find out how to do it.
  • ArtemiS has the ASX01 Data Access API which might be able to start a DIAdem Script in the ArtemiS signal flow so you wouldn't have to open DIAdem yourself. Wrote to ArtemiS support but I didn't get an answer on that yet.

 

I'm open to every idea. Thanks guys!

 

benebelt1

0 Kudos
Message 1 of 5
(1,403 Views)

Hi benebelt1,

 

The ideal path would be to get the properties you want to index into a file that can be indexed at the same time as your regular data files.  How much work is it for you to export these Single Values in ArtemiS as *.hsvx Single Value files?  Is that the manual effort you're trying to avoid, or would that be easy enough to do if the rest were automated?

 

Since you apparently already have VBScript code that reads these ArtemiS *.hsvx Single Value files, we could create a post-processing DataPlugin that reads the Single Values and adds them as properties and ALSO calls into the Head Acoustics DataPlugin to dynamically merge the results from the *.hdf file and the *.hsvx file, probably with the same file name but differing file extensions.

 

There are other options, but it would be ideal to put as much of the integration as possible into one DataPlugin which could be used by the DataFinder to index and by DIAdem to load.

 

Brad Turpin

Principal Technical Support Engineer

NI

Message 2 of 5
(1,354 Views)

Hello Brad,

Thanks for your reply! Your answers are always friendly, helpful and on point.


Yeah, that's also what I thought would be ideal.

It would be great to avoid exporting the *.hsvx files but it's not actually a lot of work. It's an automation project in ArtemiS that exports the Single Values automatically when you drag and drop the data that should be processed into ArtemiS. It just takes some time to calculate the Single Values.

I do have a very simple script that just opens the *.hsvx as a text file and reads the Single Value and its name in a certain line of the *.hsvx file. I would actually have to rework it though because the Single Values will mostly but not always be in the exact same line.

So just to make sure that I understood your idea correctly:
Your idea is to export the *.hsvx files from ArtemiS into the same folder the *.hdf is at. Then the Data Preprocessor runs over the data and when it finds a *.hsvx file it reads every Single Value in this folder with the help of a DataPlugin that would need to be created. Having these Single Values now available as variables the Single Values can be written either into a stand-alone *.tdm with just the Single Values or into a *.tdm that also contains the data from the *.hdf. And since the PreProcessor runs automically when the DataFinder is indexing (correct me if it actually doesn't) it's not necessary to run an additional DIAdem script.

It's actually a great idea, thanks! Since I'm just an intern and started programming VBS/DIAdem 2 months ago I don't know the Preprocessor very well yet but I am about to experiment with it a little to see what it is capable of.

Would you recommend me to get in touch with my companys contact person at NI concerning the Data Plugin or could I write/create that myself?


benebelt1

0 Kudos
Message 3 of 5
(1,340 Views)

Hi benebelt1,

 

I suggest you create the post-processing DataPlugin yourself-- it's easier than creating a DataPlugin that parses the info from files.  I also suggest that you use the post-processing DataPlugin to read the data from the *.hdf file by having it call the existing DataPlugin, but then parse the single values from any *.hsvx file(s) present in the same folder with the same name (say).  If you use a Preprocessor to convert this parsed and merged data to a TDM or TDMS file, then all the data and single value properties would appear in that one converted file.  If you use a Preprocessor it will run before the DataFinder indexes, so that the DataFinder will just be indexing the merged data in TDM or TDMS files.

 

I can help you over the hurdles of developing the post-processing DataPlugin.  I can give you starter code once I'm clear on your objectives.  As a first step, you can create a post-processing (VBScript) DataPlugin in the DataPlugins dialog in DIAdem by selecting another DataPlugin as the "File reader", instead of the "ASCII/binary file reader" or the "Spreadsheet reader".  This will automatically invoke the selected DataPlugin and parse the data file (*.hdf) with it, then you can use your own code to read the single values and add them as properties.

 

Brad

0 Kudos
Message 4 of 5
(1,307 Views)
Solution
Accepted by benebelt1

Hi Brad_turpin,

sorry for my late answer but my situation constantly changed.
Your tips really helped me along though. Thank you!

I now got a solution that works for my colleagues and me and is probably the best in our situation.

 

----------------------------------------------------------

 

For further information about the topic:

 

 

I just quickly want to sum up what I did the last month to close this post properly just in case anyone else will have the same issue in the future.

After your last reply I started programming a DataPlugin to read in the Data.
It triggers on a .hdf, opens the .hsvx files (and .hadx) files as text files and reads the data from it.
However, opening 20 text files and parsing through them takes some time which cumulates for many .hdf files. Due to the limited possibilities in the DataPlugin I couldn't just store the data as .tdm file and delete the .hsvx files to ensure the next indexing process will be faster. Instead I had to create a custom text file I wrote the data into. This way it indexed way faster when indexing the .hdf file again.
So with this code and solution I was able to automatically process the Acoustics file and merge the data into one file, indexing over this

When I presented this to my boss and colleagues we discussed some reasonable issues with this solution:

  • Storing the data as a custom text files prevents us from reusing the data in other programms in the future
  • In case there are huge mistakes in the data or a bug in the DataPlugin it wouldn't be noticed (Thought about checking the values with limit values for each Single Value and using a logfile or messaging a certain user per E-Mail when exceeding the limits
  • Limited possibilities when programming the DataPlugin
  • etc.

 

Because of that we nethertheless chose to use a simple script to convert the .hsvx, .hdf, etc. into a .tdm that's being started manually by the test engineer.


For anyone looking for another solution:
As far as I found out it is also possible to directly write .tdm files in ArtemiS using the ASX01-license and the TDM_C_DLL (https://www.ni.com/de-de/support/documentation/supplemental/06/the-ni-tdms-file-format.html)
Because the dll is for C++ and ArtemiS runs only C# (or python with pythonnet) you will probably also need to translate that dll by converting it when programming in VisualStudio C# (https://forums.ni.com/t5/DIAdem/Create-tdms-files-using-C-Visual-Studio-2017/td-p/4107309?profile.la...

I didn't fully try this because it's a huge effort and I'm not used to C# programming but I'm pretty sure that it should work.


Thanks for your help!

benebelt1

0 Kudos
Message 5 of 5
(1,162 Views)