Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- M6 T6 G43 H6 (Single Pt Thd)
- M3 S400
- M8
- G0 X0.335 Z0.200
- G76 P0.0466 Z-0.560 I0.054 J0.006 K0.027 H3 R2 Q29.5 E0.060 L2
- GO X0.500 Z1.5
- Hal File
- # HAL config file for Pico Systems USC board
- #
- # Connect motion controller I/Os
- #
- # connect limit/home switch outputs to motion controller
- newsig Xminlim bit
- newsig Xmaxlim bit
- newsig Xhome bit
- linksp Xminlim <= ppmc.0.din.01.in-not
- linksp Xminlim => axis.0.neg-lim-sw-in
- linksp Xmaxlim <= ppmc.0.din.02.in-not
- linksp Xmaxlim => axis.0.pos-lim-sw-in
- linksp Xhome <= ppmc.0.din.00.in
- linksp Xhome => axis.0.home-sw-in
- #newsig Yminlim bit
- #newsig Ymaxlim bit
- #newsig Yhome bit
- #linksp Yminlim <= ppmc.0.din.05.in
- #linksp Yminlim => axis.1.neg-lim-sw-in
- #linksp Ymaxlim <= ppmc.0.din.06.in
- #linksp Ymaxlim => axis.1.pos-lim-sw-in
- #linksp Yhome <= ppmc.0.din.04.in
- #linksp Yhome => axis.1.home-sw-in
- newsig Zminlim bit
- newsig Zmaxlim bit
- newsig Zhome bit
- linksp Zminlim <= ppmc.0.din.04.in-not
- #linksp Zminlim <= ppmc.0.din.09.in
- linksp Zminlim => axis.2.neg-lim-sw-in
- linksp Zmaxlim <= ppmc.0.din.05.in-not
- #linksp Zmaxlim <= ppmc.0.din.10.in
- linksp Zmaxlim => axis.2.pos-lim-sw-in
- linksp Zhome <= ppmc.0.din.03.in
- #linksp Zhome <= ppmc.0.din.08.in
- linksp Zhome => axis.2.home-sw-in
- #newsig Aminlim bit
- #newsig Amaxlim bit
- #newsig Ahome bit
- #linksp Aminlim <= ppmc.0.din.12.in
- #linksp Aminlim => axis.3.neg-lim-sw-in
- #linksp Amaxlim <= ppmc.0.din.13.in
- #linksp Amaxlim => axis.3.pos-lim-sw-in
- #linksp Ahome <= ppmc.0.din.11.in
- #linksp Ahome => axis.3.home-sw-in
- # connect index pulses to motion controller
- # uncomment these lines only if you have a Rev 3 UPC board
- # The ppmc.x.encoder.xx.index-enable pin is ONLY exported by the driver
- # if the UPC has rev 3 or above firmware
- newsig Xindex bit
- #newsig Yindex bit
- newsig Zindex bit
- linksp Xindex <= ppmc.0.encoder.00.index-enable
- linksp Xindex => axis.0.index-enable
- #linksp Yindex <= ppmc.0.encoder.01.index-enable
- #linksp Yindex => axis.1.index-enable
- linksp Zindex <= ppmc.0.encoder.02.index-enable
- linksp Zindex => axis.2.index-enable
- #
- # Connect I/O controller I/Os
- #
- # connect e-stop write/sense to I/O controller
- # and univpwm's fault with estop's output, so estop FF is reset, but
- # prevent continued estop signal from univpwm from holding FF cleared
- newsig ppmcEstop bit
- linksp ppmcEstop ppmc.0.din.15.in-not
- linksp ppmcEstop and2.0.in0
- newsig EstopOkIn bit
- linksp EstopOkIn estop-latch.0.fault-in
- linksp EstopOkIn and2.0.out
- newsig EstopOkOut bit
- linksp EstopOkOut <= ppmc.0.dout.07.out
- linksp EstopOkOut iocontrol.0.emc-enable-in
- linksp EstopOkOut estop-latch.0.ok-out
- linksp EstopOkOut and2.0.in1
- newsig emc-estop-out bit
- linksp emc-estop-out iocontrol.0.user-enable-out
- linksp emc-estop-out estop-latch.0.ok-in
- newsig emc-estop-reset bit
- linksp emc-estop-reset iocontrol.0.user-request-enable
- linksp emc-estop-reset estop-latch.0.reset
- ### TURRET ###
- # create signals for tool loading loopback
- net ToolPrep iocontrol.0.tool-prepare iocontrol.0.tool-prepared
- net ToolChange iocontrol.0.tool-change turret.0.position-change
- net ToolChanged turret.0.position-changed iocontrol.0.tool-changed
- # decode turret encoder inputs
- newsig ones bit
- newsig twos bit
- newsig fours bit
- newsig eights bit
- linksp ones ppmc.0.din.06.in
- linksp ones wsum.0.bit.0.in
- linksp twos ppmc.0.din.07.in
- linksp twos wsum.0.bit.1.in
- linksp fours ppmc.0.din.08.in
- linksp fours wsum.0.bit.2.in
- linksp eights ppmc.0.din.09.in
- linksp eights wsum.0.bit.3.in
- # wsum.N.hold bit in
- newsig TurretCurrentPosition s32
- linksp TurretCurrentPosition wsum.0.sum
- linksp TurretCurrentPosition turret.0.position-current
- newsig TurretRequestedPosition s32
- linksp TurretRequestedPosition iocontrol.0.tool-prep-number
- linksp TurretRequestedPosition turret.0.position-requested
- setp turret.0.settle-stop [TURRET]STOP_SETTLE
- setp turret.0.settle-park [TURRET]PARK_SETTLE
- # connect turret to parallel port
- newsig TurretSeek bit
- linksp TurretSeek turret.0.seek
- linksp TurretSeek ppmc.0.dout.05.out
- newsig TurretStop bit
- linksp TurretStop turret.0.stop
- linksp TurretStop ppmc.0.dout.06.out
- #addf turret.0 servo-thread
- #Turret Info End
- # connect spindle fwd/rev to I/O controller
- newsig SpindleFwd bit
- newsig SpindleRev bit
- linksp SpindleFwd <= ppmc.0.dout.00.out
- linksp SpindleFwd => motion.spindle-forward
- linksp SpindleRev <= ppmc.0.dout.01.out
- linksp SpindleRev => motion.spindle-reverse
- # connect spindle brake to I/O controller
- newsig SpindleBrakeOn bit
- linksp SpindleBrakeOn <= ppmc.0.dout.02.out
- linksp SpindleBrakeOn => motion.spindle-brake
- # connect mist/flood coolant to I/O controller
- newsig MistOn bit
- newsig FloodOn bit
- linksp MistOn <= ppmc.0.dout.03.out
- linksp MistOn => iocontrol.0.coolant-mist
- linksp FloodOn <= parport.0.pin-02-out
- setp parport.0.pin-02-out-invert 1
- linksp FloodOn => iocontrol.0.coolant-flood
- # Line 159 ppmc.0.dout.04.out
- #parport.0.pin-02-out
- setp parport.0.pin-05-out-invert 1
- setp parport.0.pin-06-out-invert 1
- #Connect Verticle Slide switch
- #setp parport.0.pin-10-in
- net slide-input motion.digital-in-00 <= parport.0.pin-10-in
- # pull the CR-1 relay in when the Power Button is on JT
- net machine-power <= motion.motion-enabled =>
- # CR-1 Control Power
- net machine-power => parport.0.pin-01-out
- setp parport.0.pin-01-out-invert 1
- net brake-off => parport.0.pin-07-out
- #setp parport.0.pin-07-out-invert 1
- #File from email
- #set scale for 5000 RPM MAX and connect spindle speed to USC DAC
- setp ppmc.0.DAC8.00.scale 410.0
- net spinspeed motion.spindle-speed-out ppmc.0.DAC8.00.value
- #new info
- net spinraw ppmc.0.encoder.03.delta conv-s32-float.0.in
- net spinfloat conv-s32-float.0.out mult2.0.in0
- setp mult2.0.in1 0.273066667
- net SpindleRPM mult2.0.out motion.spindle-speed-in
- # 4.096 0.06826667 0.273066667
- #File from spin
- #set scale for 5000 RPM MAX and connect spindle speed to USC DAC
- #setp ppmc.0.DAC8.00.scale 500.0
- #newsig spinspeed float
- #linksp spinspeed <= motion.spindle-speed-out
- #linksp spinspeed => ppmc.0.DAC8.00.value
- #File from 2.3.5
- #setp ppmc.0.DAC8.00.scale 390.0
- #net spinspeed motiom.spindle-speed-out ppmc.0.DAC8.00.value
- #newsig spinspeed float
- #linksp spinspeed <= motion.spindle-speed-out
- #linksp spinspeed => ppmc.0.DAC8.00.value
- loadrt classicladder_rt
- addf classicladder.0.refresh servo-thread
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement