The big advantage to a waveform is that starting with DIAdem 10.0, instead of having to choose two channels for a graph in VIEW, or REPORT you can choose one. This reduces the probability of error for you or your customer when creating simple reports. It also reduces the amount of special knowledge required to make sense of your data.
Making a channel into a waveform channel is also very easy. All you have to do is add a few properties. You could for example, copy the following function into your DataPlugin and call it on your channels where you would otherwise call AddImplicitChannel:
Sub MakeWaveform(Channel,Offset,Increment,XName,XUnit)
Call Channel.Properties.Add("wf_start_offset",CDbl(Offset))
Call Channel.Properties.Add("wf_increment",CDbl(Increment))
Call Channel.Properties.Add("wf_xname",XName)
Call Channel.Properties.Add("wf_xunit_string",XUnit)
Call Channel.Properties.Add("wf_samples",CLng(1))
Call Channel.Properties.Add("wf_time_pref","relative")
Call Channel.Properties.Add("wf_start_time",CreateTime(0,1,1))
End Sub
For a full documentation of what each of these properties mean, I suggest you read the DIAdem help. The really interesting properties are offset (ie start value) and increment.
(As a side note: Calling CreateTime with less than the full 9 arguments is supported starting with DataPlugin API version 1.5. If you don't wish to switch to this version then you can fill out the rest of the arguments with 0's.)
No comments:
Post a Comment