1
General Mach Discussion / Need help to generate a sine wave
« on: December 08, 2010, 07:45:07 AM »
I am running mach 3 to control two stepper motors in the x and y planes. I have calibrated and am now trying to input a sine wave on one axis at a time.
I am not sure how to do this, would a while loop within a subroutine be the best way....?, i am having difficulty with the syntax and not really getting anywhere.
Ideally i want a loop that has variables defined so i can alter the frequency and amplitude of the wave input.
So how can i input for example
Maximum wave amplitude x sin(wave frequency x t)
so i can change these parameters and loop them.
I am a complete noob, and using mach for a university project.
Thanks in advance
Jono
I am not sure how to do this, would a while loop within a subroutine be the best way....?, i am having difficulty with the syntax and not really getting anywhere.
Ideally i want a loop that has variables defined so i can alter the frequency and amplitude of the wave input.
So how can i input for example
Maximum wave amplitude x sin(wave frequency x t)
so i can change these parameters and loop them.
I am a complete noob, and using mach for a university project.
Thanks in advance
Jono