From: Chris M. <cv...@cv...> - 2009-04-26 21:45:13
|
Modified file emc2/src/emc/usr_intf/pncconf/pncconf.py Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/usr_intf/pncconf/pncconf.py?rev=1.21> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/usr_intf/pncconf/pncconf.py.diff?r1=1.20;r2=1.21> Branch: TRUNK Log: revision 1.21 date: 2009/04/26 21:44:28; author: cmorley; state: Exp; lines: +120 -45 work done on mesa stepper config. steplength etc is hard coded at the momment. scale is set by output scale at the moment. Some work done on parport test panel. --- pncconf.py 2009/04/26 05:26:52 1.20 +++ pncconf.py 2009/04/26 21:44:28 1.21 @@ -759,6 +759,8 @@ def write_one_axis(self, file, num, letter, type, all_homes): order = "1203" def get(s): return self[letter + s] + pwmgen = self.pwmgen_sig(letter) + stepgen = self.stepgen_sig(letter) print >>file print >>file, "#********************" print >>file, "# Axis %s" % letter.upper() @@ -773,22 +775,28 @@ print >>file, "COMP_FILE_TYPE = %s" % get("comptype") if self[letter + "usebacklash"]: print >>file, "BACKLASH = %s" % get("backlash") - #print >>file, "STEPGEN_MAXACCEL = %s" % (1.25 * get("maxacc")) print >>file, "FERROR = %s"% get("maxferror") print >>file, "MIN_FERROR = %s" % get("minferror") - print >>file, "P = %s" % get("P") - print >>file, "I = %s" % get("I") - print >>file, "D = %s" % get("D") - print >>file, "FF0 = %s" % get("FF0") - print >>file, "FF1 = %s" % get("FF1") - print >>file, "FF2 = %s" % get("FF2") - print >>file, "BIAS = 0" - print >>file, "DEADBAND = 0" - print >>file, "SCALE = 1" - print >>file, "OUTPUT_SCALE = %s" % get("outputscale") - print >>file, "OUTPUT_OFFSET = %s" % get("outputoffset") - print >>file, "MAX_OUTPUT = %s" % get("maxoutput") - print >>file, "INPUT_SCALE = %s" % get("scale") + if stepgen == "false": + print >>file, "P = %s" % get("P") + print >>file, "I = %s" % get("I") + print >>file, "D = %s" % get("D") + print >>file, "FF0 = %s" % get("FF0") + print >>file, "FF1 = %s" % get("FF1") + print >>file, "FF2 = %s" % get("FF2") + print >>file, "BIAS = 0" + print >>file, "DEADBAND = 0" + print >>file, "OUTPUT_SCALE = %s" % get("outputscale") + print >>file, "OUTPUT_OFFSET = %s" % get("outputoffset") + print >>file, "MAX_OUTPUT = %s" % get("maxoutput") + print >>file, "INPUT_SCALE = %s" % get("scale") + else: + print >>file, "# these are in nanoseconds" + print >>file, "DIRSETUP = 200" + print >>file, "DIRHOLD = 200" + print >>file, "STEPLEN = 40000" + print >>file, "STEPSPACE = 40000" + print >>file, "SCALE = %s"% get("outputscale") # emc2 doesn't like having home right on an end of travel, # so extend the travel limit by up to .01in or .1mm minlim = get("minlim") @@ -877,10 +885,6 @@ print >>file, "#**************" print >>file, "# Axis %s" % let.upper() print >>file, "#**************" - - if not "m5i20" in pwmgen =="false": - pinname = self.make_pinname(pwmgen) - print >>file, "net %senable axis.%d.amp-enable-out => "% (let,axnum) +pinname+".enable" if stepgen == "false": print >>file, " setp pid.%d.Pgain [AXIS_%d]P" % (num, axnum) @@ -916,29 +920,30 @@ print >>file print >>file, " setp "+pinname+".output-type 1" print >>file, " setp "+pinname+".scale 1.0" - print >>file, "net %senable axis.%d.amp-enable-out => pid.%d.enable" % (let, axnum, num) + print >>file, "net %senable axis.%d.amp-enable-out => "% (let,axnum) +pinname+".enable" + print >>file, "net %senable pid.%d.enable" % (let, axnum, num) print >>file, "net %spos-cmd axis.%d.motor-pos-cmd => pid.%d.command" % (let, axnum , axnum) print >>file, "net %soutput pid.%d.output => "% (let, axnum) +pinname+ ".value" if not stepgen == "false": - print >>file, " setp stepgen.%d.position-scale [AXIS_%d]SCALE" % (num, axnum) - print >>file, " setp stepgen.%d.steplen 1" % num - if self.doublestep(): - print >>file, " setp stepgen.%d.stepspace 0" % num - else: - print >>file, " setp stepgen.%d.stepspace 1" % num - print >>file, " setp stepgen.%d.dirhold %d" % (num, self.dirhold + lat) - print >>file, " setp stepgen.%d.dirsetup %d" % (num, self.dirsetup + lat) - print >>file, " setp stepgen.%d.maxaccel [AXIS_%d]STEPGEN_MAXACCEL" % (num, axnum) - print >>file, "net %spos-cmd axis.%d.motor-pos-cmd => stepgen.%d.position-cmd" % (let, axnum, num) - print >>file, "net %spos-fb stepgen.%d.position-fb => axis.%d.motor-pos-fb" % (let, num, axnum) - print >>file, "net %sstep <= stepgen.%d.step" % (let, num) - print >>file, "net %sdir <= stepgen.%d.dir" % (let, num) - print >>file, "net %senable axis.%d.amp-enable-out => stepgen.%d.enable" % (let, axnum, num) - if homesig: + pinname = self.make_pinname(stepgen) + print >>file, "# Step Gen signals/setup" + print >>file + print >>file, "setp " + pinname + ".dirsetup [AXIS_%d]DIRSETUP"% axnum + print >>file, "setp " + pinname + ".dirhold [AXIS_%d]DIRHOLD"% axnum + print >>file, "setp " + pinname + ".steplen [AXIS_%d]STEPLEN"% axnum + print >>file, "setp " + pinname + ".stepspace [AXIS_%d]STEPSPACE"% axnum Modified file emc2/src/emc/usr_intf/pncconf/pncconf.glade Full file: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/usr_intf/pncconf/pncconf.glade?rev=1.15> Difference: <http://cvs.linuxcnc.org/cvs/emc2/src/emc/usr_intf/pncconf/pncconf.glade.diff?r1=1.14;r2=1.15> Branch: TRUNK Log: revision 1.15 date: 2009/04/26 21:44:28; author: cmorley; state: Exp; lines: +7708 -7479 work done on mesa stepper config. steplength etc is hard coded at the momment. scale is set by output scale at the moment. Some work done on parport test panel. --- pncconf.glade 2009/04/26 05:26:52 1.14 +++ pncconf.glade 2009/04/26 21:44:28 1.15 @@ -42,49 +42,49 @@ <property name="n_rows">6</property> <property name="n_columns">2</property> <child> - <widget class="GtkRadioButton" id="createconfig"> + <widget class="GtkImage" id="image1"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Create a new configuration</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <property name="active">True</property> - <property name="draw_indicator">True</property> + <property name="xpad">12</property> + <property name="ypad">12</property> + <property name="stock">gtk-info</property> </widget> <packing> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> <property name="x_options">GTK_FILL</property> - <property name="y_options"></property> + <property name="y_options">GTK_FILL</property> </packing> </child> <child> - <widget class="GtkRadioButton" id="modifyconfig"> + <widget class="GtkCheckButton" id="createshortcut"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Modify a configuration already created with this program</property> + <property name="label" translatable="yes">Create a desktop launcher to start EMC with this configuration.</property> <property name="use_underline">True</property> <property name="response_id">0</property> <property name="draw_indicator">True</property> - <property name="group">createconfig</property> </widget> <packing> <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkLabel" id="label171"> + <widget class="GtkCheckButton" id="createsymlink"> <property name="visible">True</property> - <property name="xalign">0</property> - <property name="label" translatable="yes">Do you wish to:</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Create a desktop shortcut (symlink) to configuration files.</property> + <property name="use_underline">True</property> + <property name="response_id">0</property> + <property name="draw_indicator">True</property> </widget> <packing> <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> @@ -107,51 +107,51 @@ </packing> </child> <child> - <widget class="GtkCheckButton" id="createsymlink"> + <widget class="GtkLabel" id="label171"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Create a desktop shortcut (symlink) to configuration files.</property> - <property name="use_underline">True</property> - <property name="response_id">0</property> - <property name="draw_indicator">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Do you wish to:</property> </widget> <packing> <property name="right_attach">2</property> - <property name="top_attach">4</property> - <property name="bottom_attach">5</property> <property name="x_options">GTK_FILL</property> <property name="y_options"></property> </packing> </child> <child> - <widget class="GtkCheckButton" id="createshortcut"> + <widget class="GtkRadioButton" id="modifyconfig"> |