Smart Serial not working in pathpilot

More
14 Apr 2016 14:36 #73304 by KevinCT
Ok so I have started again, again.

I have gone about it a bit more gently than the last few times, I have made some small changes to the HAL just taking out things that made PP fail while starting.

PWMGEN
gpio.005
gpio.001

I have replaced them with code generated by pncconf on the LinexCNC 2.7 installation

PP loads but won't come out of e-stop, i am assuming the sserial is working now but i really don't know.

Could you hep me with correcting the e-stop code?

Thanks

Current HAL no errors on start just won't come out of estop even with 24v on input0
########################################################################
#
# Tormach PCNC mill HAL config for 5i25 I/O
#

loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES num_dio=64 num_aio=64
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=0 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=00xxxx" 
loadrt estop_latch
loadrt toggle count=1
loadrt not names=prog-not-idle,axis3-not-homing,x-homing-not2
loadrt gearchange count=1
loadrt xor2 names=probe-active-hi-lo
loadrt debounce cfg=5
loadrt pid num_chan=4
loadrt tormachspindle names=tormachspindle
loadrt and2 names=enable-limit-z,probe-enable-input,door-limit-in,y-axis-lim-sw-and2
loadrt lut5 names=door-limit-x-lut,door-limit-y-lut

####################################################################
# Z_BOT ATC HAL COMPONENT

loadusr -Wn zbotatc python/hal_zbotatc.py -n zbotatc

# END ATC HAL COMPONENT
###################################################################


####################################################################
# Z_BOT SMART COOL HAL COMPONENT  - DISABLED FOR NOW

# loadusr -Wn zbotschnozz python/hal_zbotschnozz.py -n zbotschnozz

# END SMART COOL HAL COMPONENT
#####################################################################




loadusr -W tormachheightgauge
loadusr -W usbio

########################################################################
# servo thread
addf hm2_5i25.0.read servo-thread
addf hm2_5i25.0.write servo-thread
addf hm2_5i25.0.pet_watchdog servo-thread

addf motion-command-handler servo-thread
addf motion-controller servo-thread

addf estop-latch.0 servo-thread

addf toggle.0           servo-thread
addf prog-not-idle      servo-thread
addf axis3-not-homing   servo-thread
addf x-homing-not2      servo-thread
addf gearchange.0       servo-thread
addf probe-active-hi-lo servo-thread

addf debounce.0 servo-thread

addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread

addf tormachspindle servo-thread

addf enable-limit-z servo-thread
addf probe-enable-input servo-thread
addf door-limit-in      servo-thread
addf y-axis-lim-sw-and2 servo-thread

addf door-limit-x-lut servo-thread
addf door-limit-y-lut servo-thread

########################################################################
# noise debounce for home switches and estop
setp debounce.0.delay 1


########################################################################
# 5i25 watchdog timeout
# 10 milliseconds (~10 times the servo loop period)
setp hm2_5i25.0.watchdog.timeout_ns 10000000


########################################################################
# 5i25
# Configuration pin-out: 
#
#                    IO Connections for P3
#    Mill Function   Pin#    I/O     Pri. func    Sec. func    Chan      Pin func        Pin Dir
#
#    Spindle Speed    1        0     IOPort       StepGen       4        Step/Table1     (Out)
#    Coolant         14        1     IOPort       None                                   (Out)
#    X Direction      2        2     IOPort       StepGen       0        Dir/Table2      (Out)
#    Estop Reset     15        3     IOPort       None                                   (In)
#    X Step           3        4     IOPort       StepGen       0        Step/Table1     (Out)
#    Spindle Dir     16        5     IOPort       None                                   (Out)
#    Y Direction      4        6     IOPort       StepGen       1        Dir/Table2      (Out)
#    Charge Pump     17        7     IOPort       PWM           0        PWM             (Out)
#    Y Step           5        8     IOPort       StepGen       1        Step/Table1     (Out)
#    Z Direction      6        9     IOPort       StepGen       2        Dir/Table2      (Out)
#    Z Step           7       10     IOPort       StepGen       2        Step/Table1     (Out)
#    A Direction      8       11     IOPort       StepGen       3        Dir/Table2      (Out)
#    A Step           9       12     IOPort       StepGen       3        Step/Table1     (Out)
#    X Limit         10       13     IOPort       None                                   (In)
#    Y Limit         11       14     IOPort       None                                   (In)
#    Z Limit         12       15     IOPort       None                                   (In)
#    Probe In        13       16     IOPort       None                                   (In)
#

