From 11:00 PM CST Friday, Feb 14th - 6:30 PM CST Saturday, Feb 15th, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Display in View

Solved!
Go to solution

New to Diadem again.

I'm bus converting CAN log files from a Vector .asc file & from a .dbc. So far so good.

The .asc file has time in the format of : say 1701043218.001, before decimal is Linux time in seconds and after is milliseconds.

Once inside Diadem after Bus covert, all channel groups have a Time channel (123 s)

When I drag to a 2d for view, the x axis shows tick labels as 1.7000.. +09.

 

How do Time into a human readable format in View ?

0 Kudos
Message 1 of 4
(1,232 Views)
Solution
Accepted by TimRMS

Hello TimRMS,

 

If I have understood correctly, after loading your data you will have a numerical channel with time in seconds from January 1, 1970 (Unix time definition).

 

If you want to show the channel as a date on the X-axis of a 2D axis system in VIEW, you can convert your numerical channel into a time channel first. This can be done using the function ChnConvertNumericToTime in the ANALYSIS module.

AnJalpaka_0-1701328940471.png

 

In the dialog, enter the date 1.1.1970 and your numeric channel. The result channel is your x-channel for the 2D axis system in VIEW.

AnJalpaka_1-1701328965422.png

 

If you want to automate the conversion, you can do this with this line of code:

call ChnConvertNumericToTime("YourGroup/YourChannel", 6.21671328E+10, True)
Message 2 of 4
(1,204 Views)

So far so good, thank you.

Each CAN Id is put into a channel group. The data from a CAN ID can be 1 or more values. Each value is then a Channel in the group.

Each group has a Time channel. The time is the time the CAN message arrived.

There is over 130 groups and hence over 130 Time channels.

Do I need to convert each Time channel in each group?

 

If so, I'll need to look into how to automate that. Is that under script?

0 Kudos
Message 3 of 4
(1,182 Views)

Update.

I scripted that Time conversion call. It loops over ever group converting Time to a time channel.

Seems to work well.

Thank you your help and pointing me in the right direction.

0 Kudos
Message 4 of 4
(1,173 Views)