DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

set diadem property from Labview

Solved!
Go to solution

Hi all

 

I'm a beginner in Diadem and i need some help...

I made a Labview application wich generate tdms file. I also create a Diadem scipt to analyse tdms values and a Diadem layout to report these data. My problem is i want to set a Diadem property from labview . I need to pass my ResultID from my application to Diadem (Diadem, will search in my database the recordset corresponding to this ID ans then make some calculation).

 

I tryed different things, but i still  can't find the command to set the diadem property from labview...

 

Any idea will be welcome... Thanks!

0 Kudos
Message 1 of 6
(4,941 Views)

Hi,

 

You should be able to do that by opening the "diadem" palette, then opening the "automation data" sub palette and then selecting the functions "Diadem channel group create" and "diadem channel group property set".

 

Please let me know if you need additional help.

 

Best regards,

 

Thomas B

NI France

Thomas B. | CLAD
National Instruments France

0 Kudos
Message 2 of 6
(4,934 Views)
Solution
Accepted by KaBooOoom

Thanks for your help...

 

Your solution does not exactly what i want.... The function "Diadem channel group create" create a new group and the function "Diadem channel group property" allow the user to change the value of an existing property .... (Name, description).

 

I wanted to create a new property in a group and to set the value of this new property.

 

I found the solution, you can call the function "GroupPropCreate()" and then the function "GroupPropSe()" using "Diadem Run Automation command" vi.

 

It works perfectly !

 

0 Kudos
Message 3 of 6
(4,926 Views)

Hi KaBooOoom,

 

The simplest and most elegant solution would be to add the new Group property directly to the TDMS file with the "TDMS Set Properties.vi" at the moment that you create the TDMS file.  Are you saying that the VI that creates the TDMS file doesn't know the ResultID at that point, so that it can't add that information directly to the TDMS data file?

 

Let me know if you can solve this directly with TDMS VIs,

Brad Turpin
DIAdem Product Support Engineer
National Instruments

Message 4 of 6
(4,919 Views)

Hi Brad , Thanks for your answer !

 

You're right, I read you can add a property directly in the tdms file. Bus as you wrote, when i write the tdms file i don't know the resultID. In fact, i append a new result in my database only when the file is closed and the test finished. But maybe i can reopen the tdms file and add the property after, i will check... But is the other solution so bad ? Because it works quite good .... !

 

By the way i have another question. I wrote a script which read about 40 fileds in my result database. I want to display the content of these fields in a report. To achive this, i create 40 custom properties in my group (automatically with my script) and i dragged and drop these properties in my report layout. Again it works fine, but is it the best solution ???

 

Thanks for your future answer ...  

0 Kudos
Message 5 of 6
(4,890 Views)

Hi KaBooOoom,

 

Both approaches work for the purpose of creating the report.  In general, if you have the choice, I would recommend adding properties to the TDMS file after the acquisition (when you know the additional information).  The benefit of this approach is that later on you can search with the DataFinder and find files based on these additional properties.  If you just add the properties to the data loaded in the DIAdem Data Portal and never save the contents back to file, then that information will disappear and not be available for future querying.  The other advantage of using the TDMS property write approach after the acquisition is that it's simpler.  If you can achieve the same results without using ActiveX, I would avoid it.

 

Your choice of displaying queried data base properties as Group properties sounds great, as long as they are each scaler results with a unique name.  If you query array results, I would recommend sending the array data to a new data channel.

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

Message 6 of 6
(4,880 Views)