05-14-2014 01:35 PM
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
Solved! Go to Solution.
05-14-2014 01:51 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-14-2014 03:11 PM
Thank you for your input
dunnor
05-14-2014 03:56 PM
@dunnor wrote:
Thank you for your input
dunnor
Thanks are given with kudos, and marking answers as solutions.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-14-2014 11:28 PM