Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure/program the PFI terminal to function as counters on a ELVIS board

I currently doing a experiment where I require to use 2 counters to act as input (TTL signal from ultrasonic sensor) and 2 counters to act as output (to my PWM circuit).
I using a LabView 8.2 with a NI ELVIS board together with a USB-6251 DAQ card.
So the problem I face now is that there only 2 counter avaliable on the ELVIS board.
Can I configure/program the PFI terminals on the board to use it as counters. If yes, how should I do it.
Thanks.
 
Marx
0 Kudos
Message 1 of 5
(8,735 Views)

Hi mightymouse,

Unfortunately with your current setup you only have two counters available.  You can route the counter signal through the PFI lines, but you cannot configure the PFI terminals to act as a counter.  You will need another DAQ card with an additional 2 counters to get meet your setup requirements.  NI also offers counter/timer cards that have more than 2 counters on a single card.

Jared T.
0 Kudos
Message 2 of 5
(8,722 Views)
Thanks J_Thomas for the reply.
 
So like you have said, there is only 2 counter avaliable.
I have decided to use those counters port for my PWM circuit.
So how to I goes about configuring the avaliable PFI port to function as digital input in my vi,
to read in the pulse width from the Sensor?
 
Marx
0 Kudos
Message 3 of 5
(8,716 Views)

To set up the PWM signal use these resources to help you get started:

There is a great example that ships with DAQmx called PWM-Counter Output.vi that shows how this can be accomplished.  (Open LabVIEW Example Finder. Go to help >> Find Examples.  Search for PWM)

You can also check the following link for more examples with PWM.

Pulse Width Modulation (PWM) Using NI-DAQmx and LabVIEW

 

To measure a signal from your sensor:

Like I mentioned before you will not be able to make pulse measurements, count digital edges, etc… without two additional counters.  You can read in your TTL signals directly using the digital input lines on your NI ELVIS board.  The LabVIEW Example Finder referenced above has some great examples for getting started with reading in a digital signal.  Browse to Hardware Input and Output  >>  DAQmx >> Digital Measurements.

Jared T.
0 Kudos
Message 4 of 5
(8,703 Views)

Hi,  I am having similar problems with counters on my ELVIS II board.  I am trying to count angular rotation from a two-pulse encoder.  I am not sure where and how to configure Labview 2010 for the B signal.  Hence, I can only get it to continously count up.  When I try to use the DAQ assistant, it gives no indication on where to plugin the B signal.  When I try to use the DAQ assistant, it gives no indication on where to plugin the B signal.  The other examples I found on the net use the old ELVIS and and older version of Labview.  Hence, I could not get those examples working as well.  Can I pls get advice on this?

0 Kudos
Message 5 of 5
(6,117 Views)