Encoder wiring - Mesa 7i33
Debug file information:
hm2-servo.hal:205: Pin 'hm2_5i20.0.pwmgen.03.enable' does not exist
Please Log in or Create an account to join the conversation.
- Fordperf393W
- Offline
- New Member
- Posts: 14
- Thank you received: 0
[AXIS_3]
TYPE = LINEAR
MAX_VELOCITY = 1.0
MAX_ACCELERATION = 4.0
BACKLASH = 0.000
FERROR = 0.010
MIN_FERROR = 0.002
INPUT_SCALE = 81920
OUTPUT_SCALE = -1.000
OUTPUT_OFFSET = 0.0
MAX_OUTPUT = 1.0
MIN_LIMIT = -3.0
MAX_LIMIT = 3.0
HOME = 0.0
HOME_OFFSET = -2.9
HOME_SEARCH_VEL = -0.50
HOME_LATCH_VEL = 0.10
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
# PID tuning params
DEADBAND = 0.000015
P = 100.0
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 1.000
FF2 = 0.0
BIAS = 0.000
and this to the .hal
# ################
# W [3] Axis
# ################
# axis enable chain
newsig emcmot.03.enable bit
sets emcmot.03.enable FALSE
net emcmot.03.enable => pid.3.enable
net emcmot.03.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.03.enable
net emcmot.03.enable <= axis.3.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.03.scale [AXIS_3]INPUT_SCALE
net motor.03.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.03.position => pid.3.feedback
net motor.03.pos-fb => axis.3.motor-pos-fb #push copy back to Axis GUI
# set PID loop gains from inifile
setp pid.3.Pgain [AXIS_3]P
setp pid.3.Igain [AXIS_3]I
setp pid.3.Dgain [AXIS_3]D
setp pid.3.bias [AXIS_3]BIAS
setp pid.3.FF0 [AXIS_3]FF0
setp pid.3.FF1 [AXIS_3]FF1
setp pid.3.FF2 [AXIS_3]FF2
setp pid.3.deadband [AXIS_3]DEADBAND
setp pid.3.maxoutput [AXIS_3]MAX_OUTPUT
# position command signals
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.03.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.03.scale [AXIS_3]OUTPUT_SCALE
i assume the pwmgen is for servos, not sure if its necessary to add, but like i said, i copied the others and changed what i figured needed to be changed.
Please Log in or Create an account to join the conversation.
CONFIG="firmware=SVST8_4.BIT num_encoders=4 num_pwmgens=4 num_stepgens=0"
Please Log in or Create an account to join the conversation.
- Fordperf393W
- Offline
- New Member
- Posts: 14
- Thank you received: 0
also, the readout is way off from actual distance traveled.
Please Log in or Create an account to join the conversation.
num_pwmgens=4 they show up for me in halmeter, in emc 2.4.3, 2.4.6 and 2.5
Are you sure you are editing the correct.ini file?
Please Log in or Create an account to join the conversation.
- Fordperf393W
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Please Log in or Create an account to join the conversation.
the axis shows up for me in halmeter. i just cannot get it to display the readout of that axis. is it even possible?
Yes, EMC2 supports up to 9 axes.
You don't seem to have the link from the motion controller to the PID input.
net somethingorother axis.3.motor-pos-cmd => pid.3.command
You also need to set up the INI file for 4 axes (and, if you really want it to be a W axis, you need 9 axes, W is last in the list)
[TRAJ]
AXES = 9
COORDINATES = XYZW
linuxcnc.org/docs/html/config_emc2hal.html
linuxcnc.org/docs/html/man/man9/pid.9.html
linuxcnc.org/docs/html/config_ini_config...b:%5BTRAJ%5D-section
Please Log in or Create an account to join the conversation.
- Fordperf393W
- Offline
- New Member
- Posts: 14
- Thank you received: 0
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Fordperf393W
- Offline
- New Member
- Posts: 14
- Thank you received: 0
is it possible to zero out an axis at its current position?
Please Log in or Create an account to join the conversation.