LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why does "detected fundamental freq" terminal from harm analyz vi not worl properly for me?

ok, so i have built various protype circuits in the past fwe weeks , and using the "detected fundamental freq" terminal from harm analyz vi i as able to detect the freq with no problems at all. however, since trying to implement the same thing in my latest version, it requires me to multiply the "detected fundamental freq" terminal from harm analyz vi by the sampling freq in order to get an realistic result. can anyone tell me why this is now happening? and more importantly will it be throwing of my harmonic comonents level from the same Vi too, and THD? i.e do they need to be multiplied by the same factor?


on the "results" state of my circuit you can see two harm anayz vi's, one mult by the fs, and the other not.


would be greatfull for any advice,  thankyou


Griogair
0 Kudos
Message 1 of 4
(2,671 Views)
Hi there,

I've had a look at your code and you seem to have endless broken wires, which for the main part are due to the mixing of scalar and array data, resulting in you having datatype mis-matches. I wonder if this could be a reason that you are getting different results. You are multiplying an entire array by the sampling frequency, are you sure which element of the array actually holds the data you require?

If you right click on the harm analyz vi you are using, and goto select type, here you can configure the function to deal with scalr values or arrays and I suspect this to be your issue.
0 Kudos
Message 2 of 4
(2,655 Views)
hi thanks for having a look, please advice where the broken wires are, as there are no broken wires at my end!   😕

thanks.
0 Kudos
Message 3 of 4
(2,652 Views)
Ah I see, I applied my own fix that i mentioned in the last post and the broken wires are now gone, my environment defaults to n channels not scalar!

Not sure what the problem is with the code (if there is a problem that is), have you tried probing the input and output data of the function to see if you can spot anything obvious? If possible, try to replicate the issue in a separate and simple VI to see if the data that you are inputting to the function gives you the expected results or different.
0 Kudos
Message 4 of 4
(2,645 Views)