09-14-2009 10:01 AM
I have a USB-6229 that I'm running via SignalExpress, and I'm trying to record two counter inputs simultaneously. However, it seems that it has trouble adding the second channel. When I add the first channel via Acquire Signals > DAQmx Acquire > Counter Input > Position > Angular and pick the ctr0 channel, it lists (properly) PFI8 and PFI10 as the A and B channel inputs. However, when I add the ctr1 channel to the same task (via the blue plus 'Add Channel' button), it still lists the same PFI8 and PFI10 as the inputs.
On the other hand, if I add ctr1 first and then add ctr0 second, it lists PFI3 and PFI11 as the A and B channel inputs for both counter inputs.
How can I get both counters operating independantly?
Thanks,
Josh
Solved! Go to Solution.
09-15-2009 03:28 PM
Realized that I can't run two counters from a single Task in Signal Express (unlike, say, two analog inputs). Once I added it as two separate tasks everything works fine.
Now I've got synchronization issues. Looking through these boards and the documentation, it looks like I won't be able to fix that via SignalExpress, so I'm pursuing it in LabView. I'm having some problems with that, but I'll post that in a new thread here.
09-15-2009 05:20 PM
Hi, Josh.
Unfortunately, multiple counters cannot exist in a single task in SignalExpress. To synchronize two counters, one could create a dummy Analog Input task, and use the AI Sample Clock as the clock source for both counters, or one could use an Arm Start Trigger for both counters (as shown in this Community example). These features are not available in SignalExpress. If you were using LabVIEW, for example, you would have the ability to synchronize the two counters.
Note: For angular position measurements, the following connections should be made:
Ctr0
A: PFI 8
B: PFI 10
Ctr1
A: PFI 3
B: PFI 4
Check out the 68-Pin M Series Signal Connections for Counters in the NI-DAQmx Help.