########################################################################
# Spindle speed control
#
# stepgen outputs the frequency it is told by tormachspindle comp
#

# type 1 velocity control mode
setp hm2_5i25.0.stepgen.04.control-type 1

# step/dir
# type 2 quadrature output for 50% duty cycle
setp hm2_5i25.0.stepgen.04.step_type 2

# no scaling 1:1
setp hm2_5i25.0.stepgen.04.position-scale 1.0

# handle spindle at speed via separate component
setp hm2_5i25.0.stepgen.04.maxaccel 0

# stepspace in nanoseconds
setp hm2_5i25.0.stepgen.04.stepspace 0

# steplen in nanoseconds (10 microseconds)
setp hm2_5i25.0.stepgen.04.steplen 10000

# assume standard spindle until UI sets it
setp tormachspindle.spindle-type 0

# hispeed spindle min/max
setp tormachspindle.hispeed-min 1000
setp tormachspindle.hispeed-max 24000

# allow UI to access min/max for high speed spindle
# do not net these until the UI code is changed to set them explicitly
# or the setp command above will not stick and they will be set to 0
net spindle-hispeed-min      tormachspindle.hispeed-min
net spindle-hispeed-max      tormachspindle.hispeed-max

# these let the UI read the min/max maintained by the comp based on spindle type
net spindle-min-speed        tormachspindle.min-speed
net spindle-max-speed        tormachspindle.max-speed

# the UI sets the spindle type
net spindle-type             tormachspindle.spindle-type

# assume high range until UI sets it
setp tormachspindle.belt-position 1
net spindle-range            tormachspindle.belt-position
net spindle-range-alarm      tormachspindle.speed-alarm

setp tormachspindle.lowbelt-min-rpm  [SPINDLE]LO_RANGE_MIN
setp tormachspindle.lowbelt-max-rpm  [SPINDLE]LO_RANGE_MAX

setp tormachspindle.highbelt-min-rpm [SPINDLE]HI_RANGE_MIN
setp tormachspindle.highbelt-max-rpm [SPINDLE]HI_RANGE_MAX

# frequencies sent to stepgen to achieve low belt speeds
#   500 Hz ->   6 Hz at VFD ->   175 RPM at spindle (770)
# 10900 Hz -> 120 Hz at VFD ->  3250 RPM at spindle (770)
#   500 Hz ->   6 Hz at VFD ->   100 RPM at spindle (1100-2-3)
# 10900 Hz -> 120 Hz at VFD ->  2000 RPM at spindle (1100-2-3)
#  1600 Hz ->                    300 RPM at spindle (1100-1)
# 10900 Hz ->                   1750 RPM at spindle (1100-1)
setp tormachspindle.lowbelt-min-mcb-freq [SPINDLE]MIN_MCB_FREQUENCY
setp tormachspindle.lowbelt-max-mcb-freq [SPINDLE]MAX_MCB_FREQUENCY

# frequencies sent to stepgen to achieve high belt speeds
#   500 Hz ->   6 Hz at VFD ->   525 RPM at spindle (770)
# 10900 Hz -> 120 Hz at VFD -> 10200 RPM at spindle (770)
#   500 Hz ->   6 Hz at VFD ->   250 RPM at spindle (1100-2-3)
# 10900 Hz -> 120 Hz at VFD ->  5140 RPM at spindle (1100-2-3)
#  1600 Hz ->                    800 RPM at spindle (1100-1)
# 10900 Hz ->                   4500 RPM at spindle (1100-1)
setp tormachspindle.highbelt-min-mcb-freq [SPINDLE]MIN_MCB_FREQUENCY
setp tormachspindle.highbelt-max-mcb-freq [SPINDLE]MAX_MCB_FREQUENCY

# speed-out is displayed by UI when program running
net spindle-speed-fb-rpm     tormachspindle.speed-out

# connect motion speed-out to input of spindle comp
net spindle-speed-raw        motion.spindle-speed-out    tormachspindle.speed-in

