Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

AT-MIO-16E-10 Gate signal,how can i configure it as in input or as an output ?

Hi there ! I have AT-MIO-16E-10 board and i want to control a counter (the GPCTR0 counter of the bord) to count up depending on the gate signal.Now i have the following missunderstanding.I've read in the AT-MIO-16E-10 manual that the gate signal can be treated eather as an input or as an output.So i want to control my counter (to count up) until a signal that comes on my gate counter's entry changes his states from 1 to 0 (to reset the counter) and then when it changes his states back to 1 form 0 i.e a transition from 0 to 1 to start counting again from zero.Now here i have 2 questions : 1. How can i config the gate signal as an input signal (in the AT-MIO-16E-10 manual it sais that the signa
l can be treated as an input or output and it's known if i configure the port as an output and if i came with an external signal to the gate i can damage the board if the signal it's set to zero ) 2. What it's the default state of the gate signal ?

Any vi files would be very usefully,Thank you very much for reading this and i'll be waiting for your answers as quick as possible.
0 Kudos
Message 1 of 3
(3,531 Views)
Antonios,

The shipping example VI Count Edges does what you describe.

>Quoted from VI Description
Count Edges (DAQ-STC).vi
DESCRIPTION:
This VI counts rising edges, using an STC based device (e.g.: E-series). The counter increments its event count everytime a pulse comes into its source input. A gate signal can be added such that if a low signal occurs on the gate, then the counter will pause (scroll the front panel left to access the gate settings). The current value of the counter is read continuously in the while loop, until the Stop button is clicked or an error occurs.

I/O CONNECTIONS:
Connect the gating signal, if any, to the gate input of the selected counter.
If you selected the Source Selection to be "PFI line", connect your event count base signal to the PFI line indicated by "Source PFI line number used". (If you selected "Internal Timebase", no source connection is necessary.)

NOTE: For actual I/O pin numbers, please refer to your hardware user manual.
INSTRUCTIONS:
1. Enter the device and counter you want use.
2. Make your Source selections, as desired.
3. Optional controls are located on the left side of the front panel. You will have to use your scroll bar to reach these.
4. Connect your signals as described below in I/O CONNECTIONS.
5. Run the VI.
>End quote

If you look inside the Diagram of the Count Edges VI you will see a subVI, Group Config CTR, that has a constant set to "simple event counting." This configures the gate in the correct manner. You have 17 or so options to choose from (right-click to see the other choices). Each choice configures the counters as needed. No special effort is needed on your part.

If you really must know more details double-click on the Group Config CTR icon. On the Diagram of that VI is a Call Library function. Right-Click that and see more ugly details that you don't need to know. The functions of the counters are fully implemented by the options already available, so you don't need to know how the details, but it is intersting.

Hints:
Keep in mind that the counters require TTL level signals. 0V to 5V. Limit the current to the level the DAQ board can handle. You will false trip the counter if your low is higher than 0.8V. I have had problems with this when using noisy signals.

Also make sure you debounce any switches you wire to the counters. It is instructive to hook up an unbounced switch to the counter inputs and see just how many false trips they can generate!

Mike
0 Kudos
Message 2 of 3
(3,531 Views)
Antonio;

That board of yours doesn't have that feature. You can't do hardware reset with an e-series device. To accomplish that task you will need to use a counter board of the 660x family.

Regards
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,531 Views)