[Emc-users] [Fwd: [Fwd: Shared home and limit]]

2008-01-18 Thread Bjørn Kristiansen

---BeginMessage---

---BeginMessage---
Hello..
shared home and limit is no problem in EMC2, that's the config i use the
most on my machines. here is the pinout for an triac denford that i have
retrofitted. This config is using one pin for each axis with two NC
switches acting as limit, when homing you set home ignore limits in
the .ini file and if you want to home in negative direction you set - in
front of the homing speed in the .ini file.

I hope this will be helpfull.

Regards Bjørn..

--

# standard pinout config file for 3-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg=0x0378
#
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
linksp Xstep = parport.0.pin-06-out
linksp Xdir  = parport.0.pin-08-out
setp parport.0.pin-08-out-invert 1
linksp Ystep = parport.0.pin-04-out
linksp Ydir  = parport.0.pin-07-out
setp parport.0.pin-07-out-invert 1
linksp Zstep = parport.0.pin-05-out
linksp Zdir  = parport.0.pin-09-out

# create a signal for the estop loopback
linkpp iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

# create signals for tool loading loopback
linkpp iocontrol.0.tool-prepare iocontrol.0.tool-prepared
linkpp iocontrol.0.tool-change iocontrol.0.tool-changed

# create a signal for spindle on
newsig spindle-on bit
# connect the controller to it
linkps motion.spindle-on = spindle-on
# connect it to a physical pin

linksp spindle-on = parport.0.pin-03-out

###
### You might use something like this to enable chopper drives when
machine ON
### the Xen signal is defined in core_stepper.hal
###

linksp Xen = parport.0.pin-02-out

###
### If you want active low for this pin, invert it like this:
###

# setp parport.0.pin-01-out-invert 1

###
### A sample home switch on the X axis (axis 0).  make a signal,
### link the incoming parport pin to the signal, then link the signal
### to EMC's axis 0 home switch input pin
###


 newsig Xhome bit
 linkps parport.0.pin-10-in = Xhome
 linksp Xhome = axis.0.home-sw-in
 linksp Xhome = axis.0.neg-lim-sw-in
 linksp Xhome = axis.0.pos-lim-sw-in


 newsig Yhome bit
 linkps parport.0.pin-12-in = Yhome
 linksp Yhome = axis.1.home-sw-in
 linksp Yhome = axis.1.neg-lim-sw-in
 linksp Yhome = axis.1.pos-lim-sw-in


 newsig Zhome bit
 linkps parport.0.pin-13-in = Zhome
 linksp Zhome = axis.2.home-sw-in
 linksp Zhome = axis.2.neg-lim-sw-in
 linksp Zhome = axis.2.pos-lim-sw-in



###
### Shared home switches all on one parallel port pin?
### that's ok, hook the same signal to all the axes, but be sure to 
### set HOME_IS_SHARED and HOME_SEQUENCE in the ini file.  See the
### user manual!
###

# newsig homeswitches bit
# linkps parport.0.pin-10-in = homeswitches
# linksp homeswitches = axis.0.home-sw-in
# linksp homeswitches = axis.1.home-sw-in
# linksp homeswitches = axis.2.home-sw-in

###
### Sample separate limit switches on the X axis (axis 0)
###

## newsig X-neg-limit bit
## linkps parport.0.pin-10-in = X-neg-limit
## linksp X-neg-limit = axis.0.neg-lim-sw-in

## newsig X-pos-limit bit
## linkps parport.0.pin-10-in = X-pos-limit
## linksp X-pos-limit = axis.0.pos-lim-sw-in

###
### Just like the shared home switches example, you can wire together
### limit switches.  Beware if you hit one, EMC will stop but can't tell
### you which switch/axis has faulted.  Use caution when recovering from
this.
###


# newsig Xlimits bit
# linkps parport.0.pin-10-in = Xlimits
# linksp Xlimits = axis.0.neg-lim-sw-in
# linksp Xlimits = axis.0.pos-lim-sw-in


# newsig ylimits bit
# linkps parport.0.pin-12-in = Xlimits
# linksp ylimits = axis.0.neg-lim-sw-in
# linksp ylimits = axis.0.pos-lim-sw-in

# newsig zlimits bit
# linkps parport.0.pin-13-in = Xlimits
# linksp zlimits = axis.0.neg-lim-sw-in
# linksp zlimits = axis.0.pos-lim-sw-in


###
### you can also use the net syntax to accomplish the newsig and
link
### operations all at once.  This command does the same thing as the
above
### block.
###

# net Xlimits parport.0.pin-10-in = axis.0.neg-lim-sw-in
axis.0.pos-lim-sw-in
# net Ylimits parport.0.pin-12-in = axis.1.neg-lim-sw-in
axis.1.pos-lim-sw-in
# net Zlimits parport.0.pin-13-in = axis.2.neg-lim-sw-in
axis.2.pos-lim-sw-in
---End Message---
---End Message---
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] [Fwd: [Fwd: Shared home and limit]]

2008-01-18 Thread Chris Barker




Thank you, Bjorn,

I will look closely at your .ini file examples.
When I say 'shared home and limit' I mean physically the same switch. I
see that you address that.
This will give me something to start from .

Chris

Bjrn Kristiansen wrote:

  
  

  

