Hello all,
With a goal of making a config with zero extraneous lines of config and/or redundant hal connections I'm trying to understand my pncconf file output and I thought by comparing to a one of the demo configs I might learn something but as it turns out there are differences that are making it confusing...
- The demo config is called 5i22big and is under the Mesa servo tab
- My config was 5 axes XYZA and a servo spindle and what I hoped would be
nothing else (to keep things simple)
... but coolant, limits, estop and toolchanger stuff has turned up as has other bits I dont understand yet
Many questions but I'll be methodical and chip away at them one by one - I'll paste one axis of info from each config where I have put the similar stuff I understand at the top of each and the stuff I dont get at the bottom
Firstly from pncconf (you can tell from the alias function replacing the '0' with 'x'):
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT
setp hm2_5i22.0.pwmgen.01.output-type 1
setp hm2_5i22.0.pwmgen.01.scale [AXIS_0]OUTPUT_SCALE
setp hm2_5i22.0.encoder.01.counter-mode 0
setp hm2_5i22.0.encoder.01.filter 1
setp hm2_5i22.0.encoder.01.index-invert 0
setp hm2_5i22.0.encoder.01.index-mask 0
setp hm2_5i22.0.encoder.01.index-mask-invert 0
setp hm2_5i22.0.encoder.01.scale [AXIS_0]ENCODER_SCALE
net x-index-enable <=> pid.x.index-enable
net xenable => pid.x.enable
net xoutput pid.x.output => hm2_5i22.0.pwmgen.01.value
net xpos-cmd axis.0.motor-pos-cmd => pid.x.command
net xenable axis.0.amp-enable-out => hm2_5i22.0.pwmgen.01.enable
net xpos-fb <= hm2_5i22.0.encoder.01.position
net xpos-fb => pid.x.feedback
net xpos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_5i22.0.encoder.01.index-enable
# ---setup home / limit switch signals---
net x-home-sw => axis.0.home-sw-in
net x-neg-limit => axis.0.neg-lim-sw-in
net x-pos-limit => axis.0.pos-lim-sw-in
Then from the demo config:
# ################
# X [0] Axis
# ################
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.output-type 1 #pwm on pin1, dir on pin2
setp hm2_[HOSTMOT2](BOARD).0.pwmgen.00.scale [AXIS_0]OUTPUT_SCALE
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [AXIS_0]INPUT_SCALE
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.enable
net emcmot.00.enable <= axis.0.amp-enable-out
net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.pos-fb => axis.0.motor-pos-fb #push copy back to Axis GUI
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => hm2_[HOSTMOT2](BOARD).0.pwmgen.00.value
Lots of it is the same - but from the encoder scale down the code unique - Is it doing the same thing ? something different ??
Also one refers to encoder.00 and the other encoder.01 - egad (?)
The links to the .ini files are working - and attached is the .ini from the pncconf file in case its helpful ...
Trying to nail this down ...
Any help appreciated
This attachment is hidden for guests. Please log in or register to see it.