LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

detect rise in waveform

Hi Ppl,

is there any way to detect rise and fall in the waveform?

i am posting the pic of the waveform i am working on. the pic has 4 red points on the waveform where i want to put the cursors.

4 points are - 1) rise in the waveform, 2) High  Peak, 3) Low Peak, 4) Fall in waveform.

Peaks can be found with the peak detector.vi.

is there any direct method to find out the Rise and Fall in the waveform or do i need to write some code for it?

 

Thanks

Ritesh

0 Kudos
Message 1 of 18
(3,400 Views)
Any Help!!
0 Kudos
Message 2 of 18
(3,369 Views)

Hi Ritesh024,

 

The Derivative x(t) VI installs with the Full Development System or greater and performs a discrete differentiation of the sampled signal.  You could check for when the derivative is 0.  Come to think of it, why can't you just check when the data array goes constant for n number of points?

Message 3 of 18
(3,354 Views)

Hi Pie56694,

Thanks for ur reply.

i think i should rather check for the derivative function.

actually i have already implemented the same thing in C. just wanted to know if i need to write the code again in LabView, or is there any in built function which performs the same thing.

 

Thanks,

Ritesh

0 Kudos
Message 4 of 18
(3,341 Views)

Hi Ritesh,

 

It is also an option to compile your C code into a DLL and use the Call Library Function Node to invoke the function.  I hope this helps.

Message 5 of 18
(3,320 Views)

Hi Pie56694,

I thought of doing it the .dll way, but then i copied the code C code into "formula node" and it executed without any problem.

i want to know is it advisable to use Call Library Function Node or just copy the C code in formula node ?

I mean in terms to execution time.

And also, if i implement the same thing in Labview will it be faster than the  Call Library Function Node or Formula Node?

 

Thanks,

Ritesh

0 Kudos
Message 6 of 18
(3,318 Views)

Hi Ritesh,

 

The Call Library Function Node is faster since it is already compiled machine code. The Call Library Function Node is more difficult to debug, since you must recompile the DLL with every change to the source code.

The Formula Node is slower because LabVIEW must compile the syntax at runtime.  The Formula node is easier to debug and work with since you can change the source code in the block diagram.  I hope this helps.

Message 7 of 18
(3,313 Views)

Pie56694 wrote:

The Formula Node is slower because LabVIEW must compile the syntax at runtime. 


Are you sure The Formula Node complies the syntax at run time?

AFAI, the Program doesn't run until all the errors have been rectified. And i need to fix all the syntax errors in the Formula Node in order to run the VI.

And if all the compilation is done before the execution of the VI, i dont think it will recompile the Formula Node again at runtime.

 

Looking for Feedback.

 

Thanks,

Ritesh

0 Kudos
Message 8 of 18
(3,300 Views)

Hi Ritesh,

 

LabVIEW evaluates the block diagram multiple times.  Several early passes check the syntax and type correctness of the diagram.  Subsequent passes organize nodes for multitasking.  A subsequent pass allocates data space.  Lastly, compiled code is generated.  LabVIEW will not generate code if the syntax is incorrect.  I hope this helps.

Message 9 of 18
(3,288 Views)

Yes, Exactly!

Thats what i wanted to know if all the compilation is done before the VI actually starts running and there is no compilation done during run time then why would Formula Node take more time than DLL to execute ?

 

 

Thanks,

Ritesh

0 Kudos
Message 10 of 18
(3,265 Views)