I tried passing an int, double, double, double, ref object and still get a type mismatch. Here is my code.
double[] jj;
int samples = 1000;
double amp, freq, percent;
freq = 1;
amp = 1;
percent = 100;
object phase = new Object();
phase = 0;
jj = (double[]) cwdsp.SquareWave(samples, amp, freq, percent, ref phase);
I get a type mismatch regardless of whether or not I initialize phase (i.e., phase = 0). Here is the stack trace.
Type mismatch.
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at CWAnalysisControlsLib._DCWDSP.SquareWave(Object n, Object Amp, Object f, Object DutyCycle, Object&
Phase)
at AxCWAnalysisControlsLib.AxCWDSP.SquareWave(Object n, Object amp, Object f, Object dutyCycle, Object& phase)
at MotorTest.BearingForm.generateAnalogOutput(Boolean status) in c:\projects\p39\base_gantry\motortest\bearingform.cs:line 764
Any thoughts, thanks.
Philip
I'm ordering Studio 7.0 as soon as I can get the approval!!