03-08-2013 02:13 PM
Hello,
I'm an old hand at VB6/NIDAQ but now I'm trying to get the hang of the new ways. I have generated a simple Task with the DAQ Assitant to count pulses. I want to count pulses on PFI 0 instead of the default PFI 8 line for counter 0. (PCIe 6143). The Assitant generated code is:
myTask.CIChannels.CreateCountEdgesChannel("/Dev1/ctr0", "Count Edges", _
edgeType,Convert.ToInt64(initialCountTextBox.Text), countDirection)
How do I indicate that I want the input to be on PFI 0? I have tried many different syntaxes, but I can't find the way to make the specification.
myTask.CIChannels(0).CountEdgesTerminal = "PFI0"
It is frustrating to not be able to get past step 1.
Solved! Go to Solution.
03-09-2013 05:33 PM
I found the answer myself (after 6 hours of searching). Do something like this...
myTask.CIChannels.CreateSemiPeriodChannel("Dev1/ctr0", _
"SemiPeriodMeasurement", Convert.ToDouble(minValueTextBox.Text), _
Convert.ToDouble(maxValueTextBox.Text), CISemiPeriodUnits.Seconds)
HERE IS THE GOLD!
Dim d AsCIChannel = myTask.CIChannels("SemiPeriodMeasurement")
d.SemiPeriodTerminal ="/Dev1/PFI0"
Thanks to the forums, or I would still be searching.
Brad