Subject:

[Fwd: Shared home and limit]
  
  

From: 
Bjrn Kristiansen [EMAIL PROTECTED]
  
  

Date: 
Fri, 18 Jan 2008 23:25:07 +0100
  
  

To: 
"Enhanced Machine Controller (EMC)"
emc-users@lists.sourceforge.net
  

  
  

  

To: 
"Enhanced Machine Controller (EMC)"
emc-users@lists.sourceforge.net
  

  
  
  
  
  

  

Subject:

Shared home and limit
  
  

From: 
Bjrn Kristiansen [EMAIL PROTECTED]
  
  

Date: 
Fri, 18 Jan 2008 23:09:49 +0100
  
  

To: 
[EMAIL PROTECTED]
  

  
  

  

To: 
[EMAIL PROTECTED]
  

  
  
  Hello..
shared home and limit is no problem in EMC2, that's the config i use the
most on my machines. here is the pinout for an triac denford that i have
retrofitted. This config is using one pin for each axis with two NC
switches acting as limit, when homing you set "home ignore limits in
the .ini file and if you want to home in negative direction you set - in
front of the homing speed in the .ini file.

I hope this will be helpfull.

Regards Bjrn..

--

# standard pinout config file for 3-axis steppers
# using a parport for I/O
#
# first load the parport driver
loadrt hal_parport cfg="0x0378"
#
# next connect the parport functions to threads
# read inputs first
addf parport.0.read base-thread 1
# write outputs last
addf parport.0.write base-thread -1
#
# finally connect physical pins to the signals
linksp Xstep = parport.0.pin-06-out
linksp Xdir  = parport.0.pin-08-out
setp parport.0.pin-08-out-invert 1
linksp Ystep = parport.0.pin-04-out
linksp Ydir  = parport.0.pin-07-out
setp parport.0.pin-07-out-invert 1
linksp Zstep = parport.0.pin-05-out
linksp Zdir  = parport.0.pin-09-out

# create a signal for the estop loopback
linkpp iocontrol.0.user-enable-out iocontrol.0.emc-enable-in

# create signals for tool loading loopback
linkpp iocontrol.0.tool-prepare iocontrol.0.tool-prepared
linkpp iocontrol.0.tool-change iocontrol.0.tool-changed

# create a signal for "spindle on"
newsig spindle-on bit
# connect the controller to it
linkps motion.spindle-on = spindle-on
# connect it to a physical pin

linksp spindle-on = parport.0.pin-03-out

###
### You might use something like this to enable chopper drives when
machine ON
### the Xen signal is defined in core_stepper.hal
###

linksp Xen = parport.0.pin-02-out

###
### If you want active low for this pin, invert it like this:
###

# setp parport.0.pin-01-out-invert 1

###
### A sample home switch on the X axis (axis 0).  make a signal,
### link the incoming parport pin to the signal, then link the signal
### to EMC's axis 0 home switch input pin
###


 newsig Xhome bit
 linkps parport.0.pin-10-in = Xhome
 linksp Xhome = axis.0.home-sw-in
 linksp Xhome = axis.0.neg-lim-sw-in
 linksp Xhome = axis.0.pos-lim-sw-in


 newsig Yhome bit
 linkps parport.0.pin-12-in = Yhome
 linksp Yhome = axis.1.home-sw-in
 linksp Yhome = axis.1.neg-lim-sw-in
 linksp Yhome = axis.1.pos-lim-sw-in


 newsig Zhome bit
 linkps parport.0.pin-13-in = Zhome
 linksp Zhome = axis.2.home-sw-in
 linksp Zhome = axis.2.neg-lim-sw-in
 linksp Zhome = axis.2.pos-lim-sw-in



###
### Shared home switches all on one parallel port pin?
### that's ok, hook the same signal to all the axes, but be sure to 
### set HOME_IS_SHARED and HOME_SEQUENCE in the ini file.  See the
### user manual!
###

# newsig homeswitches bit
# linkps parport.0.pin-10-in = homeswitches
# linksp homeswitches = axis.0.home-sw-in
# linksp homeswitches = axis.1.home-sw-in
# linksp homeswitches = axis.2.home-sw-in

###
### Sample separate limit switches on the X axis (axis 0)
###

## newsig X-neg-limit bit
## linkps parport.0.pin-10-in = X-neg-limit
## linksp X-neg-limit = axis.0.neg-lim-sw-in

## newsig X-pos-limit bit
## linkps parport.0.pin-10-in = X-pos-limit
## linksp X-pos-limit = axis.0.pos-lim-sw-in

###
### Just like the shared home switches example, you can wire together
### limit switches.  Beware if you hit one, EMC will stop but can't tell
### you which switch/axis has faulted.  Use caution when recovering from
this.
###


# newsig Xlimits bit
# linkps parport.0.pin-10-in = Xlimits
# linksp Xlimits = axis.0.neg-lim-sw-in
# linksp Xlimits = axis.0.pos-lim-sw-in


# newsig ylimits bit
# linkps parport.0.pin-12-in = Xlimits
# linksp ylimits = axis.0.neg-lim-sw-in
# linksp ylimits = axis.0.pos-lim-sw-in

# newsig zlimits bit
# linkps parport.0.pin-13-in = Xlimits
# linksp zlimits =