#$Id: bridgeportS2I2_postgui.hal,v 1.4 2010/01/17 21:16:18 zephyr Exp $ ################################################################################ # loadrt mux2 names=umux1 loadrt mux4 names=umux2 loadrt edge names=edgedet1,edgedet2 loadrt sum2 names=usum1 loadrt or2 names=uor1,uor2,uor3,uor4 loadrt mult2 names=umult1,umult2,umult3 loadrt limit1 names=ulimit1 loadrt updown names=ucount1 loadrt knob2float names=ub2f1,ub2f2 addf umux1 servo-thread addf uor1 servo-thread addf uor2 servo-thread addf uor3 servo-thread addf uor4 servo-thread addf umult1 servo-thread addf umult2 servo-thread addf umult3 servo-thread addf edgedet1 servo-thread addf edgedet2 servo-thread addf umux2 servo-thread addf ulimit1 servo-thread addf usum1 servo-thread addf ucount1 servo-thread addf ub2f1 servo-thread addf ub2f2 servo-thread ############################################################################## # # Joy Stick Velcoity Controls # _______ _________ # pyvcp.vcpMkey-----| OR | | EDGE | # (pyvcpMkey) | uor1 |-------------| edgedet1|------------------- # input.0.key-m-----|_______| (mkeyOred) |_________| (mKeyEdgeOut) | # (mkey) | # _______ _________ | # pyvcp.vcpNkey-----| OR | | EDGE | | # (pyvcpNkey) | uor2 |-------------| edgedet2|---------------| | # input.0.key-n-----|_______| (nkeyOred) |_________| (nKeyEdgeOut) | | # (nkey) | | # ------------------------------------ | # | --------------------------------- # __|_____|____ # | Sel1 Sel0 | # 0-------|0 | # _ | | # / \ | | # 0.125 -----| X |---------|1 | # (SlowJogInc) \ _ / | mux4 | # | umult1 | umux2 | # | | | # ------| | |------- # umult2 _ | | | |(MuxOut) # / \ | | | | # -0.125 -----| X |---------|2 | | # (SlowJogDec) \ _ / | | | | # | | | | | # | | 0--|3 | | # ------* |_____________| | # | _|_ _________ # | / \ | limit1 | # | --------------| + |-----| ulimit1 |----- # | | \ _ / |_________| | # | | sum2 | # | | usum1 | # | | | # *----------*----------------*------------------------ # | pyvcp.JogSpeed | # _|_ (SlowJogSpeedValuemm) | # / \ | # 0.039370079---| X |---pyvcp.JogSpeedin | (JoyRapidDB) # (MetricToInch) \ _ / (SlowJogSpeedValuein) | | # umult3 | _____|___ # | | SEL | # ---|0 |# | mux2 | # 4800-----------------|1 umux1 |--halui.jogspeed # (FastJogSpeed) | | (JogSpeed) # |_________| setp usum1.gain0 1 setp usum1.gain1 1 setp usum1.offset 0 setp edgedet1.in-edge FALSE setp edgedet1.out-width-ns 10000 setp edgedet2.in-edge FALSE setp edgedet2.out-width-ns 10000 setp ulimit1.min 1 setp ulimit1.max 4800 newsig SlowJogInc float newsig SlowJogDec float newsig MetricToInch float sets MetricToInch 0.039370079 net MetricToInch umult3.in0 sets SlowJogInc .125 sets SlowJogDec -.125 setp umux2.in0 0 setp umux2.in3 0 net pyvcpMkey pyvcp.vcpMkey uor1.in0 net mkey input.0.key-m uor1.in1 net pyvcpNkey pyvcp.vcpNkey uor2.in0 net nkey input.0.key-n uor2.in1 net mkeyOred uor1.out edgedet1.in net nkeyOred uor2.out edgedet2.in net mkeyEdgeOut edgedet1.out umux2.sel0 net nkeyEdgeOut edgedet2.out umux2.sel1 net SlowJogInc umult1.in0 net SlowJogIncM umult1.out umux2.in1 net SlowJogDec umult2.in0 net SlowJogDecM umult2.out umux2.in2 net MuxOut umux2.out usum1.in1 net SlowJogSpeedValueRaw usum1.out ulimit1.in net SlowJogSpeedValuemm usum1.in0 pyvcp.JogSpeed ulimit1.out umult1.in1 umult2.in1 umult3.in1 umux1.in0 net SlowJogSpeedValuein umult3.out pyvcp.JogSpeedin net Joy_Rapid debounce.0.3.in net Joy_RapidDb debounce.0.3.out umux1.sel net JogSpeed umux1.out halui.jog-speed newsig FastJogSpeed float sets FastJogSpeed 4800 net FastJogSpeed umux1.in1 # # Jog controls # net XJoyPDb debounce.1.0.out => halui.jog.0.plus net XJoyNDb debounce.1.1.out => halui.jog.0.minus net YJoyPDb debounce.1.2.out => halui.jog.1.plus net YJoyNDb debounce.1.3.out => halui.jog.1.minus net ZJoyPDb debounce.1.4.out => halui.jog.2.plus net ZJoyNDb debounce.1.5.out => halui.jog.2.minus net Joy_Rapid => debounce.0.3.in net Joy_RapidDb debounce.0.3.out => umux1.sel # ############################################################################### # # Hand Wheel Gain Controls # _______ _________ # pyvcp.vcpHkey-----| OR | | | # (pyvcpHkey) | uor3 |------------|up | # input.0.key-h-----|_______| (hkeyOred) | | # (hkey) | updown |------ # _______ | ucount1 | | # pyvcp.vcpGkey-----| OR | | | | # (pyvcpGkey) | uor4 |------------|dn | | # input.0.key-g-----|_______| (gkeyOred) |_________| | # (gkey) | # | # ------------------------ # | ___________ # | |knob2float | # *------| ub2f1 |-----axis.0.jog-scale # | |___________| axis.1.jog-scale # | axis.2.jog-scale # | ___________ # | |knob2float | # -------| ub2f2 |-----pyvcp.JogWheelGain # |___________| # setp ucount1.clamp TRUE setp ucount1.wrap FALSE setp ucount1.max 10 setp ucount1.min 1 setp ub2f1.scale 0.00001 setp ub2f1.enable TRUE setp ub2f2.scale 1 setp ub2f2.enable TRUE setp ub2f2.max-out 10 # net pyvcpHkey pyvcp.vcpHkey uor3.in0 net hkey input.0.key-h uor3.in1 net pyvcpGkey pyvcp.vcpGkey uor4.in0 net gkey input.0.key-g uor4.in1 net hkeyOred uor3.out ucount1.countup net gkeyOred uor4.out ucount1.countdown net EncoderIntGain ucount1.count ub2f1.counts ub2f2.counts net EncoderFltGain ub2f2.out pyvcp.JogWheelGain net EncoderFltGainSc ub2f1.out axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale # # handwheel gain net JogX axisui.jog.x => axis.0.jog-enable net JogY axisui.jog.y => axis.1.jog-enable net JogZ axisui.jog.z => axis.2.jog-enable ################################################################### # net ProgIsPaused pyvcp.Paused ######################################################## # # Inputs to Controller From Bridegport Buttons and Relays # Connect to pyvcp as needed # net X_home_switch_P => pyvcp.led_48 #net Cycle_Start => pyvcp.led_49 net Y_home_switch_P => pyvcp.led_50 #net EstopAndFeedEnable => pyvcp.led_51 net Z_home_switch_P => pyvcp.led_52 #net Cycle_Stop => pyvcp.led_53 #net Z_Joy_N => pyvcp.led_54 #net X_Joy_P => pyvcp.led_55 #net Z_Joy_P => pyvcp.led_56 #net X_Joy_N => pyvcp.led_57 #net Joy_Rapid => pyvcp.led_58 #net Y_Joy_P => pyvcp.led_59 # net SPARE => pyvcp.led_60 #net Y_Joy_N => pyvcp.led_61 net 24_volts => pyvcp.led_62 #net FunctionVerify => pyvcp.led_63 # ####################################################### # clear watchdog # setp hm2_5i20.0.watchdog.has_bit FALSE #newsig JogScale float #sets JogScale .00002 #net JogScale => axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale #$Log: bridgeportS2I2_postgui.hal,v $ #Revision 1.4 2010/01/17 21:16:18 zephyr #added ascii art # #Revision 1.3 2010/01/17 18:51:01 zephyr #Jog and Encoder gain controlls # #Revision 1.2 2010/01/14 00:46:16 zephyr #first working version #