Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

DigitalChangeDetection not raised

Solved!
Go to solution

Hello,

I'm trying to developp an application which uses the DAQmx 8.8 library with C#.

 

I have a NI PC-6514 card emulated on my PC. I just want to be able to detect a change of state in one of the Digital input lines of my card.

 

There is my code (inspired from the sample delivered with DAQmx) :

 

In the Load event of my windows form I create the task :

      m_nitkTask = new Task("TestTask");

      m_nitkTask.DIChannels.CreateChannel("Dev1/port0/line3", "TestDigital",
        ChannelLineGrouping.OneChannelForAllLines);
     
      m_nitkTask.Control(TaskAction.Verify);

      m_nitkTask.Timing.ConfigureChangeDetection(
        m_nitkTask.DIChannels[0].PhysicalName,
        m_nitkTask.DIChannels[0].PhysicalName,
        SampleQuantityMode.ContinuousSamples, 1000);

      m_nitkTask.DigitalChangeDetection +=
        new DigitalChangeDetectionEventHandler(m_nitkTask_DigitalChangeDetection);

      m_nitkTask.SynchronizeCallbacks = true;


In the click event of a start button I start teh task :

      m_nitkTask.Start();

      m_cmdStart.Enabled = false;
      m_cmdStop .Enabled = true;

 

I can wait as long as I want no event is raised (m_nitkTask_DigitalChangeDetection is never called) ... I tried also with the sample and no event is raised in the sample.

 

Does anyone have any idea what is the problem ?

 

Thank you in advance for your answers

0 Kudos
Message 1 of 3
(4,004 Views)
Solution
Accepted by topic author Gasser

Hi, the PCI-6514 is simulated, you said. So there is no possibility to receive a digital change detection event !

This absolutely requires the real Hardware.

 

regards

 

Marco Brauner NIG 

Message 2 of 3
(3,985 Views)

Hello Hans,

thank you for your answer, you're right man !

 

It works prefectly with the real device (I use remote debugging to run my app on the test machine)

 

Greetings

 

J-D Gasser

0 Kudos
Message 3 of 3
(3,974 Views)