# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: Serial Data Write

Attached is actually my try

Message 11 of 24
(889 Views)

## Re: Serial Data Write

@naumanhabib wrote:

See i have tried this formula but not getting frequency of that max peak. Please if you can update my vi in which i get frequency value of that max peak.

Supply some data and the actual VI so we can help debug.  Everything looks like it should work based on the picture, but we can't debug a picture.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 12 of 24
(881 Views)

## Re: Serial Data Write

Check in this VI i am not getting frequency value of max peak with formula specified (Frequency= f0 + df x Index). In my case peak occurs at -16K so i want to store this value somewhere in numeric/string form.

Message 13 of 24
(851 Views)

## Re: Serial Data Write

You are searching for the maximum value in your array.  That is obviously the one that reaches the top of the graph with a value of -54 at -28800.

Why do you think it is at -16,000?

What does a negative frequency even mean to you?

Message 14 of 24
(847 Views)

## Re: How to set threshold for Graph values

i am very thankful to all of you, my this problem resolved too. I now only want to set a threshold for this peak like when max value occurs greater than -50 then glow some led light and for the rest of values it remain show the other values.

Message 15 of 24
(843 Views)

## Re: How to set threshold for Graph values

Hi naumanhabib,

@naumanhabib wrote:

set a threshold for this peak like when max value occurs greater than -50 then glow some led light and for the rest of values it remain show the other values.

So you need a simple comparison like:

``````IF MaxPeak >= -50 THEN
LED:=TRUE
ELSE
LED:=FALSE
ENDIF

or more simple:
LED:= (MaxPeak >= -50)``````

And you aren't able to create a simple code like that?

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 16 of 24
(835 Views)

## Re: How to set threshold for Graph values

Yes i am unable because i don't know where to insert that code. Please if you can update my vi. Thanks a lot

Message 17 of 24
(817 Views)

## Re: How to set threshold for Graph values

Hi naumanhabib,

@naumanhabib wrote:

Yes i am unable because i don't know where to insert that code.

So you want to compare the resulting peak value with a constant value - and you don't know where to place that code?

What about wiring the "resulting peak value" to a comparison node?

What about wiring the result of that comparison to your LED indicator?

C'mon…

Best regards,
GerdW

using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 18 of 24
(806 Views)

## Re: How to set threshold for Graph values

Yes exactly i want to compare the resulting peak value with a constant value - and i don't know where to place that code. Also then i don't know the way for comparison result to led indicator. Help will be appreciated muchh. Thanks

Message 19 of 24
(804 Views)

## Re: How to set threshold for Graph values

If you are asking that kind of question then I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

Message 20 of 24
(802 Views)