From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem Idea Exchange

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

Some Python plotting modules have an HTML output for Python graphs (Bokeh and Plotly, for example), and Plotly specifically has some really cool interactive HTML plots.  It would be great to have a simple HTML Display Type in VIEW to be able to view these plot outputs!

Other IDE programs (like PyCharm or Visual Studio Code) have an "autosave" feature which is very useful! After a certain amount of time, the script you are working on is auto-saved (if it has been saved).  

I understand that DIAdem is not a console application, but a GUI-application.  Therefore, a python command like

 

val = input("Enter value: ")

 

will not work because sys.StdIn and sys.StdOut are not available.  However, this isn't well-documented and the error given isn't very helpful. 

 

There are other more complicated outputs that I have seen in the console area of my regular Python IDE (I usually use PyCharm) that fail with very unrecognizable errors in DIAdem Python, usually a string of errors in many scripts that looks very intimidating!  

 

It seems that DIAdem is just grabbing the simple "print" statements from Python scripts, and nothing else works.  This would be ok if these errors could be bypassed somehow?

Currently, ONE python engine is started with each instance of DIAdem.  This behavior is not well-documented and comes with limitations. 

 

For example, if I have an imported function ".py" script called "MyHelperFunctions.py" and import this into another script, the function is only loaded once.  If I make edits to this function, and save the file, the edits will not be available until I close/reopen DIAdem!

 

I suggest having multiple embedded python engines at the same time.  And this would enable DIAdem to always be ready for a python call but still retire a python engine that was bloated.

 

At the least, having a script command to spin up a new python engine would be very helpful for me!

I'm a student in my last year of studies and I'm not that good working with scripts.

I work with Diadem to analyze my real-time data,  and when i import the excel files ( One year of data gathered in excel files separately ) into Diadem my columns change automatically to text format So i guess the solution in to write a script to convert my channels into Numeric format?

  Capture.PNG

I would like a feature where you can add extra paths in DIAdem's Python implementation for user-specific Python library directories.

 

In Visual Studio Code you can edit the settings.json to add paths to:

  • python.analysis.extraPaths (for importing)
  • python.autoComplete.extraPaths (for autocompletion)

JoshRew_0-1642107684799.png

 

So stuff imported from "C:\Repositories\Python\MyLibraryOther\__init__.py" is directly visible on import alongside stuff in SitePackages:

JoshRew_1-1642107684803.png

 

I've been able to add further locations to the active DIAdem Python Path via to use programmatically:

import site
site.addsitedir('C:/Repositories/Python/')

 

With that, I can "use" the script contents from both "Other" and "Site-Packages" items:

JoshRew_2-1642107685010.png

 

But currently I can only "see" items located within the Site-Packages folder:

JoshRew_4-1642107684831.png

 

-Josh Rewerts

Having Python as a scripting language is great, however, Python is not (yet) supported to develop user dialogs. Dialogs must be developed using VBS. While a Python script file can be run from a dialog using VBS, this leads to many Python files containing snippets of code. Updating the approach for GUI (SUD) development would be a welcome improvement.

Today I was trying to find the SCRIPT command for "Converting Numeric Channels into XY-Channels" and could not easily find it or record a script to find it. So two requests here: (1) when recording a script, output the script or have a message that says 'sorry!' and (2) update the help with the correct script functions, similar to the other channel conversion functions.

 

I tried to record a script, executing the ANALYSIS function "Channel Functions -> Channels <-> XY Channels", but nothing showed up in the recorded script.  

 

Looking up the help reference for "Channels <-> XY-Channels" only shows how to display the dialog, Call SUDDlgShow("Main", ResourceDrv & "AnaChnToXYChn")


All of the other "channel conversion" help documents show how to do this in SCRIPT, for example, "Numeric Channels <-> Complex Channels" shows "

ChnConvertNumericToComplex", similar for the Numeric to Time, Waveform, etc. My proposal is below:

 

Script Call:

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

 

Set Group = Data.Root.ChannelGroups(1)

Set XChannel = Group.Channels(1)

Set YChannel = Group.Channels(2)

Set YChannel.XRelation = XChannel


 

Errors occuring in Diadem user commands result in all running scripts aborting without any clear sign of the reason. The only means to find out is the log file in Diadem Script.

Support says this in a feature, as user commands are supposed to handle events and there should be no (frequent) error messages.

On the other side, user commands are the ideal place to have a user functions library as it is accessible from everywhere including dialogs. With ScriptInclude command such a library has to be included at every script start and possibly several times as dialogs have a separate script environment.

 

Therefore I would welcome an option to turn on error messages / beep when there is an error in user commands.

