[Emc-users] Need help getting my machine to work.

2007-08-13 Thread Sven Mueller
Hi.

I really don't know why this isn't working as it should, so I really
need some help here. I have taken the default stepper.ini and pinout.hal
files (both from the stepper directory) and adjusted them to my machine.
The files contain test in them since I intentionally didn't configure
homing on any axis. I first want to get the configuration to actually
move anything at first.

So the machine is a Proxxon MF-70 with steppers on each axis. The
steppers are driven by a 3D-Step from nc-step.de (documentation in
german only at http://nc-step.de/pdf/3dstep_doku_27.pdf).

The pinout on the parallel port is as follows:

Pin Meaning PC-view
1   spindle out
2   direction X out
3   clock/step Xout
4   direction Y out
5   clock/step Yout
6   dir Z   out
7   clock/step Zout
8   optional dir C  out
9   optional clock Cout
10  End/Reference Z in
11  Enable  in (triggered to low by emergency stop)
12  End/Reference Y in
13  End/Reference X in
14  coolant out
15  opt. End/Ref. C in
16  Boost   out
17  Sleep   out (active low)

The machine has 400 steps per millimeter on each axis.
The controlling computer is an ALIX.1b from pcengines.ch, the parallel
port works as I have verified with an evaluation copy of PC/NC from
lewetz.de. The latency tests looked fine, even while moving windows
around on the X desktop using a USB mouse. No overruns, lat_max and
ovl_max where always under 25000 (as you can see in the configs, I have
BASE_PERIOD at 5). IIUIC, the current configuration would give us
movement speeds of up to 25mm/sec, but the machine actually can't move
much faster than 8mm/sec (we had successful moves at 7mm/sec but didn't
try much more since we had problems moving faster than 4mm/sec with the
previous SMC800 controller), so we have some headroom here to make
BASE_PERIOD even longer.

My current config I have is attached.

Symptoms I see are basically that I can't get the steppers to turn using
the following procedure:
start tkemc
disable estop
power on machine
use manual movement

What I get if I keep my finger on the keys to move an axis, I get a
joint following error after a few seconds.

As I currently don't have the machine within reach, I'm not 100% sure
wether the enabling of the controller works or wether that already
causes the steppers not to move. But with an open loop system, I still
wonder where the following error comes from.

regards,
Sven

PS: I also attached the configs I would use with homing enabled, but
these might be outdated compared to the stepper_test.ini/test_pinout.hal
files and are just there for reference.
PPS: emc2 warns that the block statements are deprecated, but I'm not
sure how I would go about replacing them. The or2 block seems to be
quite ok for the goal I want to achieve.
# local pinout config file for 3-axis steppers
# using a parport for I/O
#
# load two or2 blocks
loadrt blocks or2=2
#
# 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-03-out
linksp Xdir  = parport.0.pin-02-out
linksp Ystep = parport.0.pin-05-out
linksp Ydir  = parport.0.pin-04-out
linksp Zstep = parport.0.pin-07-out
linksp Zdir  = parport.0.pin-06-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-01-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-01-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-13-in = Xhome
linksp Xhome = axis.0.home-sw-in

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

newsig Zhome bit
linkps parport.0.pin-10-in = Zhome
linksp Zhome = axis.0.home-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 

Re: [Emc-users] Need help getting my machine to work.

2007-08-13 Thread John Kasunich
Sven Mueller wrote:
 Hi.
 
 I really don't know why this isn't working as it should, so I really
 need some help here. I have taken the default stepper.ini and pinout.hal
 files (both from the stepper directory) and adjusted them to my machine.
 The files contain test in them since I intentionally didn't configure
 homing on any axis. I first want to get the configuration to actually
 move anything at first.
 
snip

 Symptoms I see are basically that I can't get the steppers to turn using
 the following procedure:
 start tkemc
 disable estop
 power on machine
 use manual movement
 
 What I get if I keep my finger on the keys to move an axis, I get a
 joint following error after a few seconds.

Following error on a stepper machine means either the step generators
aren't properly connected to the rest of EMC, or they aren't getting 
enabled, or their limits are set too low and they can't keep up with
the commands that EMC is sending.

 As I currently don't have the machine within reach, I'm not 100% sure
 wether the enabling of the controller works or wether that already
 causes the steppers not to move. But with an open loop system, I still
 wonder where the following error comes from.
 

Found the problem:

The following is in your pinout file:

 net Xenable axis.0.amp-enable-out = or2.0.in0
 net Yenable axis.1.amp-enable-out = or2.0.in1
 net XYenable or2.0.out = or2.1.in0
 net Zenable axis.2.amp-enable-out = or2.1.in1
 net AMPenable or2.1.out = parport.0.pin-17-out

You are creating your own enable signals for each axis.  However, there 
are already enable signals, created by the following in core_stepper.hal:

 # connect enable signals for step generators
 newsig Xen bit
 linksp Xen = axis.0.amp-enable-out
 linksp Xen = stepgen.0.enable
 newsig Yen bit
 linksp Yen = axis.1.amp-enable-out
 linksp Yen = stepgen.1.enable
 newsig Zen bit
 linksp Zen = axis.2.amp-enable-out
 linksp Zen = stepgen.2.enable

When you connect the signal Xenable to axis.0.amp-enable-out, that
_disconnects_ the signal Xen from axis.0.amp-enable-out (you can only
have one signal connected to a pin, but you can have many pins connected
to a signal).  With Xen disconnected from axis.0.amp-enable-out, its
value is always zero (false), and therefore the pin stepgen.0.enable
never turns on.

You really don't even need the OR gates to make a master AMP enable,
since all three axis enables turn on and off at the same time.  You
can just use any one of them.  The sample pinout.hal file recommends
that:

 ###
 ### 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-01-out

Since your amp enable is on pin 17, you can just uncomment that line
and change the pin number:

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

If for some reason you do want to keep using the OR gates, you should
use the existing Xen, Yen, and Zen signals instead of creating your own.
Just add the OR gate pins to those signals, as follows:

linksp Xen or2.0.in0
linksp Yen or2.0.in1
net XYenable or2.0.out = or2.1.in0
linksp Zen or2.1.in1
net AMPenable or2.1.out = parport.0.pin-17-out

Hope this helps, please let us know either way.

Regards,

John Kasunich









-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users