Hi all!
My question is straightforward I guess, but I cannot find a suitable C# .NET example for the following situation.
I have a CompactDAQ 9178 with an 8 counter module 9361. I want to program or route the global PFI0 from the CompactDAQ to gate some(!) of the counters of the 9361. So, when PFI = high, counters (i.e. 1,2,7,8) should be active and counting. PFI = low, counters should be paused. Other counters should be active all the time.
I have the following test code. Later on I want to split the counters into gated/ungated counters.
for (int i = 0; i < this.countCounters; i++)
{
counterName = string.Format(@"{0}", this.cinList[i]);
counterReadTaskGated.CIChannels.CreateCountEdgesChanne(counterName, "", CICountEdgesActiveEdge.Falling, 0, CICountEdgesCountDirection.Up);
counterReadTaskGated.CIChannels[i].CountEdgesTerminalConfiguration = CICountEdgesTerminalConfiguration.Rse;
counterReadTaskGated.CIChannels[i].CountEdgesGatePauseState = CICountEdgesGatePauseState.Low;
counterReadTaskGated.CIChannels[i].CountEdgesGateTerminal = "/cDAQ1/PFI0";
counterReadTaskGated.CIChannels[i].CountEdgesGateEnable = true;
}
Getting the error:
"Requested value is not a supported value for this property. The property value may be invalid because it conflicts with another property.
Property: NationalInstruments.DAQmx.CIChannel.CountEdgesGateTerminal
Corresponding Value: /cDAQ1/PFI0
Channel Name: cDAQ1Mod4/ctr0
Task Name: _unnamedTask<23>
Status Code: -200077"
Any help is appreciated and thanks in advance!
Martin