Changes between Version 2 and Version 3 of Maschinen/CncFräse/JogBox


Ignore:
Timestamp:
Nov 15, 2009, 9:42:32 PM (13 years ago)
Author:
roh
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Maschinen/CncFräse/JogBox

    v2 v3  
    3232loadrt knob2float count=1
    3333
     34#####jogpad########
     35# in: 6x encoder + pyvcp enable  out: 3 axis jog, speed, pyvcp speed, feed and spindle override
     36
     37net jogdev-enable <= pyvcp.jogdevice-enable
     38net wheel-2-limit => pyvcp.jogdevice-speed
     39
     40# this enables 5V on pin 1, which is used to source the pullups
     41setp parport.2.pin-01-out TRUE
     42
     43# swap A and B here if you need to change the direction
     44# this connects parport pins to the encoder hal component
     45net wheel-0-a encoder.0.phase-B <= parport.2.pin-02-in-not
     46net wheel-0-b encoder.0.phase-A <= parport.2.pin-03-in-not
     47net wheel-1-a encoder.1.phase-B <= parport.2.pin-04-in-not
     48net wheel-1-b encoder.1.phase-A <= parport.2.pin-05-in-not
     49net wheel-2-a encoder.2.phase-B <= parport.2.pin-06-in-not
     50net wheel-2-b encoder.2.phase-A <= parport.2.pin-07-in-not
     51net wheel-3-a encoder.3.phase-B <= parport.2.pin-08-in-not
     52net wheel-3-b encoder.3.phase-A <= parport.2.pin-09-in-not
     53net wheel-4-a encoder.4.phase-B <= parport.2.pin-10-in-not
     54net wheel-4-b encoder.4.phase-A <= parport.2.pin-11-in-not
     55net wheel-5-a encoder.5.phase-B <= parport.2.pin-12-in-not
     56net wheel-5-b encoder.5.phase-A <= parport.2.pin-13-in-not
     57
     58# one click is one step
     59setp encoder.0.x4-mode FALSE
     60setp encoder.1.x4-mode FALSE
     61setp encoder.2.x4-mode FALSE
     62setp encoder.3.x4-mode FALSE
     63setp encoder.4.x4-mode FALSE
     64setp encoder.5.x4-mode FALSE
     65
     66# default for 'how big is one step'
     67setp halui.spindle-override.scale 0.01
     68setp halui.feed-override.scale 0.10
     69
     70# connect feed and spindle overrides
     71net wheel-0 halui.feed-override.counts <= encoder.0.counts
     72net wheel-1 halui.spindle-override.counts <= encoder.1.counts
     73
     74# use knob2float to limit the range of 'how big is one step'
     75setp knob2float.0.scale 0.001
     76setp knob2float.0.enable TRUE
     77setp knob2float.0.min-out 0.0
     78setp knob2float.0.max-out 1.0
     79net wheel-2 <= encoder.2.counts
     80net wheel-2 => knob2float.0.counts
     81net wheel-2-limit <= knob2float.0.out
     82net wheel-2-limit => axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale
     83
     84# connect the 3 jog axis to encoders
     85net wheel-3 axis.2.jog-counts <= encoder.3.counts
     86net wheel-4 axis.0.jog-counts <= encoder.4.counts
     87net wheel-5 axis.1.jog-counts <= encoder.5.counts
     88
     89# connect the enable checkbox to the axis
     90net jogdev-enable => axis.0.jog-enable axis.1.jog-enable axis.2.jog-enable
     91
     92# enable vel-mode for the 3 axis
     93setp axis.0.jog-vel-mode TRUE
     94setp axis.1.jog-vel-mode TRUE
     95setp axis.2.jog-vel-mode TRUE
     96
    3497}}}
    3598