LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array values peoblem

Hi,

I have an array of power in dbm and I want to know how much amplification I need to add in order to bring the array to be in a specific power value for all frequencies. I guess I need a loop to check for each frequency but don't know yet how to do so. Some of the array values are negetive and some positive but at the end they all have to be the same so I need to know for each frequency how much amplification I need.

TNX

Guy

0 Kudos
Message 1 of 6
(2,778 Views)

Hi Guy,

 

I guess I need a loop to check for each frequency but don't know yet how to do so.

Yes, a loop may help. When you don't know how to use loops (and autoindexing) in LabVIEW: take the free beginner courses offered by NI on their website!

 

Some of the array values are negetive and some positive but at the end they all have to be the same

When all values should be the same in the end a simple InitializeArray function may give the same results… (Irony!)

 

so I need to know for each frequency how much amplification I need.

amplification := target_value - current_value…

Remember the polymorphism of LabVIEW functions and you will not need a loop anymore…

 

Edit:

At a first glance it seems to me you already asked the same here and got answers (and even said "now it's working")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,775 Views)

Target value - current value won't be good if the current value is negetive and for the positive option I still need to take that and to put each value in an array and to supply the correct amplification according to the comparing.

I see I have a lot of Arrays learning to do, so I am strating with the videos now.

Thanks 🙂

0 Kudos
Message 3 of 6
(2,766 Views)

@GuyGor wrote:

Target value - current value won't be good if the current value is negetive


How do you figure?  Subtract a negative value and you have an add by the absolute value.  For example: Target = 5 and Current = -10.  5 - (-10) = 15.  So you need to amplify by 15dB.


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
Message 4 of 6
(2,757 Views)

Its is not the same question

0 Kudos
Message 5 of 6
(2,752 Views)

TNX

0 Kudos
Message 6 of 6
(2,748 Views)