LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Function when X decreases Y increases

Hello. I´m trying to make a signal generator with a sine function but my function has to decreases X when increases Y when I change the frecuency. I don´t know how to implement that in LabVIEW. I have to produce that signal in a power supply but, if I use the function Y=1/X where X=sin(a), when x=0 y=inf, how can I remove x=0?

 

0 Kudos
Message 1 of 4
(955 Views)

Let's start with a bit of trigonometry and point out Y = sec (a) since by definition,  secant IS 1/sine That's generally not a shape you would want to output from a power supply.

 

This is one of those lessons every developer learns eventually (and most often the hard way) 'when the specifications make no sense, you need to go back and talk to the client and find out what they thought they said they wanted.  What is flawed here is clear communication. 

 

Now, from a pure number standpoint, (again,  you should go talk to  your client) You could send Y into In Range and Coerce to limit Y to the range your power supply can actually generate. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4
(914 Views)

@GokuJubilao wrote:

but my function has to decreases X when increases Y when I change the frequency.


Make Y = -X.  Or is Y = 1/X the actual requirement?


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 3 of 4
(900 Views)

Nothing in your attached VI is labeled "X" or "Y" (you have offset, amplitude, frequency, and N and dt from the default sampling info). It is also not clear what the purpose of the FOR loop is, since it only executes once the while loop has completed and right before the program ends. Shouldn't this be a state machine?

 

Can you describe in simpler terms what you actually want? (e.g. constant number of periods per iteration, etc.)

 

I have the feeling that you are complicating this way too much. Don't you want to customize the sampling info? What is the final purpose of all this?? Why do you use a chart instead of a graph?

0 Kudos
Message 4 of 4
(845 Views)