I have successfully used PFI0 as a counter input on my USB-6002, with C# :-
task.CIChannels.CreateCountEdgesChannel("Dev1/ctr0", "Count Edges", CICountEdgesActiveEdge.Falling, 0, CICountEdgesCountDirection.Up);
I now need to use PFI1 as the input, instead of PFI0. I think I need to first use DaqSystem.Local.DisconnectTerminals() and DaqSystem.Local.ConnectTerminals() to disconnect PFI0 and connect PFI1 prior to starting the task, as follows:-
DaqSystem.Local.DisconnectTerminals("/Dev1/PFI0", "/Dev1/Ctr0Source");
DaqSystem.Local.ConnectTerminals("/Dev1/PFI1", "/Dev1/Ctr0Source");
However I get an exception upon task.Start() - "NationalInstruments.DAQmx.DaqException: 'Specified route cannot be satisfied, because it requires resources that are currently in use by another route."
Perhaps that is because PFI1 is already assigned to Port1? If so, I can't see how to disconnect that.
Any help would be greatly appreciated!