06-17-2011 02:50 PM
I want to be able to:
- plot some data in VIEW
- zoom in on a section of a channel of interest (lets say zoom in on 10 seconds of pressure data from a 10 minute log)
- calculate an average of the data that falls in that zoomed time range, i.e. calculate the 'local' average of that 10 seconds worth of my pressure data
06-19-2011 11:43 AM
Hello David,
There is an example in the example finder in DIAdem that shows exactly this functionality.
Please select the following menu: Help > Examples and select the example shown below:
That example does exactly what you are asking for ...
Hope that helps,
Otmar
06-20-2011 10:45 AM
Otmar,
It does indeed do what I want (on the example data). I want to then do two things. One, remove any link to the example data so that this functionality can be used on the data I have loaded. Two, modify DIAdem so that this script can be triggered via a menu command whenever I desire this same functionality and I have my own data loaded. Is it possible (like it is with an Excel Addin) to add custom menus to DIAdem to allow fast launching of existing scripts?
Thanks,
David.
06-21-2011 02:12 PM - edited 06-21-2011 02:12 PM
Hi David,
In order to link in your data instead of the example data, you will need to edit the script associated with that example. In the example finder, if you select the "Copy example files" option under "Start example," then you can copy the necessary files to a different location and then load them into the script window of DIAdem. You can then edit the file and path information i nthe VIEW_Statistic_Init.vbs file.
You can also add a menu command to run this script to your DIAdem interface. You will need to use the MenuItemAdd command to do so. You can read more about the command in the DIAdem Help:
Hope this helps!
Regards,
Stephanie R.
National Instruments
08-25-2011 06:52 PM
Hi David,
Yes, we can add a custom menu or custom icon that calls code like this to operate on whatever channels you have in the Data Portal or perhaps alternatively whatever channels you have selected in the Data Portal. Here's a similar example that would be easier to edit.
Let me know if you have any trouble,
Brad Turpin
DIAdem Product Support Engineer
National Instruments