LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Doing Count Events with DAQ Assistant, not offered PFI0, offered Ctr0. Samething?

Solved!
Go to solution

DAQ Assistant with USB DAQ 6009.  I have wired a Push button switch to PFI0(port 29) and +5V(port 31).  DAQ Assistant setup ==> Acquire==> Counter Input==> Edge Counter==> Dev1(USB-6009)---Ctr0 ==>One sample on demand.

 

I was offered the selection Ctr0 and not the selection PFI0(port 29), so I selected Ctr0.  Samething?  Will this work with the way I wired up my switch?

 

I'm counting "digital highs", so wire to 5V and not ground.  Right?

 

With LV2013 and a DAQ connected to computer, one can do what I've done in a project vi and/or in a regular, standard vi.  Right?

 

Thank you for your time

dunnor

 

0 Kudos
Message 1 of 5
(2,930 Views)

That's a lot of questions and I probably won't be able to answer all of them.

 

The first I can answer. Looking at the user manual for the device here.

 

http://www.ni.com/pdf/manuals/371303m.pdf

 

Under the PFI0 section you can see that PFI0 can be configured a trigger, or event counter.  When useing the counter this is where you wire it to so good guess there.

 

Your wiring may need a pull down resistor.  If you are using a single pull single throw switch, then you will be connecting 5V or open when the switch is off.  This leaves the signal floating and the value may drift.  You don't want this, what you want is to tie the signal to ground when the switch is off.  A simple solution is a single pull double throw, where you tie PFI0 to ground or 5V.  Another solution is a pull down resistor that pulls the PFI0 to ground instead of open.  You can test this all out in MAX.  Make sure your stuff works in MAX first, if it doesn't work there, it won't work in your code.

 

I highly recommend a project but it isn't required.  A project helps organize multiple files into a single location.  Files in a project can be documents, pictures, icons, VIs, or really any file.  Being organized like this helps improve development.

 

Also why are you doing this with a counter?  Is this just for a test?  A normal digital input is better suited to reading the state of a switch.

0 Kudos
Message 2 of 5
(2,924 Views)

Thank you for your input

dunnor

0 Kudos
Message 3 of 5
(2,913 Views)

@dunnor wrote:

Thank you for your input

dunnor


Thanks are given with kudos, and marking answers as solutions.

0 Kudos
Message 4 of 5
(2,905 Views)
Solution
Accepted by topic author dunnor
Hoovahh

My hard wire solution worked going PFI0 and GND. Sorry. I was thinking I could go back and give kudos after I tried things out. I'd press the buttons now, but I don't see them.

dunnor
0 Kudos
Message 5 of 5
(2,886 Views)