The current behaviour of silent abortion of any script is quite confusing, especially for people that are only applying scripts for evaluation.

We are very happy about the support of Python as additional language in DIAdem script.

It would be a really nice feature if the DIAdem Python module would also be available in Python scripts that are running not within DIAdem script but on a machine with valid DIAdem license.
This would allow to create Python applications that use DIAdem commands but do not require the user to explicitly open DIAdem and load a Python script and thus improve usability.
Another use case would be an improved communication between Matlab and DIAdem by calling Python code including DIAdem commands from Matlab as executing Python code from Matlab is possible.

Python Virtual environments allow better control of the dependency versions by project, that I find required. Mostly this is so that the dependencies/package versions are the same between the code as developed, and the code as used by users.

 

Would like NI to consider adjustments to the current python system so that it can use a virtual Environment. Some to consider, Venv. pyenv, VirtualEnv, PipEnv.

I was using an “assignment” channel as the “ChnEventTrueChn” for “ChnEventCreateFilteredTrueChn” and was really hoping the result channel would also be an assignment channel, but no, it’s not.  

 

My original assignment channel is matched up nicely with some text values, so it would be really helpful to have those values “carry” if I execute a function or calculation on the numeric channel.

 

FYI, Brad Turpin provided a workaround until this is implemented that works just fine for me:

Clone your assignment channel and use the clone for the ResultChannel channel in the “ChnEventCreateFilteredTrueChn”  function.

 

Set OldGroup = Data.Root.ChannelGroups(1)

Set NewGroup = Data.Root.ChannelGroups(2)

Set OldAssignChannel = OldGroup.Channels(1)

Set NewAssignChannel = NewGroup.Channels.AddChannel(OldAssignChannel)

Call ChnEventCreateFilteredTrueChn(NewAssignChannel, ChnEventList, OldAssignChannel, ChnEventFalseValue)

 

 

I'd like more events in DIAdem VIEW, similar to REPORT.  The one I'd like most is: OnLayoutLoaded

Using Calculate for basic mathematical functions is like taking a sledgehammer to crack a nut. Cause Calculate takes ages compared to e.g. ChnAdd, ChnMul, ChnDiv etc. But on the other hand it lets you script formulas in an easy-to-read format.

The idea is to have a pre-processor analyzer for scripts that identifies Calculate commands and checks if these commands could be translated into a series of these basic mathematical functions. If yes, then the script engine should be able to do so in the background in order to speed up the calculation.

I'd like to have the "color palette" object in a DIAdem SUD dialog?

 

It's a great way to choose colors!

I would like a tool that would help identify noise spikes in my data, so that they may be set to NO VALUE or carefully interpolated.  In the attached example, I have two torque spikes in my data that are significantly higher than the mean.  If I were only looking at one file, I would simply "Set Flags" in VIEW, then "Flags: Remove Data Points". However, I am reviewing dozens of files with several channels of interest.  

 

Peak data points are the most damaging to the components under test, so it is important that we keep the real events and reject the noise.  

 

Concerns with other peak / spike removal options:

  • Manual Set Flags -> Flags:  Remove Data Points; time required
  • ANALYSIS -> Event Search -> Event = Window -> Upper Limit:  In other data files, I have real events with values higher than the noise in this data file.  
  • ANALYSIS -> Digital Filters or Smoothing:  This will change all of the data - it will likely narrow the peak-to-peak of my other data and interpolate my noise spikes, adding damage that is not actually real.  I only want to remove a few data points in the channel data. 

nCode Glyphworks has a nice Spike Detection Tool that uses 6 available algorithms to detect spikes.  Once it identifies them, it allows the user to see them, prior to performing any actions - this is important, because it allows the user to identify if they are real or noise, prior to taking action.  

Download All

 

 

Currently you can only search for one channel at the same time with the advanced search as shown in the first graphic. if you select two channels at once, no search results will be found.
Diadem Bsp1.PNG
 

It would be very helpful if you could search for several channels with different characteristics at once.

for example, one could look for measurements that contain a first channel with a particular property and at the same time contain a second channel with a different property. It would also be helpful if the different properties of the search were linked by setting the brackets.

here's an example

Diadem Bsp2.PNG

such a function would greatly facilitate the evaluation of large data volumes.
 
 
best regards
Simon

It would be a nice featre to do much more comfortable programming. Nearly each Editor suppurt the described feature.

When i got a class opened using some object or its own methos, could be great it i could jump into the method by clicking on it, which would open the file and focus on the method

 

 

1) could be great to have a project. simply based on root folder

 

2) in project, could be some small windows like the Data Portal, where we could have a category-based tree with folders and files of current project, where we could double click and open the file to edit it