rozważania o CNC

OPROGRAMOWNIE => EMC2 => Wątek zaczęty przez: markcomp Listopada 29, 2014, 09:52:35



Tytuł: HOMING
Wiadomość wysłana przez: markcomp Listopada 29, 2014, 09:52:35
HOMING



więcej na temat:
http://linuxcnc.org/docs/html/config/ini_homing.html




Homing Sequence

There are four possible homing sequences defined by the sign of SEARCH_VEL and LATCH_VEL, along with the associated configuration parameters as shown in the following table. Two basic conditions exist, SEARCH_VEL and LATCH_VEL are the same sign or they are opposite signs. For a more detailed description of what each configuration parameter does, see the following section.

(http://linuxcnc.org/docs/html/config/images/emc2-motion-homing-diag.png)



Tytuł: Odp: HOMING
Wiadomość wysłana przez: markcomp Listopada 29, 2014, 10:10:50
O sposobie osiągania pozycji zerowej decydujemy w stepconfie przyporządkowując wejściom "limity i bazujące".

Jeśli chcemy aby bazowanie było na krańcówkach na jednej linii to wybieramy
np. Pin 10: Wszystkie limity i bazujace

wygenerowany plik *.ini ze zmiennymi okreslającymi zachowanie kontrolera ruchu w częsci opisującej oś pierwszą:

Kod:
[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
STEPGEN_MAXACCEL = 937.5
SCALE = 80.0
FERROR = 1
MIN_FERROR = .25
MIN_LIMIT = -0.001
MAX_LIMIT = 200.0
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 1.500000
HOME_LATCH_VEL = 1.500000
HOME_SEQUENCE = 1

o bazowaniu decydują ostatnie trzy zmienne:

HOME_SEARCH_VEL = 1.500000
Cytuj
This variable has units of machine-units per second.
The default value is zero. A value of zero causes LinuxCNC to assume that there is no home switch; the search stage of homing is skipped.
If HOME_SEARCH_VEL is non-zero, then LinuxCNC assumes that there is a home switch. It begins by checking whether the home switch is already tripped. If tripped it backs off the switch at HOME_SEARCH_VEL. The direction of the back-off is opposite the sign of HOME_SEARCH_VEL. Then it searches for the home switch by moving in the direction specified by the sign of HOME_SEARCH_VEL, at a speed determined by its absolute value. When the home switch is detected, the joint will stop as fast as possible, but there will always be some overshoot. The amount of overshoot depends on the speed. If it is too high, the joint might overshoot enough to hit a limit switch or crash into the end of travel. On the other hand, if HOME_SEARCH_VEL is too low, homing can take a long time.

HOME_LATCH_VEL = 1.500000
Cytuj
This variable has units of machine-units per second.
Specifies the speed and direction that LinuxCNC uses when it makes its final accurate determination of the home switch (if present) and index pulse location (if present). It will usually be slower than the search velocity to maximize accuracy. If HOME_SEARCH_VEL and HOME_LATCH_VEL have the same sign, then the latch phase is done while moving in the same direction as the search phase. (In that case, LinuxCNC first backs off the switch, before moving towards it again at the latch velocity.) If HOME_SEARCH_VEL and HOME_LATCH_VEL have opposite signs, the latch phase is done while moving in the opposite direction from the search phase. That means LinuxCNC will latch the first pulse after it moves off the switch. If HOME_SEARCH_VEL is zero (meaning there is no home switch), and this parameter is nonzero, LinuxCNC goes ahead to the index pulse search. If HOME_SEARCH_VEL is non-zero and this parameter is zero, it is an error and the homing operation will fail. The default value is zero.

HOME_SEQUENCE = 1
Cytuj
Used to define a multi-axis homing sequence HOME ALL and enforce homing order (e.g., Z may not be homed if X is not yet homed). An axis may be homed after all axes with a lower HOME_SEQUENCE have already been homed and are at the HOME_OFFSET. If two axes have the same HOME_SEQUENCE, they may be homed at the same time. If HOME_SEQUENCE is -1 or not specified then this joint will not be homed by the HOME ALL sequence. HOME_SEQUENCE numbers start with 0 and there may be no unused numbers.

wybrana przez te trzy zmienne konfiguracja (patrz tabelka) to Switch-only.

(http://markcomp77.p9.pl/img/homing-bazujace-limity-razem.jpg)




Tytuł: Odp: HOMING
Wiadomość wysłana przez: markcomp Listopada 29, 2014, 10:48:22
dodatki do HALa przy konfiguracji  "Pin 10: Wszystkie limity i bazujace"

Kod:
loadrt lut5

addf lut5.0 servo-thread

net all-limit-home <= parport.0.pin-10-in-not
setp lut5.0.function 0x10000
net all-limit-home => lut5.0.in-4
net all-limit <= lut5.0.out
net homing-x <= axis.0.homing => lut5.0.in-0
net homing-y <= axis.1.homing => lut5.0.in-1
net homing-z <= axis.2.homing => lut5.0.in-2

net all-limit-home => axis.0.home-sw-in
net all-limit => axis.0.neg-lim-sw-in
net all-limit => axis.0.pos-lim-sw-in

net all-limit-home => axis.1.home-sw-in
net all-limit => axis.1.neg-lim-sw-in
net all-limit => axis.1.pos-lim-sw-in

net all-limit-home => axis.2.home-sw-in
net all-limit => axis.2.neg-lim-sw-in
net all-limit => axis.2.pos-lim-sw-in

wyjaśnienie lua5
http://linuxcnc.org/docs/html/man/man9/lut5.9.html


Tytuł: Odp: HOMING
Wiadomość wysłana przez: markcomp Listopada 29, 2014, 11:24:05
Wszystko co konieczne do poprawnego bazowania robi StepConf.
Można ew. nadać jakies wartości dla zmiennych: HOME i HOME_OFFSET...

Cytuj
HOME_OFFSET
Contains the location of the home switch or index pulse, in joint coordinates. It can also be treated as the distance between the point where the switch or index pulse is latched and the zero point of the joint. After detecting the index pulse, LinuxCNC sets the joint coordinate of the current point to HOME_OFFSET. The default value is zero.

HOME
The position that the joint will go to upon completion of the homing sequence. After detecting the index pulse, and setting the coordinate of that point to HOME_OFFSET, LinuxCNC makes a move to HOME as the final step of the homing process. The default value is zero. Note that even if this parameter is the same as HOME_OFFSET, the joint will slightly overshoot the latched position as it stops. Therefore there will always be a small move at this time (unless HOME_SEARCH_VEL is zero, and the entire search/latch stage was skipped). This final move will be made at the joint’s maximum velocity. Since the joint is now homed, there should be no risk of crashing the machine, and a rapid move is the quickest way to finish the homing sequence.