03-16-2007 07:18 AM
03-19-2007 02:16 PM
Hi Tim,
You've pretty much diagnosed the situation. If you manually change the "Waveform x-step width" property for both waveform channels in the Data Portal to the average of their two values (5E-06) so that they both have identical waveform properties, the FormulaCalc() operation will product a new waveform channel. If either the waveform time offset or waveform delta time properties are even slightly different, the resulting channel is a numeric channel.
Ask if you have questions about setting the property,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-21-2007 04:30 AM
Hi Tim,
Let me add one comment to Brad's explanation:
You can test the "equality" of two floating point numbers in the following way:
Call FormulaCalc("B1 := 5.00000000000153E-06 = 4.99999999999996E-06")
Call MsgBox(B1) ' false
Call FormulaCalc("B1 := 5.000000000000153E-06 = 4.99999999999996E-06")
Call MsgBox(B1) ' true
' DIAdem 10.1 or higher
If ProgramRevision >= 1010 Then
Call MsgBox(ValEqual(5.00000000000153E-06, 4.99999999999996E-06)) ' false
Call MsgBox(ValEqual(5.000000000000153E-06, 4.99999999999996E-06)) ' true
End If
You will see that DIAdem uses approx. 13 significant figures for the comparism.
Christian