LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CONTROL DE PICOS Y VALLES DE UNA SEÑAL

Estimados, tengo un código generado donde detecto los picos y valles de una señal simulada, lo que requiero es que en función de los controles booleanos de salida peak y valley cuando se active peak a la salida tener un 1 y mantenerlo hasta que se active valley y generar a la salida un 0. Esta salida 0/1 me servirá para controlar el sentido de giro de un motor

0 Kudos
Message 1 of 2
(537 Views)

Hi m,

 


@m240597 wrote:

Dear, I have a generated code where I detect the peaks and valleys of a simulated signal,


I doubt you will detect all peaks/valleys of your simulated signal when you use the ToDDT function with the PtByPt-PeakDetector…

 


@m240597 wrote:

when peak is activated at the output, have a 1 and maintain it until valley is activated. and generate a 0 at the output. This 0/1 output will help me control the direction of rotation of a motor


Why use numeric 0/1 when you can use a boolean False/True?

It seems you want to react on rising edges of the peak/valley booleans: there is another PtByPt function named BooleanCrossing!

(To keep values for the next iteration(s) you should use shift registers or feedback nodes.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(508 Views)