As the title suggests, I'm writing a controller in C# with the aim to read counts using a PCIe-6351. Right now, all I'm asking my code to do is display the counter readout starting from a value of 10 ever 200ms about 10 times.
But my readout is returning this
0: System.Collections.Generic.List'1[System.Double]
... repeated to index 9.
My initialization code is as follows:
public Task ReaderTask { get; private set; }
public void AddReadChannel(string channelName, bool isCounter)
{
string cname = new String(channeName.Where(Char.IsLetter).ToArray());
{
this.ReaderTask.CIChannels.CreateCountEdgesChannel(channelName,
"Counterreader " + cname, CICountEdgesActiveEdge.Rising, 10,
CICountEdgesCountDirection.Up);
}
}
I have two issues I'm trying to resolve on my own, but could use help wtih
1. Finding the method to configure the input terminal to PFI0 from the default PFI8. When I connect to the terminal in NIMAX I see counts being received when I switch to that terminal.
I was also curious if anyone could inform me if I should work using the single channel reader or the multi?
Any help would be so greatly appreciated.