Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Unused counter pins

Solved!
Go to solution

Hello--

 

I'm designing a system based on the NI-6343-OEM in which I will be doing the following:

  • Read a position encoder (A and B channels only, index is not read)
  • Measure the frequency of two PWM inputs

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:

  • Since I’m ignoring the index on the position encoder, can I use PFI9 (the counter 0 Z channel) as a digital in/out?
  • Since I’m only measuring frequency of a PWM signal, can I use PFI4, PFI11, PFI1, and PFI2 (counters 1 and 2's gate, aux, and out) as digital ins/outs?

Thank you!

Sandheep

0 Kudos
Message 1 of 8
(2,348 Views)

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.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 8
(2,315 Views)

Kevin--

 

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?

 

Thank you!

Sandheep

0 Kudos
Message 3 of 8
(2,287 Views)

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.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 8
(2,235 Views)

Got it--thank you!

 

By any chance, do you know if there's any documentation that confirms this? 

 

Thanks!

Sandheep

0 Kudos
Message 5 of 8
(2,213 Views)

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

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 6 of 8
(2,166 Views)

got it--thanks!

0 Kudos
Message 7 of 8
(2,136 Views)
Solution
Accepted by topic author sandheep

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.

0 Kudos
Message 8 of 8
(2,093 Views)