Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nitial file was generated in PNCconf then edited to line up the PINS along each TB on the MESA 7i77 & 7i84. Was just easier for cataloguing on the back end of things.
- # Generated by PNCconf at Mon Sep 14 12:03:23 2015
- # If you make changes to this file, they will be
- # overwritten when you run PNCconf again
- ###Statistics
- ###INPUTS =
- loadrt trivkins
- loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
- loadrt hostmot2
- loadrt hm2_pci config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=000xxx"
- setp hm2_5i25.0.watchdog.timeout_ns 5000000
- loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.s
- loadrt abs names=abs.spindle
- loadrt lowpass names=lowpass.spindle
- loadrt scale names=scale.spindle
- loadrt classicladder_rt numPhysInputs=15 numPhysOutputs=15 numS32in=10 numS32out=10 numFloatIn=10 numFloatOut=10 numBits=50 numWords=50
- addf hm2_5i25.0.read servo-thread
- addf motion-command-handler servo-thread
- addf motion-controller servo-thread
- addf pid.x.do-pid-calcs servo-thread
- addf pid.y.do-pid-calcs servo-thread
- addf pid.z.do-pid-calcs servo-thread
- addf pid.a.do-pid-calcs servo-thread
- addf pid.s.do-pid-calcs servo-thread
- addf classicladder.0.refresh servo-thread
- addf scale.spindle servo-thread
- addf abs.spindle servo-thread
- addf lowpass.spindle servo-thread
- addf hm2_5i25.0.write servo-thread
- # 7i77 i/o
- #TB8
- ####INPUTS
- #-----------------------------------------------------------------------------------------
- # 01 Signal Source- VFD; Output=Volts, rate 3amp/volt
- # net spindle_current <= hm2_5i25.0.7i77.0.0.input-00
- # <NOT ABLE TO READ THE VOLTAGE OUT FROM CARD>
- # 02 Signal Source- dial potentiometer on the physical machine panel, 0-24V; 50-150%
- net sso <= hm2_5i25.0.7i77.0.0.input-01
- # <NOT ABLE TO READ VOLTAGE OUT, ONLY ACTIVE/INACTIVE IN HAL> <INTEGRATE WITH PYVCP FOR OVERRIDE PERCENTAGE>
- # 03 Signal Source- dial potentiometer on the physical machine panel, 0-24V; 0-200% <NOT CONNECTED TO READ VOLTAGE OUT>
- net fro <= hm2_5i25.0.7i77.0.0.input-02
- # <NOT ABLE TO READ VOLTAGE OUT, ONLY ACTIVE/INACTIVE IN HAL> <INTEGRATE WITH PYVCP FOR OVERRIDE PERCENTAGE>
- # 04 Signal Source- Toggle Button on the physical machine panel, shared with Off, On = +24V, Off = +0V
- net power-on-button hm2_5i25.0.7i77.0.0.input-03
- # <BUTTON OPERATIONAL> <WRITE HAL CODE TO TOGGLE ON>
- # 05 Signal Source- Toggle Button on the physical machine panel, shared with Off, On = +24V, Off = +0V, connected and pin read
- net power-off-button <= hm2_5i25.0.7i77.0.0.input-04-not
- # <BUTTON OPERATIONAL> <WRITE HAL CODE TO TOGGLE OFF>
- # 06 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-05
- # 07 Signal Source- E-Stop Button on the physical machine panel, Button Out = +24v, Button In = +0v
- net estop-ext <= hm2_5i25.0.7i77.0.0.input-06
- # <FULLY OPERATIONAL>
- # 08 Signal Source- Toggle button labeled "Platter Up/Down" on the physical machine panel, Button Out = +24v, Button In = +0v
- net spindle-up-down <= hm2_5i25.0.7i77.0.0.input-07-not
- # <BUTTON OPERATIONAL> <INTEGRATE WITH MOVING THE MACHINE HEAD BETWEEN HOME HALL DETECTOR AND CURRENT POSITION>
- # 09 Signal Source- Toggle button labeled "Index Platter" on the physical machine panel, Button Out = +24v, Button In = +0v
- net spindle-index <= hm2_5i25.0.7i77.0.0.input-08-not
- # <BUTTON OPERATIONAL> <INTEGRATE TO MOVE THE SPINDLE TO THE PRESCRIBED INDEXED POINT>
- # 10 Signal Source- Toggle button labeled "Drawbar Clamp/Unclamp" on the physical machine panel, Button Out = +24v, Button In = +0v
- net open-drawbar <= hm2_5i25.0.7i77.0.0.input-09-not
- # <FULLY OPERATIONAL>
- # 11 Signal Source- Hall Effect Sensor on the Power Drawbar Pneumatic Motor, untested sensor
- # <NOT CONNECTED> net drawbar_sensor <= hm2_5i25.0.7i77.0.0.input-10
- # <TEST SWITCH> <CONNECT SWITCH TO MESA> <SIGNAL IS USED WITH ATC TO INDICATE DRAWBAR IS OPEN/CLOSED>
- # 12 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-011
- # 13 Signal Source- Toggle button labeled "Cycle Start" on the physical machine panel, Button Out = +0v, Button In = +24v
- net cycle-start halui.program.run <= hm2_5i25.0.7i77.0.0.input-12
- # <FULLY OPERATIONAL>
- # 14 Signal Source- Toggle button labeled "Cycle Stop" on the physical machine panel, Button Out = +24v, Button In = +0v
- net abort halui.abort <= hm2_5i25.0.7i77.0.0.input-13-not
- # <FULLY OPERATIONAL>
- # 15 Signal Source - Moellar electric door lock, Door Locked = +24V, Door Unlocked = +0v, PYVCP, LOCKED = GREEN, UNLOCKED = RED
- net door-locked-indicator <= hm2_5i25.0.7i77.0.0.input-14
- # <SIGNAL OPERATIONAL> <SET TO LOCK WHEN HALUI.PROGRAM-RUN = TRUE>
- # 16 Signal Source - Moellar electric door lock, Door Closed = +24V, Door Open = +0V, PYVCP, DOOR CLOSED = GREEN, OPEN = RED
- net door-closed-indicator hm2_5i25.0.7i77.0.0.input-15
- # <FULLY OPERATIONAL>
- #-----------------------------------------------------------------------------------------
- #OUTPUTS
- # 17 Signal Destination- X Axis Servo Amplifier, Fault Reset, Pullup Used
- net x-reset => hm2_5i25.0.7i77.0.0.output-00
- # <SIGNAL OPERATIONAL> <CURRENTLY PYVCP BUTTON>
- # 18 Signal Destination- Y Axis Servo Amplifier, Fault Reset, Pullup Used, untested
- net y-reset => hm2_5i25.0.7i77.0.0.output-01
- # <SIGNAL OPERATIONAL> <CURRENTLY PYVCP BUTTON>
- # 19 Signal Destination- Z Axis Servo Amplifier, Fault Reset, Pullup Used, untested
- net z-reset => hm2_5i25.0.7i77.0.0.output-02
- # <SIGNAL OPERATIONAL> <CURRENTLY PYVCP BUTTON>
- # 20 Signal Destination- A Axis Servo Amplifier, Fault Reset, Pullup Used, untested
- net a-reset => hm2_5i25.0.7i77.0.0.output-03
- # <SIGNAL OPERATIONAL> <CURRENTLY PYVCP BUTTON>
- # 21 Signal Destination- X Axis Servo Amplifier - Enable
- net x-enable => hm2_5i25.0.7i77.0.0.output-04
- # <FULLY OPERATIONAL>
- # 22 Signal Destination- Y Axis Servo Amplifier - Enable
- net y-enable => hm2_5i25.0.7i77.0.0.output-05
- # <FULLY OPERATIONAL>
- # 23 Signal Destination- Z Axis Servo Amplifier - Enable
- net z-enable => hm2_5i25.0.7i77.0.0.output-06
- # <FULLY OPERATIONAL>
- # 24 Signal Destination- A Axis Servo Amplifier - Enable
- net a-enable => hm2_5i25.0.7i77.0.0.output-07
- # <FULLY OPERATIONAL>
- #TB7
- ####INPUTS
- #-----------------------------------------------------------------------------------------
- # 01 Signal Source - X MAX/HOME ENDSTOP (Table Right), +24v thru Endstop
- net x-min-home <= hm2_5i25.0.7i77.0.0.input-16-not
- # <FULLY OPERATIONAL>
- # 02 Signal Source - X MIN ENDSTOP (Table Left), +24v thru Endstop
- net x-max <= hm2_5i25.0.7i77.0.0.input-17-not
- # <FULLY OPERATIONAL>
- # 03 Signal Source - Y MIN/HOME (Table Front), +24v thru Endstop
- net y-min-home <= hm2_5i25.0.7i77.0.0.input-18-not
- # <Cannot get the signal>
- # 04 Signal Source - Y MAX (Table Back), +24v thru Endstop
- net y-max <= hm2_5i25.0.7i77.0.0.input-19-not
- # <FULLY OPERATIONAL>
- # 05 Signal Source - Z MAX (Mast UP), +24v thru Endstop, untested
- net z-max-home <= hm2_5i25.0.7i77.0.0.input-20-not
- #
- # 06 Signal Source - Z MIN (Mast Down), +24v thru Endstop, untested
- net z-min <= hm2_5i25.0.7i77.0.0.input-21-not
- # <FULLY OPERATIONAL>
- # 07 Signal Source - Hall Effect Sensor on Mast - tool change height?, untested sensor
- # <NOT CONNECTED> net z-home <= hm2_5i25.0.7i77.0.0.input-22
- # 08 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-23
- # 09 Signal Source - X Amplifier - fault notification - active = drive fault, untested
- net x-fault-indicator <= hm2_5i25.0.7i77.0.0.input-24
- #net x-fault-indicator axis.0.amp-fault-in <= hm2_5i25.0.7i77.0.0.input-24
- # 10 Signal Source - Y Amplifier - fault notification - active = drive fault, untested
- net y-fault-indicator <= hm2_5i25.0.7i77.0.0.input-25
- #net y-fault-indicator axis.1.amp-fault-in <= hm2_5i25.0.7i77.0.0.input-25
- # 11 Signal Source - Z Amplifier - fault notification - active = drive fault, untested
- net z-fault-indicator <= hm2_5i25.0.7i77.0.0.input-26
- #net z-fault-indicator axis.2.amp-fault-in <= hm2_5i25.0.7i77.0.0.input-26
- # 12 Signal Source - A Amplifier - fault notification - active = drive fault, untested
- net a-fault-indicator <= hm2_5i25.0.7i77.0.0.input-27
- #net a-fault-indicator axis.3.amp-fault-in <= hm2_5i25.0.7i77.0.0.input-27
- # 13 Signal Source - VFD - fault notification - active = drive fault
- net spindle-fault-indicator <= hm2_5i25.0.7i77.0.0.input-28
- # <FULLY OPERATIONAL>
- # 14 Signal Source - 4th Axis Loop - 4th Axis installed = +24V 4th Axis out = +0v, untested
- net a-axis-installed <= hm2_5i25.0.7i77.0.0.input-29
- # 15 Signal Source - Renishaw PH6/TP2 Touch Probe, not sure about wiring, one constant connection between 2 pins.
- # <NOT CONNECTED> net probe-in <= hm2_5i25.0.7177.0.0.input-30
- # 16 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-31
- #-----------------------------------------------------------------------------------------
- #OUTPUTS
- # 17 Signal Destination - VFD - Spindle Enable, active = enable, tested good
- net spindle-enable hm2_5i25.0.7i77.0.0.output-08
- # <FULLY OPERATIONAL>
- # 18 Signal Destination - VFD - Spindle Fault Reset, active = fault reset; untested
- net spindle-reset => hm2_5i25.0.7i77.0.0.output-09
- # <FULLY OPERATIONAL>
- # 19 Signal Destination - VFD - Spindle Drive Select Mode // Active = Torque Mode Inactive = Velocity Mode, untested
- net spindle-mode => hm2_5i25.0.7i77.0.0.output-10
- # <SIGNAL CONNECTED>
- # 20 Signal Destination - Safety Door Lock // output to relay // relay sends +24v to the EM door lock, untested
- net door-locked => hm2_5i25.0.7i77.0.0.output-11
- # <FULLY OPERATIONAL>
- # 21 <EMPTY PIN> hm2_5i25.0.7i77.0.0.output-12
- # 22 <EMPTY PIN> hm2_5i25.0.7i77.0.0.output-13
- # 23 <EMPTY PIN> hm2_5i25.0.7i77.0.0.output-14
- # 24 <EMPTY PIN> hm2_5i25.0.7i77.0.0.output-15
- # 7i84 i/o
- #TB3
- ####INPUTS
- #-----------------------------------------------------------------------------------------
- # 01 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-00
- # 02 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-01
- # 03 Signal Source - AIR PRESSURE SENSOR - LOW AIR = +24v
- net low-air <= hm2_5i25.0.7i84.0.2.input-02
- # <SIGNAL CONNECTED BUT READS HIGH>
- # 04 Signal Source - ATC Pneumatic Actuator 1 Endstop 1 (CARRIAGE HOME/UP, PV1 = FALSE)
- net act1-a <= hm2_5i25.0.7i84.0.2.input-03
- # <SIGNAL OPERATIONAL>
- # 05 Signal Source - ATC Pneumatic Actuator 1 Endstop 2, (CARRIAGE DOWN; PV1 = TRUE)
- net act1-b <= hm2_5i25.0.7i84.0.2.input-04
- # <SIGNAL OPERATIONAL>
- # 06 Signal Source - ATC Pneumatic Actuator 2 Endstop 1 (CARRIAGE HOME/IN, PV2 = FALSE)
- net act2-a <= hm2_5i25.0.7i84.0.2.input-05
- # <SIGNAL OPERATIONAL>
- # 07 Signal Source - ATC Pneumatic Actuator 2 Endstop 2, (CARRIAGE OUT = UNDER SPINDLE, PV2 = TRUE)
- net act2-b <= hm2_5i25.0.7i84.0.2.input-06
- # <SIGNAL OPERATIONAL>
- # 08 Signal Source - ATC Pneumatic Actuator 3 Endstop 1 (TOOL HOLDER HOME/DOWN; PV3 = FALSE)
- net act3-a <= hm2_5i25.0.7i84.0.2.input-07
- # <SIGNAL OPERATIONAL>
- # 09 Signal Source - ATC Pneumatic Actuator 3 Endstop 2, (TOOL HOLDER UP = LOAD TOOL; PV3 = TRUE)
- net act3-b <= hm2_5i25.0.7i84.0.2.input-08
- # <SIGNAL OPERATIONAL>
- # 10 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-09
- # 11 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-10
- # 12 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-11
- # 13 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-12
- # 14 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-13
- # 15 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-14
- # 16 <EMPTY PIN> hm2_5i25.0.7i77.0.0.input-15
- #TB3
- ####OUTPUTS
- #-----------------------------------------------------------------------------------------
- # 17 Signal Destination - ATC Carousel DC Motor // +24v common bar to relay to Motor, Active rotates CW untested
- net atc_motor => hm2_5i25.0.7i84.0.2.output-00
- # <SIGNAL OPERATIONAL> <CURRENTLY A PYVCP BUTTON TO ROTATE><INTEGRATE WITH CLASSIC LADDER>
- # 18 Signal Destination - ATC Pneumatic Valve 1 - operates Actuator 1, active = valve open
- net pv1 => hm2_5i25.0.7i84.0.2.output-01
- # <SIGNAL OPERATIONAL> <CURRENTLY A PYVCP BUTTON TO ROTATE><INTEGRATE WITH CLASSIC LADDER>
- # 19 Signal Destination - ATC Pneumatic Valve 2 - operates Actuator 2, active = valve open
- net pv2 => hm2_5i25.0.7i84.0.2.output-02
- # <SIGNAL OPERATIONAL> <CURRENTLY A PYVCP BUTTON TO ROTATE><INTEGRATE WITH CLASSIC LADDER>
- # 20 Signal Destination - ATC Pneumatic Valve 3 - operates Actuator 3, active = valve open
- net pv3 => hm2_5i25.0.7i84.0.2.output-03
- # <SIGNAL OPERATIONAL> <CURRENTLY A PYVCP BUTTON TO ROTATE><INTEGRATE WITH CLASSIC LADDER>
- # 21 Signal Destination - ATC Pneumatic Valve 4 - operates Actuator 4, active = valve open
- net open-drawbar => hm2_5i25.0.7i84.0.2.output-04
- # <FULLY OPERATIONAL> <INTEGRATE WITH CLASSIC LADDER>
- # 22 Signal Destination - Compartment Light Relay - +24v LED, active = light on
- net light => hm2_5i25.0.7i84.0.2.output-05
- # <FULLY OPERATIONAL> <NEED REPLACEMENT BULB>
- # 23 Signal Destination - Flood Coolant Relay +220v Pump, active = pump on
- net flood-coolant => hm2_5i25.0.7i84.0.2.output-06
- # <FULLY OPERATIONAL> <TEST WITH M08/M09 CMD>
- # 24 Signal Destination - Z Axis Brake Relay, +24v brake, active = brake off
- net zbrake => hm2_5i25.0.7i84.0.2.output-07
- # <FULLY OPERATIONAL> <SET BRAKE OFF WHEN MACHINE IS POWERED ON>
- # no connections are made for TB2
- # 01 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-16 - reserved for MPG
- # 02 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-17 - reserved for MPG
- # 03 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-18 - reserved for MPG
- # 04 <EMPTY PIN> hm2_5i25.0.7i84.0.2.input-19 - reserved for MPG
- #*******************
- # 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 pid.x.error-previous-target true
- setp pid.x.maxerror .0005
- net x-index-enable <=> pid.x.index-enable
- net x-enable => pid.x.enable
- net x-pos-cmd => pid.x.command
- net x-vel-cmd => pid.x.command-deriv
- net x-pos-fb => pid.x.feedback
- net x-output => pid.x.output
- # ---PWM Generator signals/setup---
- setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [AXIS_0]OUTPUT_SCALE
- setp hm2_5i25.0.7i77.0.1.analogout0-minlim [AXIS_0]OUTPUT_MIN_LIMIT
- setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [AXIS_0]OUTPUT_MAX_LIMIT
- net x-output => hm2_5i25.0.7i77.0.1.analogout0
- net x-pos-cmd axis.0.motor-pos-cmd
- net x-enable axis.0.amp-enable-out
- # enable _all_ sserial pwmgens
- net x-enable hm2_5i25.0.7i77.0.1.analogena
- # ---Encoder feedback signals/setup---
- setp hm2_5i25.0.encoder.00.counter-mode 0
- setp hm2_5i25.0.encoder.00.filter 1
- setp hm2_5i25.0.encoder.00.index-invert 0
- setp hm2_5i25.0.encoder.00.index-mask 0
- setp hm2_5i25.0.encoder.00.index-mask-invert 0
- setp hm2_5i25.0.encoder.00.scale [AXIS_0]ENCODER_SCALE
- net x-pos-fb <= hm2_5i25.0.encoder.00.position
- net x-vel-fb <= hm2_5i25.0.encoder.00.velocity
- net x-pos-fb => axis.0.motor-pos-fb
- net x-index-enable axis.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
- net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
- # ---setup home / limit switch signals---
- net x-home-sw => axis.0.home-sw-in
- net min-x => axis.0.neg-lim-sw-in
- net x-pos-limit => axis.0.pos-lim-sw-in
- #*******************
- # AXIS Y
- #*******************
- setp pid.y.Pgain [AXIS_1]P
- setp pid.y.Igain [AXIS_1]I
- setp pid.y.Dgain [AXIS_1]D
- setp pid.y.bias [AXIS_1]BIAS
- setp pid.y.FF0 [AXIS_1]FF0
- setp pid.y.FF1 [AXIS_1]FF1
- setp pid.y.FF2 [AXIS_1]FF2
- setp pid.y.deadband [AXIS_1]DEADBAND
- setp pid.y.maxoutput [AXIS_1]MAX_OUTPUT
- setp pid.y.error-previous-target true
- setp pid.y.maxerror .0005
- net y-index-enable <=> pid.y.index-enable
- net y-enable => pid.y.enable
- net y-pos-cmd => pid.y.command
- net y-vel-cmd => pid.y.command-deriv
- net y-pos-fb => pid.y.feedback
- net y-output => pid.y.output
- # ---PWM Generator signals/setup---
- setp hm2_5i25.0.7i77.0.1.analogout1-scalemax [AXIS_1]OUTPUT_SCALE
- setp hm2_5i25.0.7i77.0.1.analogout1-minlim [AXIS_1]OUTPUT_MIN_LIMIT
- setp hm2_5i25.0.7i77.0.1.analogout1-maxlim [AXIS_1]OUTPUT_MAX_LIMIT
- net y-output => hm2_5i25.0.7i77.0.1.analogout1
- net y-pos-cmd axis.1.motor-pos-cmd
- net y-enable axis.1.amp-enable-out
- # ---Encoder feedback signals/setup---
- setp hm2_5i25.0.encoder.01.counter-mode 0
- setp hm2_5i25.0.encoder.01.filter 1
- setp hm2_5i25.0.encoder.01.index-invert 0
- setp hm2_5i25.0.encoder.01.index-mask 0
- setp hm2_5i25.0.encoder.01.index-mask-invert 0
- setp hm2_5i25.0.encoder.01.scale [AXIS_1]ENCODER_SCALE
- net y-pos-fb <= hm2_5i25.0.encoder.01.position
- net y-vel-fb <= hm2_5i25.0.encoder.01.velocity
- net y-pos-fb => axis.1.motor-pos-fb
- net y-index-enable axis.1.index-enable <=> hm2_5i25.0.encoder.01.index-enable
- net y-pos-rawcounts <= hm2_5i25.0.encoder.01.rawcounts
- # ---setup home / limit switch signals---
- net max-home-y => axis.1.home-sw-in
- net min-y => axis.1.neg-lim-sw-in
- net max-home-y => axis.1.pos-lim-sw-in
- #*******************
- # AXIS Z
- #*******************
- setp pid.z.Pgain [AXIS_2]P
- setp pid.z.Igain [AXIS_2]I
- setp pid.z.Dgain [AXIS_2]D
- setp pid.z.bias [AXIS_2]BIAS
- setp pid.z.FF0 [AXIS_2]FF0
- setp pid.z.FF1 [AXIS_2]FF1
- setp pid.z.FF2 [AXIS_2]FF2
- setp pid.z.deadband [AXIS_2]DEADBAND
- setp pid.z.maxoutput [AXIS_2]MAX_OUTPUT
- setp pid.z.error-previous-target true
- setp pid.z.maxerror .0005
- net z-index-enable <=> pid.z.index-enable
- net z-enable => pid.z.enable
- net z-pos-cmd => pid.z.command
- net z-vel-cmd => pid.z.command-deriv
- net z-pos-fb => pid.z.feedback
- net z-output => pid.z.output
- # ---PWM Generator signals/setup---
- setp hm2_5i25.0.7i77.0.1.analogout2-scalemax [AXIS_2]OUTPUT_SCALE
- setp hm2_5i25.0.7i77.0.1.analogout2-minlim [AXIS_2]OUTPUT_MIN_LIMIT
- setp hm2_5i25.0.7i77.0.1.analogout2-maxlim [AXIS_2]OUTPUT_MAX_LIMIT
- net z-output => hm2_5i25.0.7i77.0.1.analogout2
- net z-pos-cmd axis.2.motor-pos-cmd
- net z-enable axis.2.amp-enable-out
- # ---Encoder feedback signals/setup---
- setp hm2_5i25.0.encoder.02.counter-mode 0
- setp hm2_5i25.0.encoder.02.filter 1
- setp hm2_5i25.0.encoder.02.index-invert 0
- setp hm2_5i25.0.encoder.02.index-mask 0
- setp hm2_5i25.0.encoder.02.index-mask-invert 0
- setp hm2_5i25.0.encoder.02.scale [AXIS_2]ENCODER_SCALE
- net z-pos-fb <= hm2_5i25.0.encoder.02.position
- net z-vel-fb <= hm2_5i25.0.encoder.02.velocity
- net z-pos-fb => axis.2.motor-pos-fb
- net z-index-enable axis.2.index-enable <=> hm2_5i25.0.encoder.02.index-enable
- net z-pos-rawcounts <= hm2_5i25.0.encoder.02.rawcounts
- # ---setup home / limit switch signals---
- net max-home-z => axis.2.home-sw-in
- net min-z => axis.2.neg-lim-sw-in
- net max-home-z => axis.2.pos-lim-sw-in
- #*******************
- # AXIS A
- #*******************
- setp pid.a.Pgain [AXIS_3]P
- setp pid.a.Igain [AXIS_3]I
- setp pid.a.Dgain [AXIS_3]D
- setp pid.a.bias [AXIS_3]BIAS
- setp pid.a.FF0 [AXIS_3]FF0
- setp pid.a.FF1 [AXIS_3]FF1
- setp pid.a.FF2 [AXIS_3]FF2
- setp pid.a.deadband [AXIS_3]DEADBAND
- setp pid.a.maxoutput [AXIS_3]MAX_OUTPUT
- setp pid.a.error-previous-target true
- setp pid.a.maxerror .0005
- net a-index-enable <=> pid.a.index-enable
- net a-enable => pid.a.enable
- net a-pos-cmd => pid.a.command
- net a-vel-cmd => pid.a.command-deriv
- net a-pos-fb => pid.a.feedback
- net a-output => pid.a.output
- # ---PWM Generator signals/setup---
- setp hm2_5i25.0.7i77.0.1.analogout3-scalemax [AXIS_3]OUTPUT_SCALE
- setp hm2_5i25.0.7i77.0.1.analogout3-minlim [AXIS_3]OUTPUT_MIN_LIMIT
- setp hm2_5i25.0.7i77.0.1.analogout3-maxlim [AXIS_3]OUTPUT_MAX_LIMIT
- net a-output => hm2_5i25.0.7i77.0.1.analogout3
- net a-pos-cmd axis.3.motor-pos-cmd
- net a-enable axis.3.amp-enable-out
- # ---Encoder feedback signals/setup---
- setp hm2_5i25.0.encoder.05.counter-mode 0
- setp hm2_5i25.0.encoder.05.filter 1
- setp hm2_5i25.0.encoder.05.index-invert 0
- setp hm2_5i25.0.encoder.05.index-mask 0
- setp hm2_5i25.0.encoder.05.index-mask-invert 0
- setp hm2_5i25.0.encoder.05.scale [AXIS_3]ENCODER_SCALE
- net a-pos-fb <= hm2_5i25.0.encoder.05.position
- net a-vel-fb <= hm2_5i25.0.encoder.05.velocity
- net a-pos-fb => axis.3.motor-pos-fb
- net a-index-enable axis.3.index-enable <=> hm2_5i25.0.encoder.05.index-enable
- net a-pos-rawcounts <= hm2_5i25.0.encoder.05.rawcounts
- # ---setup home / limit switch signals---
- net max-home-a => axis.3.home-sw-in
- net a-neg-limit => axis.3.neg-lim-sw-in
- net max-home-a => axis.3.pos-lim-sw-in
- #*******************
- # SPINDLE S
- #*******************
- setp pid.s.Pgain [SPINDLE_9]P
- setp pid.s.Igain [SPINDLE_9]I
- setp pid.s.Dgain [SPINDLE_9]D
- setp pid.s.bias [SPINDLE_9]BIAS
- setp pid.s.FF0 [SPINDLE_9]FF0
- setp pid.s.FF1 [SPINDLE_9]FF1
- setp pid.s.FF2 [SPINDLE_9]FF2
- setp pid.s.deadband [SPINDLE_9]DEADBAND
- setp pid.s.maxoutput [SPINDLE_9]MAX_OUTPUT
- setp pid.s.error-previous-target true
- setp pid.s.maxerror .0005
- net spindle-index-enable <=> pid.s.index-enable
- net spindle-enable => pid.s.enable
- net spindle-vel-cmd-rpm => pid.s.command
- net spindle-vel-fb-rpm => pid.s.feedback
- net spindle-output <= pid.s.output
- # ---PWM Generator signals/setup---
- setp hm2_5i25.0.7i77.0.1.analogout4-scalemax [SPINDLE_9]OUTPUT_SCALE
- setp hm2_5i25.0.7i77.0.1.analogout4-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
- setp hm2_5i25.0.7i77.0.1.analogout4-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
- net spindle-output => hm2_5i25.0.7i77.0.1.analogout4
- # ---Encoder feedback signals/setup---
- setp hm2_5i25.0.encoder.04.counter-mode 0
- setp hm2_5i25.0.encoder.04.filter 1
- setp hm2_5i25.0.encoder.04.index-invert 0
- setp hm2_5i25.0.encoder.04.index-mask 0
- setp hm2_5i25.0.encoder.04.index-mask-invert 0
- setp hm2_5i25.0.encoder.04.scale [SPINDLE_9]ENCODER_SCALE
- net spindle-revs <= hm2_5i25.0.encoder.04.position
- net spindle-vel-fb-rps <= hm2_5i25.0.encoder.04.velocity
- net spindle-index-enable <=> hm2_5i25.0.encoder.04.index-enable
- # ---setup spindle control signals---
- net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
- net spindle-vel-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
- net spindle-vel-cmd-rpm <= motion.spindle-speed-out
- net spindle-vel-cmd-rpm-abs <= motion.spindle-speed-out-abs
- #net spindle-enable <= motion.spindle-on
- net spindle-cw <= motion.spindle-forward
- net spindle-ccw <= motion.spindle-reverse
- net spindle-brake <= motion.spindle-brake
- net spindle-revs => motion.spindle-revs
- net spindle-at-speed => motion.spindle-at-speed
- net spindle-vel-fb-rps => motion.spindle-speed-in
- net spindle-index-enable <=> motion.spindle-index-enable
- # ---Setup spindle at speed signals---
- sets spindle-at-speed true
- # Use ACTUAL spindle velocity from spindle encoder
- # spindle-velocity bounces around so we filter it with lowpass
- # spindle-velocity is signed so we use absolute component to remove sign
- # ACTUAL velocity is in RPS not RPM so we scale it.
- setp scale.spindle.gain 60
- setp lowpass.spindle.gain 1.000000
- net spindle-vel-fb-rps => scale.spindle.in
- net spindle-fb-rpm scale.spindle.out => abs.spindle.in
- net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
- net spindle-fb-rpm-abs-filtered lowpass.spindle.out
- #******************************
- # connect miscellaneous signals
- #******************************
- # ---HALUI signals---
- net joint-select-a halui.joint.0.select
- net x-is-homed halui.joint.0.is-homed
- net jog-x-pos halui.jog.0.plus
- net jog-x-neg halui.jog.0.minus
- net jog-x-analog halui.jog.0.analog
- net joint-select-b halui.joint.1.select
- net y-is-homed halui.joint.1.is-homed
- net jog-y-pos halui.jog.1.plus
- net jog-y-neg halui.jog.1.minus
- net jog-y-analog halui.jog.1.analog
- net joint-select-c halui.joint.2.select
- net z-is-homed halui.joint.2.is-homed
- net jog-z-pos halui.jog.2.plus
- net jog-z-neg halui.jog.2.minus
- net jog-z-analog halui.jog.2.analog
- net joint-select-d halui.joint.3.select
- net a-is-homed halui.joint.3.is-homed
- net jog-a-pos halui.jog.3.plus
- net jog-a-neg halui.jog.3.minus
- net jog-a-analog halui.jog.3.analog
- net jog-selected-pos halui.jog.selected.plus
- net jog-selected-neg halui.jog.selected.minus
- net spindle-manual-cw halui.spindle.forward
- net spindle-manual-ccw halui.spindle.reverse
- net spindle-manual-stop halui.spindle.stop
- net jog-speed halui.jog-speed
- net MDI-mode halui.mode.is-mdi
- net machine-is-on halui.machine.is-on
- # ---coolant signals---
- #net coolant-mist <= iocontrol.0.coolant-mist
- net coolant-flood <= iocontrol.0.coolant-flood
- # ---probe signal---
- net probe-in => motion.probe-input
- # ---motion control signals---
- net in-position <= motion.in-position
- net machine-is-enabled <= motion.motion-enabled
- # ---estop signals---
- net estop-out <= iocontrol.0.user-enable-out
- net estop-ext => iocontrol.0.emc-enable-in
- # ---toolchange signals for custom tool changer---
- net tool-number <= iocontrol.0.tool-prep-number
- net tool-change-request <= iocontrol.0.tool-change
- net tool-change-confirmed => iocontrol.0.tool-changed
- net tool-prepare-request <= iocontrol.0.tool-prepare
- net tool-prepare-confirmed => iocontrol.0.tool-prepared
- # Load Classicladder without GUI (can reload LADDER GUI in AXIS GUI
- loadusr classicladder --nogui custom.clp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement