Hello Guest it is April 23, 2021, 04:45:47 AM

Author Topic: Axis Home question  (Read 8150 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Axis Home question
« Reply #10 on: April 28, 2009, 10:53:23 AM »
You should be getting that message if your axis  are NOT homed, if they are homed then you should not get the message. If you are wanting to simulate the axis being homed then disable the Home switches in Ports and Pins, Inputs and then press the Ref All button, the LEDs should turn green and when you press the arrow in the VB Editor the code should start.

If I am misunderstanding what you are wanting please let me know.
Hood
Re: Axis Home question
« Reply #11 on: April 28, 2009, 11:46:58 AM »
Hood,

you understood perfectly what I'm trying to do.

The problems is that even if the leds are green the message I told you pops up.

Just to let you know I put this code :

 If GetOemLED(807) Or GetOemLED(808) Or GetOemLED(809) Then
 DoOemButton(1003)
  Sleep (100)
   MsgBox("Axis not referenced")
  Else
   DoOemButton(1000)
End If

In the cycle start button.

I donĀ“t get why it works for you. I don't know if it matters but I use Mach3 for lathe and I use axes X and Z
If there's something wrong please tell me.

Thanks a lot for your patience

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Axis Home question
« Reply #12 on: April 28, 2009, 12:00:38 PM »
Ah OK sorry, the reason you get that message is that you dont have a Y axis because its a lathe, my fault sorry :(
Ok put this in the button.

If GetOemLED(807) Or GetOemLED(809) Then
 DoOemButton(1003)
  Sleep (100)
   MsgBox("Axis not referenced")
  Else
   DoOemButton(1000)
End If
Re: Axis Home question
« Reply #13 on: April 28, 2009, 12:12:13 PM »
Dear Hood,

the last thing you should be is sorry since now it is working. :P

Thanks again for your patience and help.

See you
Re: Axis Home question
« Reply #14 on: April 28, 2009, 12:13:18 PM »
What is the meaning with the line: "Sleep (100)"?

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Axis Home question
« Reply #15 on: April 28, 2009, 01:58:51 PM »
it just gives a 1/10 of a second pause before the VB code will continue to the next line, it may not be needed in reality but I just prefer to have it in there.
Hood

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Axis Home question
« Reply #16 on: April 28, 2009, 02:06:22 PM »
Saumur
 Glad its working, if only I had read your initial post properly it would have been correct from the start :)
Hood
Re: Axis Home question
« Reply #17 on: April 28, 2009, 02:08:12 PM »
Ok, thanks Hood  :)
Re: Axis Home question
« Reply #18 on: October 19, 2009, 11:41:00 AM »
Hey Guys,

I'm bringing up this cause I'm trying to do this work on a computer but when I'm in Screen4 if I right click on a button it doesn't allow me to change it to VB script; I right click and nothing happens.

Anyone knows why?

Thanks

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Axis Home question
« Reply #19 on: October 19, 2009, 11:52:24 AM »
Try a double left click on the button.
Hood