01-20-2024 11:34 PM
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.
01-21-2024 02:45 AM
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.)
01-21-2024 04:40 PM - edited 01-21-2024 04:41 PM
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.
01-21-2024 07:07 PM
OK, you mean two cycles, not circles! Big difference!
See if this can give you some ideas.