01-27-2021 04:52 AM - edited 01-27-2021 05:41 AM
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?
01-27-2021 08:11 AM - edited 01-27-2021 08:28 AM
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.
01-27-2021 08:39 AM
@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?
02-19-2021 12:20 PM - edited 02-19-2021 12:25 PM
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?