# LabVIEW

cancel
Showing results for
Did you mean:

Highlighted

## Control Frequency Using Two Numeric Controls

Hi,

I know this is quite simple, does anyone know how to control a frequency of a simulated signal using two controls.

The scenario is, when  I adjust the first knob, it should correspond to an increase in frequency also in the graph. When I  increase the second knob, it should increase the freqency also. I've used an OR function to do this, however when I adjust the second knob, it adds to the frequency of the first knob. How can I make the knobs independent of each other.

This is my VI.

Message 1 of 5
(1,415 Views)
Highlighted

## Re: Control Frequency Using Two Numeric Controls

I don't understand the point of having two knobs.  Do you want them to have the same value?  Why have 2 knobs instead of just the one?

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 2 of 5
(1,398 Views)
Highlighted

## Re: Control Frequency Using Two Numeric Controls

This is part of a bigger project of mine. I want to control my FPGA via PC host and RT host. So the other control is  a shared variable from the PC host and the oher is the control for my RT host. I want to be able to control my signal from either two of this controls.

Message 3 of 5
(1,389 Views)
Highlighted

## Re: Control Frequency Using Two Numeric Controls

Logical functions only work with booleans (green) and integers (blue wires) and operate bitwise. Your DBLs will get coerced to integers and the OR will probably not get you what you want. Why not use conventional code?

For example, you could keep the desired value in a shift register and update it with whatever control value changed last. You stll need to watch out for collisions. What of both sides change it at the same time?

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 4 of 5
(1,373 Views)
Highlighted

## Re: Control Frequency Using Two Numeric Controls

@gjjude wrote:

So the other control is  a shared variable from the PC host and the oher is the control for my RT host.

Ok, let me just stop you there.  Trust me from many many failures.  Shared Variables will do nothing but get you into trouble.  Instead, you should use a messaging protocol via a Network Stream or raw TCP/IP.  This way the PC just sends a command when it needs to override the frequency.  This also give the RT controller the ability to just ignore the command for one reason or another.

There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 5 of 5
(1,359 Views)