Hi,
I am using the cDAQ-9178 chassis and the 9423 card connected to 4 quadrature encoders. I am programming in C# using the National instruments DAQmx DLL.
I have a few questions:
1. Can I change the PFI connections for each counter? I would like to connect 4 quadrature encoders A&B signals to the module such that:
Encoder 1 A -> PFI0
Encoder 1 B -> PFI1
Encoder 2 A -> PFI2
Encoder 2 B -> PFI3
Encoder 3 A -> PFI4
Encoder 3 B -> PFI5
Encoder 4 A -> PFI6
Encoder 4 B -> PFI7
2. I need to get speed (RPM), direction and count from 4 quadrature encoder simultaneously. Is there a virtual channel that does all of this or do I need to use seperate virtual channels and combine them into one task?
To count I think I should use CIChannels.CreateCountEdgesChannel. To get the speed I think I should use CIChannels.CreateFrequencyChannel. Is this correct?
How would I get direction?
How can I make sure that count goes both up and down when the quadrature encoder direction is reversed? I think I would use the direction to toggle the count up/down?
What is the best way of doing what I need?
Thanks in advance
Joe