On Wed, 26 Feb 2020, Ed W wrote:
Date: Wed, 26 Feb 2020 17:58:09 +0000 From: Ed W <[email protected]> Reply-To: "Enhanced Machine Controller (EMC)" <[email protected]> To: "Enhanced Machine Controller (EMC)" <[email protected]> Subject: [Emc-users] Making progressHi, I've made good progress converting my little OmioCNC X6 from Mach3 to LinuxCNC. I think I owe a writeup at some point, but I still have a few glitches before I'm ready to do that.First thing which I'm worrying about is that having run pncconf, it generates an output for my open loop steppers which involves a PID type setup, eg here is my X axis from the ini[AXIS_X] MAX_VELOCITY = 100.0 MAX_ACCELERATION = 750.0 MIN_LIMIT = -0.01 MAX_LIMIT = 355.0 [JOINT_0] TYPE = LINEAR HOME = 0.0 FERROR = 1.0 MIN_FERROR = 0.01 MAX_VELOCITY = 100.0 MAX_ACCELERATION = 750.0 # The values below should be 25% larger than MAX_VELOCITY and MAX_ACCELERATION # If using BACKLASH compensation STEPGEN_MAXACCEL should be 100% larger. STEPGEN_MAXVEL = 125.00 STEPGEN_MAXACCEL = 937.50 P = 1000.0 I = 0.0 D = 0.0 FF0 = 0.0 FF1 = 1.0 FF2 = 0.0 BIAS = 0.0 DEADBAND = 0.0 MAX_OUTPUT = 0.0 # these are in nanoseconds DIRSETUP = 10000 DIRHOLD = 10000 STEPLEN = 5000 STEPSPACE = 5000 STEP_SCALE = 320.0 MIN_LIMIT = -0.01 MAX_LIMIT = 355.0 HOME_OFFSET = -5.000000 HOME_SEARCH_VEL = -33.333333 HOME_LATCH_VEL = 0.500000 HOME_FINAL_VEL = 33.333333 HOME_USE_INDEX = NO HOME_IGNORE_LIMITS = YES HOME_SEQUENCE = 1 The corresponding .hal (again by pncconf) is as follows: #******************* # AXIS X JOINT 0 #******************* setp pid.x.Pgain [JOINT_0]P setp pid.x.Igain [JOINT_0]I setp pid.x.Dgain [JOINT_0]D setp pid.x.bias [JOINT_0]BIAS setp pid.x.FF0 [JOINT_0]FF0 setp pid.x.FF1 [JOINT_0]FF1 setp pid.x.FF2 [JOINT_0]FF2 setp pid.x.deadband [JOINT_0]DEADBAND setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT setp pid.x.error-previous-target true setp pid.x.maxerror .0005 net x-index-enable <=> pid.x.index-enable net x-enable => pid.x.enable net x-pos-cmd => pid.x.command net x-pos-fb => pid.x.feedback net x-output <= pid.x.output # Step Gen signals/setup setp hm2_5i25.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP setp hm2_5i25.0.stepgen.00.dirhold [JOINT_0]DIRHOLD setp hm2_5i25.0.stepgen.00.steplen [JOINT_0]STEPLEN setp hm2_5i25.0.stepgen.00.stepspace [JOINT_0]STEPSPACE setp hm2_5i25.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE setp hm2_5i25.0.stepgen.00.step_type 0 setp hm2_5i25.0.stepgen.00.control-type 1 setp hm2_5i25.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL setp hm2_5i25.0.stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL setp hm2_5i25.0.stepgen.00.step.invert_output true setp hm2_5i25.0.stepgen.00.direction.invert_output true # ---closedloop stepper signals--- net x-pos-cmd <= joint.0.motor-pos-cmd net x-vel-cmd <= joint.0.vel-cmd net x-output <= hm2_5i25.0.stepgen.00.velocity-cmd net x-pos-fb <= hm2_5i25.0.stepgen.00.position-fb net x-pos-fb => joint.0.motor-pos-fb net x-enable <= joint.0.amp-enable-out net x-enable => hm2_5i25.0.stepgen.00.enable # ---setup home / limit switch signals--- net min-home-x => joint.0.home-sw-in net min-home-x => joint.0.neg-lim-sw-in net x-pos-limit => joint.0.pos-lim-sw-inWhat would someone experienced recommend I do here? This is a simple openloop stepper machine, no feedback or position sensors. Just a 6i25 to a basic breakout board, going to a chinese 556 stepper driver clone and onto some small steppers on a 6040 type of machine?Is there any disadvantage (or advantage) to leaving all the PID and closed loop stuff in here?Thanks Ed W
You can use the built in position mode control loop in the driver (without PID) but you can get better performance by using PID and velocity mode, especially with regard to host servo thread jitter. This is why PNCCONF uses thsi control mode even for open loop step motor systems.
_______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
Peter Wallace
Mesa Electronics
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users
