06-17-2010 06:47 PM
Hi..
I am new to LabVIEW so please bear with me.. I am trying to measure the RPM of my motor which has an optical pick up tachometer attached to it.. The signal is analog and has two states
1. 0 (here the output is in the order of millivolts and is very low)
2. 1 (Here the outout is a steady 10V)
i need to find the time between the two leading edges of the high state so that i can convert it to an RPM. but my basic level trigger detection always outputs a FALSE value even if the signal is above the set LEVEL. hence i am not able to get a time stamp differnce at all..
i dont know if there is a better way to do this. its basically just measring the pulses of my signal. Can anyone suggest a way
Attached is the VI
Solved! Go to Solution.
06-17-2010 10:49 PM
06-18-2010 12:44 AM
Hi srikrishnaNF
I have a NI-9172 Chasis and i am using a NI-9205 for analog input. i am not sure how to set the counter. i shall look into the example but can you aslo tell me in this VI how can i incorporate a counter ?? i don see an option for it....
Shankar
06-18-2010 12:58 AM
HI shanky1023,
If you have any digital I/O modules ,fix them in 5th or 6th slot of NI 9172 chasis to make use of those counters..For reference check this post.
http://forums.ni.com/t5/Counter-Timer/Using-Counters-with-NI-cDAQ-9172/m-p/995855.
Thanks and regards,
srikrishnaNF
06-18-2010 01:07 AM
hi srikrishnaNF
That is the problem.. I donot have a digital I/O module.. Is there no other way of doing it.. ??? the signal is an analog voltage though.. cant i use any Trigger function to do this ??
06-20-2010 11:35 PM
Hi Shankar,
You should be able to do this with the Level Trigger, but from your VI it looks like you're only taking a single sample (i.e. one point). This won't be best for triggering because you're looking for a rising edge. Since there's only one point, there is no rise. If you acquire more than one point of data at a time - say 1000 samples - you'll be able to see the rising edge. You should look at one of the DAQmx examples for doing continuous analog input to see how to get data continuously.
06-22-2010 03:11 PM
Hello
hi .. Yes i did N samples and it seems to work.. But i have a small problem now, The x-y value works fine for only very high sampling rates.. For low sampling rates it gives erroneous values. and i cant use such high sampling rates as my DAQmx also has other channels which i use for logging data at lower sampling rates. Can you suggest me a way to compromise on these 2 aspects
Shankar
06-23-2010 06:42 PM
Hi Shankar,
What is the x-y value that you're talking about? If this is the raw input from the card, then there might be another problem, since that should not be happening. Or is this a value based on the trigger?
06-24-2010 12:29 AM
Hey Jared..
x-y value is the Time Stamp difference value between two leading edges of the signal. Basically a time stamp(y) is created and another time stamp(x) is created in the next leading edge of the signal. The difference giving me the period of the signal..
Shankar
06-24-2010 08:03 PM - edited 06-24-2010 08:03 PM
Hi Shankar,
If you use the timestamp of the trigger location, it should be more accurate.