Skip to content

External Offsets: Axis coordinate offset hal pins#407

Closed
islander261 wants to merge 1 commit intomasterfrom
dgarr/external_offsets
Closed

External Offsets: Axis coordinate offset hal pins#407
islander261 wants to merge 1 commit intomasterfrom
dgarr/external_offsets

Conversation

@islander261
Copy link

84: squash commits
84: rebased to master at 71ab22c 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:
eoffset_per_angle.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)
eoffset_pid/hpid.ini (torch height control using eoffset_pid)

Notes:

  1. see docs/src/motion/external_offsets.txt for usage restrictions
    man updated: motion.9
    new manpage: offset_per_angle.9 (auto by halcompile)
    new manpage: eoffset_pid.9 (auto by halcompile)

  2. In canon.hh, option:
    #undef STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
    #define STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
    forces a stop on any synch() if non-zero external
    offsets.

  3. In command.c, using ALT_EOFFSET_BEHAVIOR 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 STOP_ON_SYNCH_IF_EXTERNAL_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:
     [AXIS_Z]HPID_PGAIN
     [AXIS_Z]HPID_IGAIN
     [AXIS_Z]HPID_DGAIN
     [AXIS_Z]HPID_K
     [AXIS_Z]HPID_FNUM
     [AXIS_Z]HPID_SIM_TOVOLTS_GAIN
     [AXIS_Z]HPID_SIM_TOVOLTS_OFFSET
     [AXIS_Z]HPID_SIM_TORCH_GAIN
     [AXIS_Z]HPID_SIM_TORCH_ARCWIDTH_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 HPID_SIM_VOLTS_PER_MM
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

84: squash commits
84: rebased to master at 71ab22c 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:
    eoffset_per_angle.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)
    eoffset_pid/hpid.ini (torch height control using eoffset_pid)

Notes:
1) see docs/src/motion/external_offsets.txt for usage restrictions
   man updated: motion.9
   new manpage: offset_per_angle.9 (auto by halcompile)
   new manpage: eoffset_pid.9      (auto by halcompile)
2) In canon.hh, option:
     #undef  STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
     #define STOP_ON_SYNCH_IF_EXTERNAL_OFFSETS
   forces a stop on any synch() if non-zero external
   offsets.

3) In command.c, using ALT_EOFFSET_BEHAVIOR 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 STOP_ON_SYNCH_IF_EXTERNAL_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:
         [AXIS_Z]HPID_PGAIN
         [AXIS_Z]HPID_IGAIN
         [AXIS_Z]HPID_DGAIN
         [AXIS_Z]HPID_K
         [AXIS_Z]HPID_FNUM
         [AXIS_Z]HPID_SIM_TOVOLTS_GAIN
         [AXIS_Z]HPID_SIM_TOVOLTS_OFFSET
         [AXIS_Z]HPID_SIM_TORCH_GAIN
         [AXIS_Z]HPID_SIM_TORCH_ARCWIDTH_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 HPID_SIM_VOLTS_PER_MM
   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
@islander261 islander261 closed this Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants