Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

ConfigureSampleClock exception when passed samplesPerChannel parameter

I'm working with a NIDAQmx provided c# example, ContGenVoltageWfm_IntClk. I can compile and run the executable without problems. All of the controls on the executable work without problems (change output channel, voltage limits, frequency, etc), but when I click the "start" button, I get the exception:

Method not found: 'Void NationalInstruments.DAQmx.Timing.ConfigureSampleClock(System.String, Double, NationalInstruments.DAQmx.SampleClockActiveEdge, NationalInstruments.DAQmx.SampleQuantityMode, Int32)'.

The offending line of code is:
myTask.Timing.ConfigureSampleClock("", fGen.ResultingSampleClockRate, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 1000);

If I remove the 5th parameter, samplesPerChannel (1000 in this case), the program works fine; I've checked the output from the DAQ card on a scope and I'm getting a sine wave at the correct frequency and voltage.

Has anyone else run into this problem? Does anyone know why I'm getting this?

For reference, I am using:
Win2000 SP4
PCI-6229 with NI-DAQmx 8.3.0
Mono-1.2.4 compiler
No measurement studio, visual studio, etc

Thanks!
Elizabeth Reynolds
0 Kudos
Message 1 of 3
(3,598 Views)
Hi Elizabeth -

Unfortunately, we don't test or work with Mono.  The only recommendation I can offer is to make sure that you have NationalInstruments.DAQmx and NationalInstruments.Common added to your compiler as references.  You might also want to upgrade to DAQmx 8.5.  (I don't know that there are any specific bug fixes for this error, but it might help.)
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,589 Views)
Okay, thanks for your input. I will upgrade to DAQmx 8.5 and am testing out Microsoft Visual C# 2005 Express for creating and building projects. It built some of the example projects without any problems, but now I am having hardware problems so I can't fully test it.

Thanks again,
Elizabeth
0 Kudos
Message 3 of 3
(3,583 Views)