LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

having issues plotting two circles of cosine wave using 720 data points

Hello I'm having issues plotting two circles of a cosine wave, I have an example of how to plot a sine and a cosine wave but having issues figuring out how to plot the two circles. This is what I have. I cant figured out how to plot the other circle.

0 Kudos
Message 1 of 4
(603 Views)

Can you explain what problem you are trying to solve? You are actually graphing about 15 turns of a circle due to poor choices of diagram constant values. You are only doing ~50 points per turn, right?

 

Can you write down the exact requirements for the program? Do you want two circles with a different centers, for example?

 

A small hint: also consider complex data because it makes things like that much easier (example)!

 

And please remove that silly greedy while loop. It has absolutely no purpose. (If you (much!) later want a front panel button to trigger a new calculation, look into a state machine architecture.)

0 Kudos
Message 2 of 4
(576 Views)

Hello, apparently I missed understood the problem, it should have been 2 circles of a cosine wave so I did this this morning and it looks exactly how it supposed to be, but now I have another question. Is there a way to have the "Program Running" LED off once the iterations reach 720? I do get the "Program done" LED to turn on when the program is done but the "program running" LED remains ON as well. 

0 Kudos
Message 3 of 4
(531 Views)

OK, you mean two cycles, not circles! Big difference!

 

  • Why do you need a start button if you already have the run button in the toolbar?
  • Why do you need to slow down the FOR loop if you only see the final data after the graph?
  • Why can't you come up with a better file name than "Untitled"?
  • The cosine of 720 is 1.000, not 0.999848, so your math is incorrect
  • Your angles are equally spaced, so all you need is a waveform graph.

 

See if this can give you some ideas.

 

altenbach_0-1705885577008.png

 

0 Kudos
Message 4 of 4
(511 Views)