LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulses [width, delay, time, trigger}

Hello,
 
I need to test bunch of digital signals that go for very short period of time "high" and then "low", and keep doing so back and forth. I need to measure the width od that pulse, the period between the two pulses, I need to be able to trigger the start of pulse, etc. Could you please provide me more info of how to do such thing and by using which of two cards ( I have both.) Also, I would need to calculate the period time and the delay time for those pulses so I guess I will need some kind of timer or counter. Just, please provide me general idea of which card to use, or even both, and how to set up such thing in the LabView.
 
thanks
0 Kudos
Message 1 of 23
(4,345 Views)
 

You definitely want to use a Counter/Timer to do this.

All of NI's E and M series DAQ cards have timers, so any of them will work. Though the M series are newer and less expensive. Even the USB-6008 has a single counter and it's only $160.

As for how to do these measurements, have a look in the examples that ship with LabVIEW (Help menu> Find Examples) and search for Counter. There are plenty and should get you going in the right direction.

Let us know if you need more information.

Ed



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 2 of 23
(4,340 Views)
I already have purchased NI 6541 and NI 6289. Which one of these should I use, what do you prefer and why?
0 Kudos
Message 3 of 23
(4,337 Views)
The 6541 is a digital waveform generator/analyzer. So it would probably be the best choice for this as these types of measurements. I've not personally used this card for anything, but it seems it would be more than capable.
 
The 6289 is an M series multifunction DAQ card and has two counters. You would be able to do the measurements (at least two of them) on this card using the counters.
 
Ed

Message Edited by Ed Dickens on 07-25-2007 04:22 PM



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 4 of 23
(4,327 Views)
Thanks. I have 8 lines that needs to be checked and only two counters available. Should I use Multiplexer and switch different lines at different times? Also, to what lines on the 6289 card should I connect them?
0 Kudos
Message 5 of 23
(4,324 Views)

See my edited mesasge above about card choice.

You'll need to look in the cards manual to determine where you'll need to connect the signals.

Ed



Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 6 of 23
(4,322 Views)

Ed, tell me if I am wrong. The NI PCI-6289 16 PFI lines can be DO,DI,AO,AI lines whereas NI PC-6541 10 PFI lines can be only Ai, and AO.

So, I guess I will be using NI PCI-6289 rather than NI PCI-6541. I have 8 digital signals that needs to be either DI or DO PFI lines. How should I connect those lines, just straight each line to PFI0 through PFI7 and that's it? What other lines should be connected in order to PFI lines to work?

What if I want to use timer/counter on some of them? Is there a certain line that should is related to the timer/counter line and be connected somewhere?

Thanks
0 Kudos
Message 7 of 23
(4,303 Views)
I am confused with PFI and Clocked lines. Which ones are more powerfuly and what is the main difference between them?
0 Kudos
Message 8 of 23
(4,292 Views)
The PFI lines are not used for measuring signals. On a Multifunction DAQ card, some of them are use to pass signals to the counters, but to measure a signal not using counters, you'll need to connect to the DIO lines of the 6541. The PFI lines are used mainly for triggering and synchronization.
 
Using the regular DIO lines on the 6289, you will probably not be able get the timing resolution you need to do these types of measurements. The counters on the 6289 will be able to give the measurements you need, but there are only two counters on that card.
 
I've not used the 6541, but I see from the manual (available for download) that it has 32 DIO lines and a 50MHz clock rate. The DIO lines are what you would want to connect your signal to. I don't have and can't simulate this card so I can't tell you what type of measurements it is capable of. Btu since it is a digital waveform analyzer, I would think you would be able to do all of the measurements you need. Make sure you have installed the drivers for the card, then you should be able to open the Example Finder in LabVIEW and look at several examples that should show how to setup an application for this card. This will give you a starting point.
 
Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 9 of 23
(4,286 Views)
Great advice Ed,

I wanted to add just a few things as I read through this forum, both for the_intern and of others. 

I know that the_intern is not using the USB-6008, but wanted to add for anyone else who may read this forum, the single counter on the board is a simple event counter.  Therefore it is used to count pulses, but cannot be compared with another signal or clock to determine period or frequency (this feature is available on E-Series and M-Series boards as well as the Counter/Timer boards.

PFI stands for Programmable Function Interface.  Often these pins are multi-purpose.  You can check you board in Measurement and Automation Explorer by right-clicking and selecting Device Pinouts.  This will show you the different purposes by the names.  For example on my M-Series board, PFI0 is also P1.0.  If I am running a digital task I would use the digital name P1.0 which means line 0 of the first port.  Alternatively, I could connect a digital signal to the line and specify PFI0 as the line I wish to trigger an analog task from or specify it as the terminal I wish to count. 

Digital lines (i.e. P1.0) are typically used to check if a signal is high or low.  If the board has correlated DIO (hardware timed) the point at which the signal was detected to be high or low can be matched with a timestamp.  To get accurate information on the period or frequency of the digital signal you measure, you must be able to sample quickly or you will introduce error.  Note that you are reading at specific intervals in time, which do not necessarily coincide with the edges of the signal you are measuring.

Counters on the other hand are internal to the board, but can analyze signals connected to any PFI line.  Counters detect when a signal changes and can accurately correlate this with a clock. The board will have default PFI lines which the counters measure or output on, however you can specify different ones if you desire.  The Device Pinout should show you the default PFI terminals.

Since you have 8 lines to read the M-Series board may not be your best bet.  The digital timing is controlled via an external clock (a signal you provide) and is not as fast as the timing on the NI-6541.  The counters are a good bet but you would only be able to work with two signals at a time.  If this works for your application you could use the different PFI lines and sequentially run tasks specifying the appropriate PFI line to use for the counter.  If not, the digital lines on the NI-6541 would be your best bet.  As Ryan mentioned on your other post some post processing (analyzing where the signal changed, comparing timestamps to determine period) would be required.

Also, could you please keep this discussion to a single thread? It will be easier for us to help you.  I recommend that since this is really a question and not a LabVIEW question, please post any follow up questions to this thread.

Regards,

Jennifer O.
0 Kudos
Message 10 of 23
(4,256 Views)