DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

create 800hz time channel in Diadem

Solved!
Go to solution

How do I create an 800Hz time channel using the "Create Time Channel" in the Analysis section of DiademIt will only allow intergers to be used as a time stepTo create a 1000Hz time channel I use a time unit of "miilisecond" and a time step of 1, for 100Hz time I use a time unit of "millisecond" and a time step of 10But for an 800Hz time channel using the "millisecond"time unit the time step would have to be 1.25 which Diadem will not accept.

I have other time frequencies that pose this problem, such as 325 Hz and so on.

 

Any help will be appreciated

 

Thanks

John

0 Kudos
Message 1 of 5
(4,815 Views)

Hi John,

 

Use the "Generate Numeric Channel" dialog instead and just name the resulting channel "Time".  The "Generate Time Channel" dialog is for creating "date/time" channels in DIAdem, which unfortunately only have a resolution of 0.1 ms.

 

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 5
(4,793 Views)
If I use that command how do I input a start time in the hh:mm:ss.fff format.  I need to generate a time channel that coresponds to UTC time in order to sync all of the data that I record from different DAQ systems as well as UTC time stamped video.  I can start the time channel with 1 and increments .00125 (for 800 Hz) but then I cannot generate a real hh:mm:ss.fff channel.
0 Kudos
Message 3 of 5
(4,791 Views)

Hi John,

 

 

DIAdem can only display time channel values to a resolution of a tenth of a millisecond, but we can create a numeric channel which stores the full resolution of your time data and then toggle the "DisplayType" property to "Time" to trick that numeric channel into displaying as a date/time channel.  You still won't see the microsecond and tenth of a microsecond resolution in date/time display, but the values will be correct except for that limitation.  I'm attaching a VBScript function that does this (using DIadem 10.x commands).

 

Function CreateTimeChan(Name, StartTime, ScanRateHz, Length)

  Dim TimeChan, Period

  StartTime =
TTR(StartTime, "#mm/dd/yyyy hh:nn:ss.ffff")

  IF StartTime <= 0 THEN Exit Function

  IF ScanRateHz <= 0 THEN Exit Function

  Period = 1/ScanRateHz

  TimeChan = ChnLinGen(Name, 0, Length-1, Length)

  Call ChnLinScale(TimeChan, TimeChan, Period, StartTime)

  Call ChnPropValSet(TimeChan, "DisplayType", "Time")

  Call ChnPropValSet(TimeChan, "Unit_String", "s")

CreateTimeChan = TimeChan

End Function ' CreateTimeChan()

 

Brad Turpin

DIAdem Product Support Engineer
National Instrument

0 Kudos
Message 4 of 5
(4,778 Views)
Solution
Accepted by topic author jjandascog
Thanks, that takes care of my issue
0 Kudos
Message 5 of 5
(4,751 Views)