11-10-2009 11:59 PM
How do I create an 800Hz time channel using the "Create Time Channel" in the Analysis section of Diadem. It will only allow intergers to be used as a time step. To 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 10. But 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
Solved! Go to Solution.
11-11-2009 05:43 PM
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
11-11-2009 06:11 PM
11-12-2009 10:24 AM
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/ScanRateHzTimeChan = 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
11-16-2009 04:49 PM