DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DIAdem: How to store the input channel information from the Analysis modules

Hi,

 

I would like to know if there is a way to store the input channel name(s) when executing modules from the Analysis Panel. For example, when I run an FFT on a set of data: x-channel: "[1]/Time" y-channel: "[1]/Voltage" , I would like to be able to store this information as a custom channel property in the output file (ex. "[1]/AutoSpectrum").  

 

The only place I've found that contains this "history" information is in the log section of the Analyze Panel. However, I have not been able to figure out how to access the information in the Analysis log programatically through VBS scripting.

 

Thanks

0 Kudos
Message 1 of 13
(4,695 Views)

use a script to execute a module from the analysis panel :

 

Call SUDDlgShow("Main", ResourceDrv & "AnaChnFFT1")

 

after with the description property of the new channel

                    -freqency channel description -> "FFT(channel 1/2)"

                    -Amplitude Peak channel description -> "AMPPEAK(Channel 1/2)"

you can find the input channel name

0 Kudos
Message 2 of 13
(4,676 Views)

Well, I see how that works for FFT1, but I don't a consistant nomenclature across the difference analyze modules and many of the modules, don't store all of the input information.

 

For example: take a look at the channel Add module... Suppose you have 2 channels: [1]/X and [1]/Y

 

     Call SudDlgShow("Main",ResourceDrv&"AnaChnAdd")

 

     (Select the first channel as chn [1]/X and the second chn as [1]/Y)

 

     The output in the decription property of the new Added channel is:     Input: [1]/X(1)

 

     This doesn't give me in second input Y... You look in the analysys log section, you can see both inputs.

 

Thanks

0 Kudos
Message 3 of 13
(4,635 Views)

Hi Desensitied,

 

If you want to save information other than what is automatically saved with each ANALYSIS routine, you're going to have to create/fill properties yourself, either manually or programmatically.  There is no "verbose" setting in DIAdem that will increase the granularity of the automatically saved information or affect it in any way.

 

Are you wanting to execute these steps manually?  Are you wanting to execute the same ANALYSIS routines over and over again, or do you want this to happen for any ANALYSIS routines because you don't know yourself which ones you'll need next?  It make may sense to consider creating a calculation in the Calculation Manager or creating a VBScript to customize the information you want to save.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 13
(4,620 Views)

Thanks for your reply. I am currently developing an analysis toolkit that is taylored for vibration type analyses using diadem’s sud boxes and vbs. The toolkit adds new functionalities such as Smallwoods SRS, 95/50 upper tolerance limit, etc. but also allows the use of all existing diadem functionality. The toolkit also includes a set of report plotting templates for plotting the results. This is where it would be nice to have access to the parent input channel information.  

 

When we import our raw data, we add custom properties to fully annotate the data. For example we embed program and flight data to the file properties and sensor information to each of the channels custom properties. When we run our data through any number of various ANALYSIS modules, the custom properties are not transferred to the output channels. When it comes time to generate a report, I would like to be able to programatically point back to the original “root” channel and grab the custom properties to display in the report.

 

Another possibility would be to copy the custom properties to the new channel(s) after each calculation.

 

Thanks,

James

0 Kudos
Message 5 of 13
(4,611 Views)

Hi James,

 

That sounds great.  So you're already running a VBScript and you're already defining custom SUDialogs for the user to configure.  This means that as part of the custom analysis code you can add all the properties you want each time your VBScript runs.

 

So what's your question then?  It's up to you whether you add the analysis properties to the original channel, the resulting channel, or to both.  Wherever you add the properties, you can then reference them from the REPORT template you deliver.  Are struggling to create properties, reference properties, or decide where to put the properties?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 6 of 13
(4,589 Views)

Hi Brad,

 

So here's where I'm struggling. My tool is more a set of tools. I have created custom bars that launch the appropriate dialog box for each tool. Let me give you and example of the kind of work flow I that might be used:

 

The user loads up a TDM file or imports data using a DataPlugin. Then, they launch my tool for going through each channel and adding custom properties (sensor type, sensor location, etc). Once all properties have been applied to the channels they close that tool. Now they fire up the Smoothing module in ANALYSIS and save the result as a new channel. Next, they launch my tool for computing the Shock Response for that event. When the user has the desired output, they run my plotting SUD. This is where they can select which report template to use and which channels to plot. The selected channel(s) used for plotting doesn't have all of the custom properties that we taged in the original data channels.

 

As you can see, the process involves using some of my own custom SUDs where I can keep track of everything but also allows the user to use any of DIAdem's native functions. This is where I am struggling to be able to keep track of the channels used as input. I can "see" the info I need listed in the log section of the ANALYSIS Panel but can't pragmatically access it (the info in the main display window). It would be really handy if this info was automatically stored in the channel properties of each output channel.

 

I guess my only option is to (in the plotting SUD) not only ask the user for the channels to plot, but also ask them to select the coresponding original channels that have the custom properties.

 

James

0 Kudos
Message 7 of 13
(4,547 Views)

Hi James,

 

What's stopping you from saving the properties you need in both the source channels AND the resulting channels, or even in to the parent Group or Root that all the channels are in?  Or are you saing that the information you need was a parameter in a regular ANALYSIS routine the user ran and not one of your customer SUDialogs?  Note that the most recent parameterization of every ANALYSIS routine is stored in global variables, which you have access to from your SUDialog.  Note also that many of the ANALYSIS functions do save results as properties to the input channels.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 8 of 13
(4,541 Views)

What's stopping me from saving the properties I need in both the source channels AND the resulting channels is when I the user chooses to use native ANALYSIS routines without using my custom SUDialogs.

 

If I had Data like this

 

Group

   - Chn1 with the custom properties (sensor type: Type E, sensor location: aft)

   - Chn2 with the custom properties (sensor type: Type F, sensor location: aft)

 

Then i ran an FFT using Chn2 and with averaging (ANALYSIS) i might get a chn like

   - Autospectrum with no custom properties

 

If instead i ran and FFT using Chn2 with no averaging (ANALYSIS) i would get and number of channels based on the number of blocks i used, again each channel wouldn't have any custom properties.

 

Would I need to write a script that then takes each one of the new output channels and applies the custom properties and run this script after each ANALYSIS routine I run?

 

I do see that the most recent parameterization of every ANALYSIS routine are stored in global variables, except the input channels are usually not stored this way, but are passed as arguments to the routine.

 

The difficulty I'm having is when I'm using native ANALYSIS routines and i don't have any of my custom SUDialogs running. Essentially what I need is to have a Parent-Child relationship between all of the channels.

 

Thanks,

James

 

0 Kudos
Message 9 of 13
(4,514 Views)

Hi James,

 

Even the input channels are stored in global variables.  Every parameter in every ANALYSIS function has a corresponding global variable, so that even when you pass arguments in the function parameters they STILL get assigned to the corresponding global variables automatically.  Of course, that only tracks the last session for that ANALYSIS function, so it's far from fool-proof.

 

If you're running your own ANALYSIS functions in your custom VBScript, then you can assign all the required properties to any and all resulting data channels with additional VBScript commands.  The problem, as you explained, is when the user is running the interactive ANALYSIS dialogs on their own.  Usually the Channel.Description property of the resulting channels receives a string list of the input channels that created it.  I don't know if that will help you reconstruct the Parent-Child relationships between the input channels with properties and the resulting channels without properties.

 

How many ANALYSIS functions other than your custom ones will your users typically want to run interactively?  Is it a short list or a long list?  You could potentially expand the number of you custom ANALYSIS functions, or you could try creating Calculation Manager libraries for your users.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 10 of 13
(4,506 Views)