Forums » Discussion and support »
Homing
Added by arc310 almost 11 years ago
Hi
I have a problem with homing on my HX3040 :
It seems to go OK (Y axis to the endswitch, then X), but then the movement starts again in the same direction and crashes in the axisends.
my config.txt :
net.ip 192.168.0.111 ; IP address [xxx.xxx.xxx.xxx]
net.netmask 255.255.255.0 ; netmask [xxx.xxx.xxx.xxx]
net.gateway 192.168.0.254 ; gateway
net.dns 192.168.0.254 ; DNS server
net.dhcp 0 ; Enable DHCP for IP address [0/1]
net.port 69 ; Communication socket port number []
sys.debug 3 ; debug flags bit0=verbose,
; bit1=log to serial, bit2=log to file
sys.autohome 0 ; Enable automatic homing at startup [1/0]
;(or wait for cover to close)
sys.nodisplay 0 ; Disable the display [1/0]
sys.i2cbaud 0 ; I2C display baudrate [Hz]
laser.enable 0 ; Laser enable signal polarity [0/1]
laser.on 0 ; Laser on signal polarity [0/1]
laser.pwm.min 90 ; minimum pwm value [%]
laser.pwm.max 0 ; maximum pwm value [%]
laser.pwm.freq 1000 ; pwm frequency [Hz]
motion.enable 0 ; Enable signal state to enable motors [0/1]
motion.homespeed 500 ; Homing speed [mm/sec]
motion.speed 50 ; max linear speed [mm/sec]
motion.accel 200 ; linear acceleration [mm/sec2]
motion.tolerance 100 ; tolerance [1/1000 units]
; old firmware: set speed in [usec]
motion.highspeed 100 ; speed in [usec]
; Next values are valid for axis x,y,z and e
x.pol 1 ; home/limit sensor polarity [1/0]
x.scale -158516 ; axis scaling [steps/meter]
; use negative number to invert direction [1/0]
x.homedir 1 ; state of the direction signal when homing
x.home 392000 ; home positions [um]
x.min 0 ; minimal position [um]
x.max -300000 ; maximum position [um]
x.rest 1000 ; rest position [um]
x.speed 100 ; maximum speed [mm/sec]
x.invert 1 ; Invert signal polarity for step signal [1/0]
; Now for the Y-axis:
y.pol 0 ; home/limit sensor polarity [1/0]
y.scale -158516 ; axis scaling [steps/meter]
; use negative number to invert direction [1/0]
y.homedir 1 ; state of the direction signal when homing
y.home -15000 ; home positions [um]
y.min 0 ; minimal position [um];
y.max 200000 ; maximum position [um]
y.rest 1000 ; rest position [um]
y.speed 100 ; maximum speed [mm/sec]
y.invert 1 ; Invert signal polarity for step signal [1/0]
Replies (4)
RE: Homing - Added by jaap almost 11 years ago
You define x.max as -300000 and x.home as +392000, this cannot be correct.
For starters, x.max should be positive. If your home position is in the upper right corner, x.home=392000 is correct, but if your homing is left, x.home should be -1000.
RE: Homing - Added by arc310 almost 11 years ago
Hi, thanks for your reply
Here is my setup :
X and Y are swapped (compared to a HPC3020) : I swapped the pin definitions in LaosMotion.cpp
With the above config.txt, I can control the head using the I2C panel (ie left moves the head left, up is up and so on)
I read somewhere that x.min and x.max (and for y axis) were not used at the moment, so I didn't bother with them.
What I didn't get so far is :
- What are the numbers displayed supposed to be on the I2C panel ? Micrometers ?
- the use of negative numbers to invert direction, is it for scale only (ie the x.home being negative means that the home is on the left of a 0 position) or for scale and positions (x.home negative with a negative scale means that is is on the right)
RE: Homing - Added by arc310 almost 11 years ago
OK, my mistake :
I forgot to swap the pins for xhome and yhome in LaosMotion.cpp
Things run much better now...
Still experimenting with config.txt, but no more endcrashes :-)
RE: Homing - Added by arc310 almost 11 years ago
OK,
So here is my config.txt.
It works Ok, but I had to change the effect of the joystick (up was moving down, and down was up) in software.
; ; Config file for HPC laser LS-3020 ; ; for the version with flatcable and 26x32 honeycomb ; as distributed in may 2012 ; ; configuration made by Jaap Vermaas <jaap@tuxic.nl> ; ; Save on MBED in the root, as "config.txt" ; net.ip 192.168.0.111 ; IP address [xxx.xxx.xxx.xxx] net.netmask 255.255.255.0 ; netmask [xxx.xxx.xxx.xxx] net.gateway 192.168.0.254 ; gateway net.dns 192.168.0.254 ; DNS server net.dhcp 0 ; Enable DHCP for IP address [0/1] net.port 69 ; Communication socket port number [] sys.debug 3 ; debug flags bit0=verbose, ; bit1=log to serial, bit2=log to file sys.autohome 1 ; Enable automatic homing at startup [1/0] ;(or wait for cover to close) sys.nodisplay 0 ; Disable the display [1/0] sys.i2cbaud 0 ; I2C display baudrate [Hz] laser.enable 0 ; Laser enable signal polarity [0/1] laser.on 0 ; Laser on signal polarity [0/1] laser.pwm.min 0 ; minimum pwm value [%] laser.pwm.max 90 ; maximum pwm value [%] laser.pwm.freq 10000 ; pwm frequency [Hz] motion.enable 0 ; Enable signal state to enable motors [0/1] motion.homespeed 50 ; Homing speed [mm/sec] motion.speed 100 ; max linear speed [mm/sec] motion.accel 300 ; linear acceleration [mm/sec2] motion.tolerance 100 ; tolerance [1/1000 units] ; old firmware: set speed in [usec] motion.highspeed 100 ; speed in [usec] ; Next values are valid for axis x,y,z and e x.pol 1 ; home/limit sensor polarity [1/0] x.scale -158516 ; axis scaling [steps/meter] ; use negative number to invert direction [1/0] x.homedir 1 ; state of the direction signal when homing x.home -3500 ; home positions [um] x.min 0 ; minimal position [um] x.max 400000 ; maximum position [um] x.rest 430000 ; rest position [um] x.speed 100 ; maximum speed [mm/sec] x.invert 1 ; Invert signal polarity for step signal [1/0] ; Now for the Y-axis: y.pol 1 ; home/limit sensor polarity [1/0] y.scale 158516 ; axis scaling [steps/meter] ; use negative number to invert direction [1/0] y.homedir 1 ; state of the direction signal when homing y.home 377500 ; home positions [um] y.min 0 ; minimal position [um]; y.max 360000 ; maximum position [um] y.rest 350000 ; rest position [um] y.speed 1000 ; maximum speed [mm/sec] y.invert 1 ; Invert signal polarity for step signal [1/0] ; Z-axis not in use for HPC ; z.min 0 ; z.max 200000 ; z.home 100000