# connect output of spindle comp to stepgen
net spindle-speed            tormachspindle.mcb-freq-out hm2_5i25.0.stepgen.04.velocity-cmd

# spindle at speed parameters for tormachspindle component
setp tormachspindle.startup-delay     [SPINDLE]STARTUP_DELAY

# time to reach max speed from stopped
setp tormachspindle.seconds-to-max-rpm [SPINDLE]SECONDS_TO_MAX_RPM

# connect spindle comp at-speed output to motion
net spindle-at-speed  tormachspindle.at-speed  motion.spindle-at-speed

# connect motion spindle enable to stepgen enable and spindle comp
net spindle-on        motion.spindle-on        hm2_5i25.0.stepgen.04.enable    tormachspindle.spindle-on

# spindle direction
# P3 pin 16 gpio 005
#setp hm2_5i25.0.gpio.005.is_output 1
net spindle-cw hm2_5i25.0.7i76.0.0.output-01
# UI access to stop spindle while in feedhold / INTERP_PAUSED
net spindle-disable tormachspindle.disable

# max RPM when enclosure door open
net enc-door-open-max-rpm tormachspindle.enc-door-open-max-rpm

########################################################################
# Coolant
# P3 pin 14 gpio 001

#setp hm2_5i25.0.gpio.001.is_output        1
#setp hm2_5i25.0.gpio.001.is_opendrain     0
#net coolant-flood    hm2_5i25.0.gpio.001.out
net coolant-flood hm2_5i25.0.7i76.0.0.output-04
net coolant-flood-io iocontrol.0.coolant-flood


########################################################################
# Charge pump
# pin set by 5i25 configuration
# P3 pin 17 gpio 007
# dc = (value/scale)

#setp hm2_5i25.0.pwmgen.00.output-type 1
#setp hm2_5i25.0.pwmgen.pwm_frequency 500
#setp hm2_5i25.0.pwmgen.00.scale 100
#setp hm2_5i25.0.pwmgen.00.value 5


########################################################################
# E stop
# P3 pin 15 gpio 003

# estop noise debounce
# use this line with a machine attached
net machine-ok-raw <=  hm2_5i25.0.7i76.0.0.input-00 => debounce.0.3.in

# use the setp line below without a machine attached
# this isn't useful unless a properly flashed 5i25 is present
# no machine attached
#setp debounce.0.3.in 1

net machine-ok debounce.0.3.out => estop-latch.0.ok-in


net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net estop-out <= iocontrol.0.user-enable-out


########################################################################
# Probe
# P3 pin 13 gpio 016
setp hm2_5i25.0.gpio.016.is_output 0
net probe-in        hm2_5i25.0.gpio.016.in debounce.0.4.in

net probe-active-high probe-active-hi-lo.in0
net probe-debounced   debounce.0.4.out       probe-active-hi-lo.in1

# connect 4th axis home input directly to debounced accessory input
net probe-debounced   axis.3.home-sw-in

# probe active hi-low output signal to AND input with probe-enable signal
net probe-hi-lo       probe-active-hi-lo.out probe-enable-input.in1

# do this to only disable the probe input during 4th axis homing
net ax3-is-homing     axis.3.homing          axis3-not-homing.in
net ax3-not-homing    axis3-not-homing.out   probe-enable-input.in0

net probe-input       probe-enable-input.out motion.probe-input


########################################################################
# X axis
# step/dir
setp hm2_5i25.0.stepgen.00.step_type 0
# velocity control
setp hm2_5i25.0.stepgen.00.control-type 1

# scaling for position feedback, position command, and velocity command, in steps per length unit.
# converts from counts to position units. position = counts / position_scale
setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]SCALE

# stepper driver timing parameters
setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP

setp hm2_5i25.0.stepgen.00.maxvel [AXIS_0]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.00.maxaccel [AXIS_0]STEPGEN_MAXACCEL

# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE

net emcmot.00.enable <= axis.0.amp-enable-out
net emcmot.00.enable => hm2_5i25.0.stepgen.00.enable pid.0.enable

