Using DAQmx 8.0 with my VB.NET 1.1 app, I can't get the 6008 counter to work.
Stepping through the following code in VisStudio (loosely based on the CountDigEvents example), I noticed that PFI0 stays high all the time, so obviously the counter never gets incremented. But shouldn't PFI0 go low once my task defines it as a counter-input channel? Or am I not using the correct line/channel?
There is no section about the 6008 in the Device Considerations section of the Help, so I'm just assuming that I should use PFI0 and "Dev1/Ctr0"
Dim ciTask As NationalInstruments.DAQmx.Task ' counter input task
ciTask = New NationalInstruments.DAQmx.Task
ciTask.CIChannels.CreateCountEdgesChannel("Dev1/Ctr0", "Count Edges", _
NationalInstruments.DAQmx.CICountEdgesActiveEdge.Falling, _
Convert.ToInt64("1"), _
NationalInstruments.DAQmx.CICountEdgesCountDirection.Up)
Dim counterReader = New NationalInstruments.DAQmx.CounterReader(ciTask.Stream)
ciTask.Start()
Dim count As UInt32
Do
count = counterReader.ReadSingleSampleUInt32()
Loop