12-20-2022 05:58 PM
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?
12-21-2022 01:50 AM
Hi CAN_Diag,
The assignments can be displayed as follows:
Greetings
Walter
12-21-2022 09:45 AM
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.
12-22-2022 03:57 AM - edited 12-22-2022 04:35 AM
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".
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
12-28-2022 11:47 AM
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?
01-04-2023 04:21 AM
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
01-04-2023 07:36 AM
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
01-04-2023 09:33 AM
This works!!! Thank you so much for helping out Walter.
01-11-2023 12:31 AM
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
01-13-2023 12:41 AM
... or:
@@Data.GetChannel(View.ActiveSheet.CurrArea.Curves2D.CurrCurve.YChannelName).Values(View.ActiveSheet.Cursor.P1)@@
Greetings
Walter