# position command and feedback
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net emcmot.00.vel-cmd axis.0.joint-vel-cmd => pid.0.command-deriv
net motor.00.pos-fb <= hm2_5i25.0.stepgen.00.position-fb axis.0.motor-pos-fb pid.0.feedback
net motor.00.command pid.0.output hm2_5i25.0.stepgen.00.velocity-cmd
setp pid.0.error-previous-target true

# PID parameters
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 pid.0.maxerror [AXIS_0]MAX_ERROR

# P3 pin 3 gpio 004
# X step
setp hm2_5i25.0.gpio.004.invert_output 1

########################################################################
# Y axis
# step/dir
setp hm2_5i25.0.stepgen.01.step_type 0
# velocity control
setp hm2_5i25.0.stepgen.01.control-type 1

# scaling for position feedback, position command, and velocity command, in steps per length unit.
# converts from counts to position units. position = counts / position_scale
setp hm2_5i25.0.stepgen.01.position-scale [AXIS_1]SCALE

# stepper driver timing parameters
setp hm2_5i25.0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP

setp hm2_5i25.0.stepgen.01.maxvel [AXIS_1]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.01.maxaccel [AXIS_1]STEPGEN_MAXACCEL

# axis enable chain
newsig emcmot.01.enable bit
sets emcmot.01.enable FALSE

net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_5i25.0.stepgen.01.enable pid.1.enable

# position command and feedback
net emcmot.01.pos-cmd axis.1.motor-pos-cmd => pid.1.command
net emcmot.01.vel-cmd axis.1.joint-vel-cmd => pid.1.command-deriv
net motor.01.pos-fb <= hm2_5i25.0.stepgen.01.position-fb axis.1.motor-pos-fb pid.1.feedback
net motor.01.command pid.1.output hm2_5i25.0.stepgen.01.velocity-cmd
setp pid.1.error-previous-target true

# PID parameters
setp pid.1.Pgain [AXIS_1]P
setp pid.1.Igain [AXIS_1]I
setp pid.1.Dgain [AXIS_1]D
setp pid.1.bias [AXIS_1]BIAS
setp pid.1.FF0 [AXIS_1]FF0
setp pid.1.FF1 [AXIS_1]FF1
setp pid.1.FF2 [AXIS_1]FF2
setp pid.1.deadband [AXIS_1]DEADBAND
setp pid.1.maxoutput [AXIS_1]MAX_OUTPUT
setp pid.1.maxerror [AXIS_1]MAX_ERROR

# P3 pin 5 gpio 008
# Y step
setp hm2_5i25.0.gpio.008.invert_output 1

########################################################################
# Z axis
# step/dir
setp hm2_5i25.0.stepgen.02.step_type 0
# velocity control
setp hm2_5i25.0.stepgen.02.control-type 1

# scaling for position feedback, position command, and velocity command, in steps per length unit.
# converts from counts to position units. position = counts / position_scale
setp hm2_5i25.0.stepgen.02.position-scale [AXIS_2]SCALE

