LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you Acess the PFI inputs from the DAQ assistant?

I am using USB-6218 Daq device.
 
I have wired a square wave to the input PFI-1, and my ground for this signal goes to D-GND.
 
I don't see any way to use this signal in the DAQ assistant, Ideally I'd like for it to tell me the frequency of the square wave.
 
How do i do this?
 
0 Kudos
Message 1 of 6
(3,558 Views)
Your board does not appear to have any counters (which is what you would ideally use to do this type of measurement).

I am curious exactly what you are asking:

Are you having trouble getting the DAQ Assistant to read from the particular terminal you have wired?

Are you having trouble taking the data you are receiving, and massaging it to give you the frequency?

Or, if it is not one of those, what is the specific issue you are having?

Best,
~milq
0 Kudos
Message 2 of 6
(3,546 Views)

Yes i am having BOTH of those problems.

1. I dont know how to acess this signal

2. I dont know how to establish the frequency once i figure how how to get the signal.

 

0 Kudos
Message 3 of 6
(3,540 Views)
Ok, first step.

In DAQ assistant, set up an input (in this case, since you have no counter I would say analog input).  Then set the input to read off of ai0 (or whichever you want, you can pick arbitarily).  Then at the bottom of the Assistant, you should see a tab labeled "Connection Diagram" clicking there will tell you where to wire the + and the - sides of your signal (but remember, it is analog now, not digital). 

That should solve one of your problems.

The other problem is a little more complex, and in reality has a ton of different solutions.  I think your best shot is to use the express vi for spectral measurements. 
Found in Express -> Signal Analysis -> Spectral
This is a bit like like putting out a match with a fire hose (way more powerful than what you need).  But parsing out that information will give you what you want (namely, the frequency component with the highest magnitude).  There are a ton of other spectral measurements that you can do to get this same information.  If this is beyond the scope of your project, and you foresee doing lots of this type of measurement, you should probably look in to getting a board with more counters.

Best of luck,
~milq
0 Kudos
Message 4 of 6
(3,533 Views)
 

your device does have two counters on the USB 6218 https://www.ni.com/en-us/support/model.usb-6218.html in the daq assistant choose the counter option and then click on the connection diagram to see where to connect your signals.  also look at the shipping examples for counters in the find examples menu under the help

hope this helps

 

-James

- James

Using LV 2012 on Windows 7 64 bit
0 Kudos
Message 5 of 6
(3,526 Views)
Damn, completely missed the second line of that spec.

Yes, you want to create a Counter->Frequency Task in DAQ Assistant (and follow the suggestion in the Assistant window to wire it).  Ground will still go to DGND.  That will output what you want.

I can't believe I missed that,
~milq
0 Kudos
Message 6 of 6
(3,523 Views)