Hello Guest it is April 19, 2024, 02:29:46 AM

Author Topic: macro for homing  (Read 19747 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: macro for homing
« Reply #20 on: February 16, 2015, 07:13:59 AM »
Hi riporeno

how can I disable
the signal of the axis limits with the macro language.?

not sure why you want to do this, because if limit's and
reference switch are configured for the the same pin,
it's doing reference first.
regarding to your macro, why dont you do a refernce with
high speed (on normal switch), the do a other one with
1/10 of the origin speed ?


also you can change the feed value set maximum motor tuning in?
(with macro language)

just use G1 F*********instead of G0.

Thomas


« Last Edit: February 16, 2015, 07:16:20 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: macro for homing
« Reply #21 on: February 16, 2015, 03:35:53 PM »
hi TPS
hello
the first fast movement is done in g code faster until the arrival on the micro
then executes the homing to minimum speed (1% of max speed) ..but is still too high.
as you say it would be good.
G1F move ... until it finds the second reference.
How do I say to stop the signal (Home) and then reset the axis and make green LED reset occurred?
All this without calling DoButton (23). 22 etc. etc.
sorry but I can not fill in the macro.
what I wrote is the set of some macro joined together.
would be great.
thank you
greetings

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: macro for homing
« Reply #22 on: February 17, 2015, 02:46:23 AM »
Hi reporemo,

is your home switch and your index wired to seperate inputs ?

just an idea:
wire both signals via a relay to the same input
relay off -> normal home switch
relay on -> index

-then do a reference with higher speed to normal switch
-switch relay
-lower reference speed
-do an other reference with slow speed to index



Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: macro for homing
« Reply #23 on: February 17, 2015, 04:29:49 PM »
hi TPS
sorry but I do not understand what you mean
  I have two different input
before zeroing I enable a relay that signal out of limits.
arrival on the micro that indicates the first input.
I go back up to find zero index encoder. on the second input.
thank you
regads
Re: macro for homing
« Reply #24 on: February 17, 2015, 10:48:53 PM »
Having got to the home position how are the machine coordinates zeroed?

I found   dooembutton(105)  but that does them all.  How can one zero X and Y leaving Z unchanged?

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: macro for homing
« Reply #25 on: February 18, 2015, 02:37:24 AM »
Hi,
Having got to the home position how are the machine coordinates zeroed?
I found   dooembutton(105)  but that does them all.  How can one zero X and Y leaving Z unchanged?

DoButton( 8 ) -> Zero X
DoButton(9) -> Zero Y
DoButton(10) -> Zero Z

DoButton(22) -> Ref. X
DoButton(23) -> Ref. Y
DoButton(24) -> Ref. Z


Regards Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: macro for homing
« Reply #26 on: February 18, 2015, 02:41:46 AM »
Hi riporeno,
hi TPS
sorry but I do not understand what you mean
  I have two different input
before zeroing I enable a relay that signal out of limits.
arrival on the micro that indicates the first input.
I go back up to find zero index encoder. on the second input.
thank you
regads

i mean to wire both signals ,home switch and index signal, via
a relay to one input, witch is the reference input. then you
can use in both times the reference function, and not reacting
to an input in the macro.

VB macros are only updated 1/10s so it is very hard to see this index
signal. homing function is updated in a higher priority.

Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: macro for homing
« Reply #27 on: February 18, 2015, 03:12:47 PM »
hi Thomas ..
 ok I understand.
however, as I said above with home I can see the index of zero encoder.
Use a simple photocoupler.
The percentage of feed in the parameters is set 1%
my max speed is 5000 mm / m 'so it would be 50mm / m'.
I intend to bring the feed to 10000mm / m '.
in this case the feed would be 100mm / m 'then too high.
why was wondering if it was possible to set the speed with a macro.
If you say you have a Vb macro slow reading of the signal I'll try to find a hardware solution that manages the signal input ..in order to prolong the time of the signal.
thanks for your cooperation

Offline TPS

*
  •  2,505 2,505
    • View Profile
Re: macro for homing
« Reply #28 on: February 19, 2015, 02:31:11 AM »
Hi riporeno,

why was wondering if it was possible to set the speed with a macro.

Get/SetParam()

"VelocitiesX" = X MaxVel from motor tuning page (SetParam as units/second. Mach will multiply X60 for display in motor tuning as units/minute.)
"VelocitiesY"= Y MaxVel from motor tuning page (SetParam as units/second. Mach will multiply X60 for display in motor tuning as units/minute.)
"VelocitiesZ" = Z MaxVel from motor tuning page (SetParam as units/second. Mach will multiply X60 for display in motor tuning as units/minute.)

is that what you are looking for ?

Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: macro for homing
« Reply #29 on: February 19, 2015, 04:33:36 PM »
hi thomas
perfect .. that's what I was looking for.
now I'm off to work.
Tomorrow when I try to write this code in the macro.
then I'll let you know if I can.
thanks again for the help.
regards

moreno