# stepper driver timing parameters
setp hm2_5i25.0.stepgen.02.steplen [AXIS_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [AXIS_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.dirhold [AXIS_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.dirsetup [AXIS_2]DIRSETUP

setp hm2_5i25.0.stepgen.02.maxvel [AXIS_2]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.02.maxaccel [AXIS_2]STEPGEN_MAXACCEL

# axis enable chain
newsig emcmot.02.enable bit
sets emcmot.02.enable FALSE

net emcmot.02.enable <= axis.2.amp-enable-out
net emcmot.02.enable => hm2_5i25.0.stepgen.02.enable pid.2.enable

# position command and feedback
net emcmot.02.pos-cmd axis.2.motor-pos-cmd => pid.2.command
net emcmot.02.vel-cmd axis.2.joint-vel-cmd => pid.2.command-deriv
net motor.02.pos-fb <= hm2_5i25.0.stepgen.02.position-fb axis.2.motor-pos-fb pid.2.feedback
net motor.02.command pid.2.output hm2_5i25.0.stepgen.02.velocity-cmd
setp pid.2.error-previous-target true

# PID parameters
setp pid.2.Pgain [AXIS_2]P
setp pid.2.Igain [AXIS_2]I
setp pid.2.Dgain [AXIS_2]D
setp pid.2.bias [AXIS_2]BIAS
setp pid.2.FF0 [AXIS_2]FF0
setp pid.2.FF1 [AXIS_2]FF1
setp pid.2.FF2 [AXIS_2]FF2
setp pid.2.deadband [AXIS_2]DEADBAND
setp pid.2.maxoutput [AXIS_2]MAX_OUTPUT
setp pid.2.maxerror [AXIS_2]MAX_ERROR

# P3 pin 7 gpio 010
# Z step
setp hm2_5i25.0.gpio.010.invert_output 1

########################################################################
# A axis
# step/dir
setp hm2_5i25.0.stepgen.03.step_type 0
# velocity control
setp hm2_5i25.0.stepgen.03.control-type 1

# scaling for position feedback, position command, and velocity command, in steps per length unit.
# converts from counts to position units. position = counts / position_scale
setp hm2_5i25.0.stepgen.03.position-scale [AXIS_3]SCALE

# stepper driver timing parameters
setp hm2_5i25.0.stepgen.03.steplen [AXIS_3]STEPLEN
setp hm2_5i25.0.stepgen.03.stepspace [AXIS_3]STEPSPACE
setp hm2_5i25.0.stepgen.03.dirhold [AXIS_3]DIRHOLD
setp hm2_5i25.0.stepgen.03.dirsetup [AXIS_3]DIRSETUP

setp hm2_5i25.0.stepgen.03.maxvel [AXIS_3]STEPGEN_MAX_VEL
setp hm2_5i25.0.stepgen.03.maxaccel [AXIS_3]STEPGEN_MAXACCEL

# axis enable chain
newsig emcmot.03.enable bit
sets emcmot.03.enable FALSE

net emcmot.03.enable <= axis.3.amp-enable-out
net emcmot.03.enable => hm2_5i25.0.stepgen.03.enable pid.3.enable

# position command and feedback
net emcmot.03.pos-cmd axis.3.motor-pos-cmd => pid.3.command
net emcmot.03.vel-cmd axis.3.joint-vel-cmd => pid.3.command-deriv
net motor.03.pos-fb <= hm2_5i25.0.stepgen.03.position-fb axis.3.motor-pos-fb pid.3.feedback
net motor.03.command pid.3.output hm2_5i25.0.stepgen.03.velocity-cmd
setp pid.3.error-previous-target true

# PID parameters
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
setp pid.3.maxerror [AXIS_3]MAX_ERROR

# P3 pin 9 gpio 012
# A step
setp hm2_5i25.0.gpio.012.invert_output 1


########################################################################
# home switches

# enclosure door support
#   door-sw-installed post-gui HAL pin changes HAL routing of signals
#     x-axis 5i25 limit input becomes door switch input
#     x-axis switch gets rewired in series with y switch
#
#     controlled by door-sw-installed
#       a lut5 comp as a bit mux switches axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in
#       between receiving x-axis switch input or y-axis switch input
#       another mux2 comp switches door-sw-in between receiving FALSE or x/door switch input
#
#  door-sw-in is an input pin to the spindle comp
#    when TRUE  the spindle comp limits RPM to a slow value, e.g. 1000 RPM
#    when FALSE the spindle comp does not limit spindle RPM
#
#  when door-sw-installed is TRUE UI homing routines must reference x and Y mutually exclusively

# must noise debounce inputs - otherwise coolant on/off can cause spurious estops
net home-limit-x-raw <= hm2_5i25.0.gpio.013.in => debounce.0.0.in
net home-limit-y-raw <= hm2_5i25.0.gpio.014.in => debounce.0.1.in
net home-limit-z-raw <= hm2_5i25.0.gpio.015.in => debounce.0.2.in
#setp debounce.0.0.in 1
#setp debounce.0.1.in 1
#setp debounce.0.2.in 1

# route limit inputs through AND gates to enable switches via UI
# also net x-axis switch input to door-limit-in.in1
net and-home-x debounce.0.0.out door-limit-x-lut.in-0   door-limit-in.in1
net and-home-y debounce.0.1.out door-limit-x-lut.in-1   door-limit-y-lut.in-0
net and-home-z debounce.0.2.out enable-limit-z.in1

# post gui connects this to the UI for disabling the limit switch inputs
net limit-switch-enable  door-limit-x-lut.in-4    door-limit-y-lut.in-3    enable-limit-z.in0

#                                      door/
# limit-sw-enable x-homing door-sw-configured - Y in - X in -- out axis.0.*-lim-sw-in -- lut5 weight

#        0            X       X                  X      X  |     0

#        1            0       0                  0      0  |     0
#        1            0       0                  0      1  |     1                        0x00020000
#        1            0       0                  1      0  |     0
#        1            0       0                  1      1  |     1                        0x00080000
#        1            1       0                  0      0  |     0
#        1            1       0                  0      1  |     1                        0x02000000
#        1            1       0                  1      0  |     0
#        1            1       0                  1      1  |     1                        0x08000000

#        1            1       1                  0      0  |     0
#        1            1       1                  0      1  |     0
#        1            1       1                  1      0  |     1                        0x40000000
#        1            1       1                  1      1  |     1                        0x80000000
#                                                                                          ----
#                                                                                         0xCA0A0000
setp door-limit-x-lut.function                                                            0xCA0A0000

# connect X and Y to axis.0.*-lim-sw-in via lut5-based mux configured as above
net x-lim-out                       door-limit-x-lut.out  axis.0.home-sw-in axis.0.neg-lim-sw-in axis.0.pos-lim-sw-in

#
# limit-sw-enable x-homing door-sw-configured - Y in -- out axis.1.*-lim-sw-in -- lut5 weight

#        0            X       X                  X  |     0

#        1            0       0                  0  |     0
#        1            0       0                  1  |     1                        0x00000200
#        1            0       1                  0  |     0
#        1            0       1                  1  |     1                        0x00000800
#
#        1            1       0                  0  |     0
#        1            1       0                  1  |     1                        0x00002000
#        1            1       1                  0  |     0
#        1            1       1                  1  |     0
#                                                                                   ----
#                                                                                  0x00002A00
setp door-limit-y-lut.function                                                     0x00002A00

net y-lim-out                        door-limit-y-lut.out   axis.1.home-sw-in axis.1.neg-lim-sw-in axis.1.pos-lim-sw-in

net x-is-homing     axis.0.homing    door-limit-x-lut.in-3    door-limit-y-lut.in-2

# door switch to spindle comp is former x-axis limit input ANDed with NOT door-sw-configured from UI
# if door-sw-configured is TRUE then the spindle comp input follows the X limit input
# if door-sw-configured is FALSE the the spindle comp input is always FALSE

# inverter NOT gate
net enc-door-switch-configured door-limit-x-lut.in-2   door-limit-y-lut.in-1    door-limit-in.in0   tormachspindle.enc-door-switch-configured

# connect X limit inputs to axis.2.*-sw-*
net z-lim-out    enable-limit-z.out    axis.2.home-sw-in axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in

# UI can display this
net enc-door-switch-status    door-limit-in.out   tormachspindle.enc-door-switch-status

########################################################################
#
# tool change
#

# loopback tool-change to tool-changed
net tool-change iocontrol.0.tool-change => iocontrol.0.tool-changed

# loopback prepare to prepared
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared



#######################################################################
# IO Board
#######################################################################

net dig-out-0 motion.digital-out-00 => usbio.relay-0
net dig-out-1 motion.digital-out-01 => usbio.relay-1
net dig-out-2 motion.digital-out-02 => usbio.relay-2
net dig-out-3 motion.digital-out-03 => usbio.relay-3

net dig-in-0 motion.digital-in-00 => usbio.input-0
net dig-in-1 motion.digital-in-01 => usbio.input-1
net dig-in-2 motion.digital-in-02 => usbio.input-2
net dig-in-3 motion.digital-in-03 => usbio.input-3


Please Log in or Create an account to join the conversation.

More
14 Apr 2016 15:35 #73310 by cncbasher
Their are other entry's needed for the pathpilot gui to work
and you dont need parts such as the digital io

email me your config files , and i'll modify them

Please Log in or Create an account to join the conversation.

More
26 Dec 2016 08:28 #84697 by GusBiz
Did you sort this out.

I am having the exact same problem.

What did you do to resolve this?

Thank you in advance.

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.072 seconds
Powered by Kunena Forum