DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Bus Log Converter - View Layout - How to display Assignment values

Hello,

 

I use Diadem's bus log converter to convert CAN traces to TDM format for review. Many of the signals i am converting and plotting have assignments that are defined in the DBC file. However, I am struggling to find a way where i can have my View layout display what the actual assignment values are. Ideally, I would like my legend to show what the assignment values are for where my cursor lies within the trace.

 

Any pointers?

0 Kudos
Message 1 of 11
(1,753 Views)

Hi CAN_Diag,

 

The assignments can be displayed as follows:

 

P1.png

 

Greetings

Walter

Message 2 of 11
(1,723 Views)

Walter,

 

Is there any way to display the assignment text in the legend? Instead of it showing my cursor Y, I would like it to show what the assignment value is for Y.

 

CAN_Diag_0-1671637528829.png

 

0 Kudos
Message 3 of 11
(1,717 Views)

Hi CAN_Diag,

 

Yes, this is possible with a cursor event as a user command. The cursor event is a script that is called when the cursor is moved. In this event the assignment text to the current position is determined and displayed in the legend at the entry "<freetext>". An example is attached.
For preparation the entry "<freetext>" must be added in the legend. The title is arbitrary e.g. "Assignment".

P1.png

Then enter the channels in VIEW and switch on the curve cursor and call the script AssignmentMain.vbs for initialization. This script registers the user command and enters the function to be called into the cursor event.

Greetings from Santa Claus

Walter

Message 4 of 11
(1,700 Views)

Walter,

 

This does work however, if I have multiple signals in a 2d axis with assignments, it will display the assignment of the selected signal for both. I should be able to work around this and just separate plots.

 

My other question would be how can I make it so I don't have to run the script every time I open diadem?

0 Kudos
Message 5 of 11
(1,635 Views)

Hi CAN_Diag,

 

I have checked this, but unfortunately it is not possible at the moment.

I have created a request for this function for R&D.

 

Greetings

Walter

0 Kudos
Message 6 of 11
(1,502 Views)

Hi CAN_Diag,

 

R&D found a solution for your request. You only need to enter this command:

 

@@Data.GetChannel(View.ActiveSheet.ActiveArea.DisplayObj.Curves2D.CurrCurve.YChannelName).Values(View.ActiveSheet.Cursor.P1)@@

 

into the <freetext> legend property as format. No script is necessary.

 

Greetings

Walter

0 Kudos
Message 7 of 11
(1,493 Views)

This works!!! Thank you so much for helping out Walter.

 

 

0 Kudos
Message 8 of 11
(1,487 Views)

Hi CAN_Diag,

 

One tip in advance. If you have more than one 2D axis area in your DIAdem VIEW page, then it is better to use this syntax in the legend:

 

@@Data.GetChannel(View.ActiveSheet.Areas("Assignment").DisplayObj.Curves2D.CurrCurve.YChannelName).Values(View.ActiveSheet.Cursor.P1)@@

 

"Assignment" is the 2D axis area name. (By right clicking on the area.)

The advantage is that you see the assignment channel text independent of the active area.

 

Greetings

Walter

0 Kudos
Message 9 of 11
(1,414 Views)

... or:

 

@@Data.GetChannel(View.ActiveSheet.CurrArea.Curves2D.CurrCurve.YChannelName).Values(View.ActiveSheet.Cursor.P1)@@

Greetings

Walter

0 Kudos
Message 10 of 11
(1,386 Views)