Tuning freqmod


When

If you have stepper motors and a stepper motor controller that requires phase stepping, then freqmod.o is a solution. Phase stepping requires the computer to output the motor phase signals directly, the stepper driver is just an amplifier.

This procedure version 1.0 John Sheahan 11 September 2001, Developed with linux kernel2.2.18 / rtlinux-rtl3.0-6 / :emc-2.07. Setup of linux/emc is covered elsewhere and must be done first

Setup

The assumption is that your stepper motors are running on the bench. Put a marker on the shaft so that rotation is clear. I used wood scraps. Connect the stepper controller to the chosen parallel port, wire up the steppers. Don't power up the steppers yet.

As I'm a shell dinosaur I'll describe things that way. Adjust suitably for GUI operation.

to test the base setup:

      # get to the relevant directory
      cd /usr/local/emc
      # become root
      su - 
      # run the simulation. Note, the motors will not turn and are
            not needed, yet.
      ./sim.run
      # hit F1 to get from ESTOP state to ESTOP RESET
      # hit F2 to get to ON state
      # try the arrow keys and pageup pagedown to jog the
               motors
      # hit F4 to get to AUTO state
      # click file -> open
      # click cds.ngc
      # click open
      # view ->  backplot
      # click run
  
wait and watch the windows scroll.

This was intended to test the base install and introduce a little functionality. Next step is to make the software run with YOUR motors.

Choose a name for your setup. I'll use table as I'm building a routing table. Substitute _yourname_ for table in the rest.

# copy the sim files as we now know they work :)
# copy the runfile. If you do this with a gui, ensure the file is executable after

      cp -p sim.run table.run
      # copy the variables
      cp sim.var table.var
      # copy the tool file
      cp sim.tbl table.tbl
      # copy the nml file
      cp sim.nml table.nml
   
Now we need to change the references in the new files
With your favorite editor, in table.run, change the line
      INIFILE=sim.ini
        to read
      INIFILE=table.ini
  
The nml and tbl files should be ok for now. The real work comes in the ini file.

tuning the .ini file with your favorite editor

initial requirements

You need to have this information to hand:
what units you want to operate the machine in, inches or mm
the leadscrew pitch [each axis]
the number of steps per revolution [each axis]
the maximum velocity each axis can run at.
this is getting harder, might be limited by the computer, the steppers, stepper driver, or fear.
the maximum acceleration for each axis
you might calculate this or just experiment
Now edit table.ini Adjust the sections as described here. I'm mostly only going to discuss what needs to be changed.

[EMC]

[DISPLAY]

is ok as is.

[TASK]

is ok as is.

[RS274NGC]

[EMCMOT]

[TRAJ]

[AXIS_0]

note, all the axis have the same format, described once.

[EMCIO]

[EMCSERVER]

now test it

now all that typing is done, lets make the motors spin! Here is a suggested test procedure.

power up the stepper drivers (preferably with the steppers not mechanically connected to anything, as that may make expensive noises

checks, please everyone add more. calibration check now switch to auto mode (F4 or the mouse) and file->open the skeleton file. click run and watch it all whir. then its probably time to connect up more mechanics and test some more.
John Sheahan
Last modified: Tue Sep 11 19:56:07 EST 2001