06-13-2013 01:18 PM
Hello,
I have a waveform in DIAdem which is say 30s long. In a script I would like to convert a section of data between say 0s and 4s to NoValues. If I was doing conversion based on y-values then I would the CTNV function. However I can't a find a way of doing this based on a time interval. I know I can do it in View using the cursors but I need to be able to script it with no user intervention.
Can anyone help please?
Thanks,
Martin
Solved! Go to Solution.
06-17-2013 12:08 PM
Hi Martin,
I'm afraid your best bet is to temporarily create a time channel from the waveform properties. Assuming you're starting with a channel object variable for the YChannel in question, this is what it would look like:
ChanList = WfChnToChn(YChannel, TRUE, "WfXRelative")
L1 = CNo(ChanList(0))
L2 = YChannel.Properties("Number").Value
R1 = 0
R2 = 4
Call Calculate("Ch(""New YChannel"") = IIF(Ch(L1)>=R1 AND Ch(L2)<=R2, Ch(L2), Null)")
Call ChnDel(L1)
Brad Turpin
DIAdem Product Support Engineer
National Instruments
06-17-2013 03:59 PM