DIAdem Idea Exchange

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

After thoroughly reviewing the DIAdem help documentation, it seems there isn't a built-in command, like schememeasstop(), to programmatically stop measurements.

The objective is to automate at least two consecutive DAC measurements in NI DIAdem. While the first DAC measurement can be started and stopped using digital inputs, the current process still requires manual intervention. Specifically, the operator must press the "Stop Measurement" button on the DIAdem toolbar to end the first measurement before the second can be started.

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.

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

Most dialog editors I've used have a "timer" function of sorts, and I would like the DIAdem SUD dialog editor to have a "timer" function.  This would allow an event to happen at a specified interval (example 1 second) 

 

The simplest case would be to simply display the current date/time on a user dialog, and this is not possible right now without using worker objects, and I feel silly using a worker object just as a time-keeper! I would use this function often.

 

 

 

 

Sometimes it is necessary to call a procedure with an optional argument. VB provides an opportunity to do so: https://msdn.microsoft.com/en-us/library/f25e2b6b.aspx. I created a little workaround which is not working in every case, for example not, when the optional parameter is at the last position of the argument list.

 

Call Example1(1,) 'throws an error message
Call Example1(1) 'throws an error message
Call Example2(1,,3) 'works

' Not working
Sub Example1(param1, param2)
    If VarType(param2) = 10 Then param2 = 0
End Sub

' Working
Sub Example2(param1, param2, param3)
    If VarType(param2) = 10 Then param2 = 0
End Sub

My idea is to introduce optional parameters for procedures in the argument list with the possibility to define a default value.

Sub Example1(param1, Optional ByVal param2 = 0)

 

Hello

When developing scripts, I frequently add channel groups for analysis results, using

 

call data.root.channelgroups.add("analysis")

 

However, when re-running the scripts, successive groups "analysis1", "analysis2" etc. are created. This is a handy feature that I should not want to miss at some times, BUT

at other times I want to skip the creation of new channel groups. As a work-around I litter my code with 'exist'-statements such as

 

If not call data.root.channelgroups.exists("analysis") then

       call data.root.channelgroups.add("analysis")

end if

Set oResGrp = data.root.channelgroups("analysis")

 

Now, my suggestion is to add a command such as "AddOrReplace" or "Use", which would use the existing group if it exists and creates a new group if not. Pretty much the same behaviour as with the calculator, where

CH("NewChannel")= CH("oldChannel") will create a new channel or overwrite an existing one.

 

So

call data.root.channelgroups.add("analysis")

would work as we know it and

call data.root.channelgroups.Use("analysis")

would create a new object or use the existing one.

Alternatively one could supply an optional paramter to the .Add-method like

call data.root.channelgroups.add("analysis",0)

 as default using the well-known behaviour whereas

call data.root.channelgroups.add("analysis",1)

would change to create or replace.

 

Obviously the same would come in handy for channels or other objects that use an .add-method.

 

Thank you

 

Michael

This idea is another idea borrowed from programmers editors, the idea being to show a search history window that will show all matches for a specific term. If the particluar line is double-clicked then Diadem will jump to that specific file and line showing the search term. Search History

 

We've suggested this in person, but thought I'd finally post it to the site.

Despite it being called the Data Portal, we'd like to have the capability of docking DIAlogs of any purpose into the data portal as new tabs alongside 'Structure' and 'List' views.

 

Non Modal DIAlogs tend to cover some portion of the active window, so tend to get in the way and end up being closed and re-opened by the user despite our resizing and overlapping of the Data Portal.  Allowing docking into the Data Portal would allow for convenient sizing (REPORT/VIEW tabs are already re-sized around the data portal) and movement with the application from one screen to another.

 

The primary example of functionality advancement for us would be our 'Page Browser', which is much like the View/Report 'manage' function, but works for both, allows filtering on both, allows for convenient rearranging of sheets to any other position, and can remain up at all times so users can simply jump to or flip to sheets without re-opening the 'manage' function or slowly tabbing/scanning through all sheets.

 

Obviously, it's up to you to decide the implementation...having some sort of tab manager at the very top or bottom that switches the 'Data Portal' out entirely for a 'Sheet Portal' and other custom DIAlog options & names could also work, or some other implementation entirely, but as the other tab manager already exists (but only ever contains 2 tabs), I feel would likely be less of a massive UI overhaul.

 

-Josh

i would like to have more possibilitys to work with breakpoints like you can do with CVI

 

jump over the step

repeat

go back to breakpoint

 

 

 

 

Notepad++ has much more comfort to edit the scripts because you can also

 

open / close the If / While / ....

 

 

2013-07-01_093134.png

 

 

When editing a Script. The path for the saving files  defaults to the last opened file, instead of remembering the path for each file being editted.  This causes files to be saved in the directory of the last file opened, which many times results in the wrong saving location. This is especially an issue when have large number of script files in different directories.

 

I would prefer that each script file that was being edited would keep it path separate and stored so that it always saves the files to the location that it was opened from.

 

What about an extended grouping feature like the recently implemented collapsing/expanding possibility for subs or functions? I would like to see it extended to loops, case structures or just arbitrary chunks of script to make longer scripts clearer and easier accessible.

Hi,

 

I´d like to know how many people would like to see structured error and warning handling in dataplugins.

 

Just having the ErrorRaise method doesn´t suit my needs of get some detailed informations when just a warning would be sufficient.

 

How about having a RaiseWarning method?

 

and

 

a kind of UI to query the datafinder of files and paths where warnings and erros occur

 

br,

thomas

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

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


 

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