DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to create a custom display type in DIAdem, for example a speedometer type instrument?

As an example I have velocity data which shows a vehicle accelerating from rest to 60 km/h and then travelling at a constant speed. As opposed to displaying this data using a 2D axis system is it possible to create a new speedometer display type to display this information? Maybe this display type already exists but I have not come across it yet? I've been using DIAdem for a few days now. The current version I am using is 11.2. It has been suggested in the past that it was possible to display data using numeric displays etc but I can't seem to find the features in v11.2. Thanks for your help in advance.

0 Kudos
Message 1 of 5
(3,720 Views)

Hi Matthew,

 

This is technically possible in DIAdem today, but it's not as easy as it could be.  If you're interested in this type of behavior being easier in the future, I'd love it if you suggest it on our DIAdem Ideas forum at ni.com/diademideas.

 

In order to accomplish this in the product today, there are a few caveats I want to make you aware of:

 

  1. You would need to upgrade to DIAdem 2010 (release August 2010) in order to take advantage of a new feature, the abillity to embed custom user dialogs in VIEW areas.
  2. You would need to design your own user dialog in the SUD editor that contains a Gauge-like control.
  3. You would need a small script (~5 lines) that reacts to the VIEW.Events.onCursorChanged event in VIEW in order to synchronize data with the Gauge.

 

Here's an example that I wrote for a white paper, Synchronizing In-Vehicle CAN Traffic with Other Data using DIAdem. I'd be happy to provide you the source code after you upgrade to DIAdem 2010.


Let me know if this helps?

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 2 of 5
(3,626 Views)

DRock,

 

Thanks for the reply. I am currently using DIAdem 2010. I have literally installed it within the last couple of days. So in theory I should be able to embed custom user dialogs in VIEW areas. So I need to think about points 2 and 3 that you have mentioned and read your white paper.

 

I wonder whether it would be possible to obtain the source code that you mention? I'm assuming that it is vbs code? I had a look on the diademideas forum this morning and noticed that it had not be suggested. I'll make a suggestion for the next release of DIAdem.

 

Thanks very much for your input.

 

Regards

 

 

Matthew

0 Kudos
Message 3 of 5
(3,622 Views)

Hey Matthew,

 

I'm sorry for the [extremely] delayed reply - I have been out of the office (and out of the country) for two weeks with extremely limited email access.  I've attached the files that I used to create the example you saw in the YouTube video embedded above.  Please note that I threw this together pretty quickly for the video, and that it is not "commercial quality."  Use this as a proof-of-concept upon which to elaborate to get started.

 

The parts are:

 

CAN Synchronization.tdv

This is the DIAdem VIEW Layout that contains the video, map, 2D axis, and embedded user dialog with ActiveX gauge control.  Think of this as the "user interface" you see in the video.

 

Gauge.sud

This is the scriptable user dialog (SUD) box that is embedded in the VIEW Layout described above.  It contains the ActiveX control which I have affectionately named "MyGauge."

 

DisplayCursorCommand.vbs

This is the short script that is designed to react to the event that fires when the cursor is playing in DIAdem VIEW.  I have commented all 5-ish lines with their functionality.

 

In order to register the script so that it fires in reaction to the event when the cursor is playing, I chose to register it as a DIAdem UserCommand (Settings » Options » Extensions » User Commands) and then run the line of code:

 

View.Events.onCursorChange = "DisplayCursor"

 

You could do this elsewhere within some other script.

 

Let me know if you have any questions!

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 4 of 5
(3,520 Views)

Hi Derrick,

 

Thanks for the information. Apologies for not replying sooner, been extremely busy recently with a plethora of challenges using scripts to automate the extraction  and analysis of a sizeable quantity of logged data.

 

I am appreciative what you have contributed thus far and have no qualms that you threw it together quickly and will heed your advice to use it as a proof of concept to get me to first base. What you have written looks very interesting and as soon as I get the opportunity I will study it in greater detail. If I have any questions at that point, I'll post my questions in this thread.

 

Thanks for your help.

 

Regards

 

Matthew

0 Kudos
Message 5 of 5
(3,454 Views)