From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign PFI to counters with labview

Hi

 

I'd like to assign PFI to input,output,arm,aux channels of a counter, instead of using the default PFI route.

 

- How can this be done programmatically in labview with DAQmx ?

 

- If the answer is using the "DAQmx Connect" then what direction should I use (counter to PFI or PFI to counter) ? Where can I find the strings that correspond to each PFI and counter channels ?

 

- If a PFI is assigned to a counter input, but there is only a CO task running on that counter, can I use this PFI as trigger input for that CO task ? Can I use this PFI as trigger input for other tasks that is not running on this counter ?

 

Thanks in advance !

 

 

0 Kudos
Message 1 of 2
(2,384 Views)

Will answer inline in red:

 


I'd like to assign PFI to input,output,arm,aux channels of a counter, instead of using the default PFI route.

- How can this be done programmatically in labview with DAQmx ?

 

Most of those input signals would be set with DAQmx property nodes.  Most PFI input pin routing is done via Channel, Timing, or Trigger property nodes.  Output pin assignments can be done either with a DAQmx Channel property node or via DAQmx Export Signal.vi

 

- If the answer is using the "DAQmx Connect" then what direction should I use (counter to PFI or PFI to counter) ? Where can I find the strings that correspond to each PFI and counter channels ?

 

Right-click the terminal of DAQmx Export Signal and create a control or constant.  That'll create something of the correct datatype.

 

- If a PFI is assigned to a counter input, but there is only a CO task running on that counter, can I use this PFI as trigger input for that CO task ? Can I use this PFI as trigger input for other tasks that is not running on this counter ?

 

Generally, yes.  The same PFI signal can usually be routed to different tasks for different purposes.  For example, it's common to sync tasks by having all of them configured to use the same trigger signal.

 

-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 2
(2,362 Views)