Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory access violation on call to CreateVoltageChannel with .NET 4.0 Framwork

 

We are using NI4472 and NI4474 Data Aquisition cards using the Measurement Studio 8 assemblies (E.g. NationalInstruments.DAQmx 8.0.11.12).

 

These have worked perfectly with applications under the .NET 2.0 & 3.5 Frameworks. But when we recently updated to .NET 4.0 we are now experiencing Memory Access Violation exceptions on the first call to CreateVoltageChannel

 

 using NationalInstruments.DAQmx;

 

public class DAQmxTask1 : Task

{

  public DAQmxTask1(string deviceName, string channel, double min, double max, double rate, SampleQuantityMode mode, int samples) : base("EMDetector1")

  {

    this.AIChannels.CreateVoltageChannel(deviceName + "/" + channel, "Voltage", AITerminalConfiguration.Pseudodifferential, min, max, AIVoltageUnits.Volts);

    this.Timing.ConfigureSampleClock("", rate, SampleClockActiveEdge.Rising, mode, samples);

    this.Triggers.StartTrigger.ConfigureDigitalEdgeTrigger("PFI0", DigitalEdgeStartTriggerEdge.Rising);

  }

 

}

 

Does anyone know what the problem is ?

0 Kudos
Message 1 of 1
(3,198 Views)