12-04-2008 11:00 AM
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
Solved! Go to Solution.
12-08-2008 06:40 AM
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
12-08-2008 10:16 AM
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