LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Basic Level Trigger Detection

Solved!
Go to solution

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 

0 Kudos
Message 1 of 14
(5,626 Views)

Hi shanky1023,

  You have use counters in your daq card  for your application.You need to configure your counters either for rising or falling edge and input as tachometer output.BTW which hardware are you using?Just check the examples for counters.

 

 

Thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 14
(5,614 Views)

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

0 Kudos
Message 3 of 14
(5,597 Views)

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

Regards,
Srikrishna


0 Kudos
Message 4 of 14
(5,594 Views)

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 ??

0 Kudos
Message 5 of 14
(5,592 Views)

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.

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 14
(5,564 Views)

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

0 Kudos
Message 7 of 14
(5,539 Views)

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?

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 14
(5,522 Views)

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 

0 Kudos
Message 9 of 14
(5,511 Views)
Solution
Accepted by shanky1023

Hi Shankar,

 

If you use the timestamp of the trigger location, it should be more accurate.

 

 

Jared S.
Applications Engineering
National Instruments
0 Kudos
Message 10 of 14
(5,496 Views)