LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Frequency Using Two Numeric Controls

Highlighted

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.

 

freq.PNG

0 Kudos
Message 1 of 5
(1,429 Views)
Highlighted

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?


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

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.

 

 

0 Kudos
Message 3 of 5
(1,403 Views)
Highlighted

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 GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 4 of 5
(1,387 Views)
Highlighted

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


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