LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Data Write

Solved!
Go to solution

Attached is actually my try

0 Kudos
Message 11 of 24
(1,001 Views)

@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.


GCentral
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
0 Kudos
Message 12 of 24
(993 Views)

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.

0 Kudos
Message 13 of 24
(963 Views)

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?

 

 

0 Kudos
Message 14 of 24
(959 Views)

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.

 

 

0 Kudos
Message 15 of 24
(955 Views)

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
0 Kudos
Message 16 of 24
(947 Views)

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

0 Kudos
Message 17 of 24
(929 Views)

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
0 Kudos
Message 18 of 24
(918 Views)

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

0 Kudos
Message 19 of 24
(916 Views)

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
(914 Views)