I'm designing a system based on the NI-6343-OEM in which I will be doing the following:
For the position, I’m using counter 0 (PFI8, PFI10), and for the PWM frequency measurement, I’m using counters 1 and 2 (PFI3 and PFI0).
Can anyone advise on whether unused counter pins can be used as DI/O? In particular:
Solved! Go to Solution.
Probably. A lot of PFI pins serve double duty -- referred to as PFIxx for counter tasks or as Port X.Y for digital tasks. Go into MAX, select your device, right-click and look at the "device pinouts". You'll likely find that many (maybe all?) of the PFI pins you're asking about can be referenced in port.line format for digital tasks.
Note that these double-duty pins will only support on-demand software-timed digital tasks. Hardware timed (and buffered) tasks can only be configured on port 0, and port 0 pins don't do double-duty as PFI pins.
Thanks for the response--unfortunately, I don't think I was clear in my question. I know that these pins can be used as general purpose digital IO; however, I'm wondering whether the use of a counter precludes the use of unused pins from said counter. E.g. if I'm only reading the A/B channels of an encoder, can I simultaneously use the Z input as digital IO? Similarly, if I'm only counting edges of a PWM signal (via the counter's src pin) can I simultaneously use the 3 other counter pins (gate, aux, out) as digital IO?
You should be fine. Pins that aren't used or needed for a given counter task (such as Z, Aux, Out) will be freely available for use as general purpose DIO.
I don't know of specific documentation that would address the question head-on. But you can do some experimental confirmation with either the real DAQ device or by setting up a simulated device in MAX.
If a given pin isn't available for task B because task A has already reserved it for use, DAQmx will throw an error for task B whether you're using a real or simulated device. This is something simulated devices are great for -- checking out device capabilities and resource conflicts.
- Kevin P
For everyone's benefit, it doesn't appear to be documented, but according to an NI technical support engineer, the USB-6343 (and likely other X series devices) allow for unused counter pins to be used as generic digital I/O.