10-15-2008 08:47 AM
Hello,
i want measure the period and pulse duration continuously of two signals with an usb-6009. Every 8s there is a high pulse for 15ms. I want to measure length of the pulse and pause. Can someone help me? I can`t get a start up with this problem.
The four measurements (two channels two measurements per channel) are a dataset. This dataset should be stored in a textfile continuously. But this not a problem.
thankyou
Schwede
10-15-2008 03:28 PM - edited 10-15-2008 03:29 PM
Hi Schwede,
Thanks for the post!
I had noticed you've received no replies.. but as Im out of the office until tomorrow, I will look into this in more detail.
However, I can talk a bit now:
So ideally you would use the hardware clock in DAQmx tasks to measure the pulse - there are examples in the example finder (Help>>Find Examples>>Hardware I/O>>DAQmx...). However, Im pretty sure this will use two counters (At least 1! per channel). The USB 6009 only has 1 counter.. you wont be able to do it for two channels...so Im not sure you'll be able to resolve your issue this way.. I do need to confirm this tomorrow mind you!
So secondly you could do this in hardware, by sampling the channels and having code to detect a change of state and then to time this period - i.e. Measure the length of the pulse. I have an example of this, on my office machine.
So I'll post a more detailed reply tomorrow at some point.
Kind Regards,
10-21-2008 05:17 AM
Hello,
i have tried to measure the signals analog, but i can get an solution. The problem is to measure continuously and store the period an pulse width at the same time.
can anybody help me? Examples?
greetings
schwede
10-21-2008 07:24 AM
Hi Schwede,
Thanks for the update - Im now back in the office!
I have some bad news, your using the wrong device - you need a device with at least two counters - to acquire for two signals. But, secondly,(see specs), the counter measurements support by the USB 6009 doesn't include pulse or width measurements.
The specs for the USB 6009:
Counter
Number of counters ................................1
Resolution...............................................32 bits
Counter measurements ...........................Edge counting (falling-edge)
To acheive the functionality you require I would recommend a USB 621x:
Number of counter/timers ............... 2
Resolution ....................................... 32 bits
Counter measurements.................... Edge counting,
pulse,
semi-period,
period,
two-edge separation
Also, this link is rather useful also:
How Many Counters Does Each Type of Counter Input or Output Task Take?
http://forums.ni.com/t5/forums/replypage/board-id/170/message-id/363123
Please let me know if you have any other questions.
Kind Regards,