84: squash commits
84: rebased to master at 71ab22c6e Sun Feb 4 16:28:19 2018 +0100
Docs: docs/src/motion/external-offsets.txt
Hal pins (input interface is similar to wheel jogging pins):
axis.L.eoffset-enable Input (bit): enable
axis.L.eoffset-scale Input (float): scale factor
axis.L.eoffset-counts Input (s32): request is accumulated counts*scale
axis.L.eoffset-clear Input (bit): clear request
axis.L.eoffset Output (float): current external offset
axis.L.eoffset-request Output (float): requested external offset (debug pin)
motion.eoffset-active Output (bit): non-zero external offsets applied
motion.eoffset-limited Output (bit): limited by soft limit
Hal components:
eoffsetperangle.comp
eoffset_pid.comp
Sim configs (configs/sim/axis/external_offsets/)
eoffset_demo.ini (XYZ ext offsets)
jwp_z.ini (jog-while-pause Z)
dynamic_offsets.ini (dynamic Z)
opa.ini (X ext offset per C angle)
eoffsetpid/hpid.ini (torch height control using eoffsetpid)
Notes:
1) see docs/src/motion/external_offsets.txt for usage restrictions
man updated: motion.9
new manpage: offsetperangle.9 (auto by halcompile)
new manpage: eoffset_pid.9 (auto by halcompile)
2) In canon.hh, option:
#undef STOPONSYNCHIFEXTERNAL_OFFSETS
#define STOPONSYNCHIFEXTERNAL_OFFSETS
forces a stop on any synch() if non-zero external
offsets.
3) In command.c, using ALTEOFFSETBEHAVIOR for cont/incr jogs
Squash notes:
a) eliminate synch() restrictions
Prior synch() restrictions are eliminated by changing the
way that external offsets are removed from the current position
information used by the interpreter.
Stopping on synch() with external offset applied may
be enabled at compile-time using an option defined
in nml_intf/canon.cc:
#define STOPONSYNCHIFEXTERNAL_OFFSETS
This option will be removed in the future.
b) HALFILE = LIB:hpid.hal
In order to support commonality in configurations using
the eoffset_pid component for height control, users are
encouraged to always use the provided library file:
[HAL]HALFILE=LIB:hpid.hal.
This file:
1) executes the loadrt and addf commands for a Z axis
eoffset_pid component (zo)
2) use inifile settings for important items:
[AXISZ]HPIDPGAIN
[AXISZ]HPIDIGAIN
[AXISZ]HPIDDGAIN
[AXISZ]HPIDK
[AXISZ]HPIDFNUM
[AXISZ]HPIDSIMTOVOLTSGAIN
[AXISZ]HPIDSIMTOVOLTSOFFSET
[AXISZ]HPIDSIMTORCHGAIN
[AXISZ]HPIDSIMTORCHARCWIDTH_WAIT
3) Creates signals and makes mandatory connections to
pins of motion.,axis.z.,and halui.*
4) Creates signals that must be connected by additional
user halfiles (E:arc-ok,E:feedback)
5) Creates signals for optional usage in user halfiles
6) Creates signals for debugging
c) hpid.hal:dont use spindle cmds
Frees motion.spindle-on pin for user purposes
Torch-on (primary enable):
is: E:enable-in-a <= motion.digital-out-00 (M64/M65 P0)
Arc-ok-verified (secondary enable):
is: E:enable-in-b <= motion.digital-out-01 (M64/M65 P1)
Note: user can increase motion.digital-out-* pin quantity
with motmod param num_dio
d) use halui.machine.units-per-mm
e) exclusive dir for eoffset_pid
f) Add for testing:
optional (to use: uncomment one filter_type only)
#HALFILE=filter.tcl filter_type
optional (to use: uncomment):
#HALFILE=outperturb.hal
Alternately, start separately in terminal after
LinuxCNC is running:
$ halcmd source outperturb.hal
g) hpid sims updates: use HPIDSIMVOLTSPERMM
hpid: use M3S1,M5 for torch on,off
to control pin motion.spindle-on (signal E:enable-in-a)
instead of M64P0,M65P0 to control pin motion.digital-out-oo
to coordinate with estop with minimal hal wiring
h) hpid.ini use kinstype=BOTH for clarity
encourage users to understand difference between
joints (prime movers, motors etc)
axes (cartesian coordinate letters)
i) hpid*ngc change defaults to longrun first
j) bogus semicolon in sim_torch.hal
k) deadband pin
deadband pin