Discussion:
How do I measure the time between to negative going edges using a NI-9401?
(too old to reply)
edp3
2008-04-23 17:10:12 UTC
Permalink
I am not sure if I am even setting this up right. Using C# I am doing this:
 

private Task Meter;
..
Meter = new Task( "FlowMeter");
Meter.DIChannels.CreateChannel("cDAQ1Mod1/port0/line0", MeterInput, ChannelLineGrouping.OneChannelForEachLine);
Meter.Timing.ConfigureSampleClock("20MHzTimebase", SampleRate, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples);
Meter.Timing.ChangeDetectionDIFallingEdgePhysicalChannels = MeterInput;
Meter.DigitalChangeDetection += new DigitalChangeDetectionEventHandler(Meter_DigitalChangeDetection);
 
Is there a timer that I can access from the event handler Meter_DigitalChangeDetection? Or is another approach used? Thanks
Ryan N.
2008-04-24 22:40:10 UTC
Permalink
edp3,


Take a look at this example. 
It was written for use with a 6602 counter time card, but it may provide
some insight into how you can go about programming your device.  Also it was created in Microsoft Visual Studio 2005, let me know if you encounter any problems.


I hope this helps!


TwoEdgeSepCS - 2.zip:
http://forums.ni.com/attachments/ni/70/8740/1/TwoEdgeSepCS - 2.zip
Continue reading on narkive:
Loading...