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

Lately there has been a need by many individuals to shift data for one reason or another.  Possibly the data was collected without using a trigger to synch everything or just collected with an inevitable delay.

 

Would R&D look into a function that could mark two points in a customer's data and then align/shift the data so a comparison may be done of one data set against another?

 

Thanks!

Diadem currently has a copy function for curves within the user interface, as shown below: 

 

 

true.png

 

However, there is no copy function within the scripting api. This means to duplicate a curve programmatically multiple functions. one for each of the properties in the curve, need to be called as shown below: 

 

Dim oMyReportObj, oMyNew2DCurve,

Set oMyReportObj = Report.ActiveSheet.Objects.Item(1)

Set oMyNew2DCurve = oMyReportObj.Curves2D.Add(e2DShapeLine, oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count).Name &"_copy")
oMyNew2DCurve.Shape.XChannel.Reference = oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count-1).Shape.XChannel.Reference
oMyNew2DCurve.Shape.YChannel.Reference = oMyReportObj.Curves2D.Item(oMyReportObj.Curves2D.Count-1).Shape.YChannel.Reference
oMyNew2DCurve.Shape.Settings.Line.Width = eLineWidth0100

...

 

It would be far easier if there were a call to copy a curve directly: 

 

Dim oMyReportObj, oMyNew2DCurve,

Set oMyReportObj = Report.ActiveSheet.Objects.Item(1)

Set oMyNew2DCurve = oMyReportObj.Curves2D.Copy(1)

 

 

 

I often create custom reports that have a box drawn "FreeFrame" with a text box "FreeText" inside. In some cases, I put too many characters in the text box and it breaks the bounds of the box. It is difficult to predict the size of the text box unless you use a font like courier. I would like the property of size added to the report text box.

 

  • The use case is update the text box with the text.
  •  Check the rendered text box size.
  • Adjust font size if the box exceeds the size of the surrounding box.

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.

 

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!

In specification for MME files is defined that "Additional descriptors" are written with "." dot as first character of descriptors.

In Diadem the properties of channel cant begin with ".", so diadem replaces it with "_", but Diadem MME data plugin loads MME files without these properties.

Could you please implement it that it will load these descriptors as well?

 

------

Now when i export data by MME export plugin, its doesnt collect and save Additional descriptors and after calling the function 'DataFileSave("", "MMEExport")' i must manually open each file created, parse it and add Additional descriptors by checking each line of the file. I got problem there when i got files with lot of values, because using functions "TextfileWriteLn" or methods of Scripting.FileSystemObject takes really long time.

If the data plugin export all descriptors, it would solve the problem im facing.

For example channel with 500.000 values takes minutes to "recreate" the file with just few new lines added.

 

There is obviously a problem converting time Strings like 1.5.2015 correctly to time data and back. Everything works well as long as Day and Month have really both two digits. As long as this is not fullfilled, the conversion is wrong when the TTR is then used like this:

 

D2AXISXBEGIN=TTR(ZeitMin_,"#DD.MM.YYYY")

 

Then 2000 years missing and the date arriving the report is 1.5.0015 what is in fact slightly different. I off course programmed a workaround filling up the "0" in front of a one digit day and month, but that shout be done by the TTR correctly.

global Variables do not have the "Auto Complete" Funktion when you write them in script.

The script editor needs the ability to comment or uncomment an entire block of text at once, similar to what is present in the Dialog Editor and most other script editors.

During script development I'm finding I often want to run little one-off scripts to get some insight into the environment at that particular point in time.  Stuff like...

 

LogFileWrite(ItemInfoGet("MyGlobal"))

 or maybe iterating through a collection to see what it contains.

 

Currently I have to open a new script window, type up my script, and execute it.  This gets to be a headache as I have several temporary script windows open each with a different command I want to use.  It would be nice to have a script console tab available in the watch window where I could type in the commands and have them execute immediately.  Alternatively, an option to highlight a section of a script and execute only that section would allow me to bunch all my commands into a single temporary window.

Hi

 

I have create an Element List filtering some channels of a group

 

Dim mSyncLst, iGrp
Set iGrp = Data.Root.ActiveChannelGroup
Set mSyncLst = Data.GetChannels(iGrp.Name & "/ABC*") 'List With Several Channels

 

I would like to add to the mSyncLst the channels containing DEF. e.g. Data.GetChannels(iGrp.Name & "/DEF*"), which also contains several channels. Using the method Add mSyncLst, only allows to append one channel each time.

 

Thank you

DIAdem should have intellisense work throughout all script file.

So the DIAdem script editor -- which is a nice editor, don't get me wrong 😉 -- has the option to set bookmarks to ease navigation within a lengthy script. I like to use these, but I would like them even more if there were an option to carry them over to the next time I launch DIAdem to work on the script, possibly to mark where I left off, or to enable me to jump right back into the fray, as it were.

 

Has this been requested before, and if no, what is the likelyhood of this making it into a future version?

 

Thanks in advance and best regards

Leo

Let argument in object.GetReference(argument) method should be optional and as default set ExtendChnName

  In this case calling of function should look like Call ChnSmooth(oMyChannel.GetReference,oMyChannel.GetReference,10,“maxNumber“)

 

Also include in Channel object even required properties (description, unit, max, min, length, etc.). This should be equivalent to oMyChannel.Properties(NameOrIndex).Value