Hello Guest it is April 19, 2024, 06:55:40 PM

Author Topic: code to see if homed  (Read 3430 times)

0 Members and 1 Guest are viewing this topic.

code to see if homed
« on: January 25, 2015, 12:56:37 PM »
Hello chaps

is there a word (or a way ) to check if the machine has been homed?

regards

fred

think of the trees-- use both sides of the computer paper

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: code to see if homed
« Reply #1 on: January 25, 2015, 01:04:11 PM »
Check the status of the Ref'd LED's.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: code to see if homed
« Reply #2 on: January 25, 2015, 01:20:35 PM »
Hello ger - yes i guess i got that - you mean the 2 led's on the top right of the
1024.lset screen??

I was wondering if it could be done programmatically -??
think of the trees-- use both sides of the computer paper

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: code to see if homed
« Reply #3 on: January 25, 2015, 03:28:12 PM »
You can look at them via VB and do what you want depending on state.
If you want to use that from within G Code then save the VB as a m101.m1s (or higher number) You will then get Mach calling the macro from G Code by entering m101 (or whichever number you chose)

Hood
Re: code to see if homed
« Reply #4 on: January 25, 2015, 11:08:50 PM »
Thank you Hood-- Am i correctly presuming that VB is visual basic?
I have not got as far as writing macros yet.
I will pass on this for a few more sessions until i learn about macros

best regards

fred
think of the trees-- use both sides of the computer paper

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: code to see if homed
« Reply #5 on: January 26, 2015, 01:43:06 PM »
What is it you are trying to do
Hood
Re: code to see if homed
« Reply #6 on: January 26, 2015, 02:32:23 PM »

when i am running a part prg i would like to try and set up a message if the machine has not
been homed
think of the trees-- use both sides of the computer paper

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: code to see if homed
« Reply #7 on: January 26, 2015, 02:46:12 PM »
Ok, I presume this is a Lathe?
Attached is a simple macro, place it in the macro folder of the profile you are using. When you call M123 it will look to see if referenced, if not it will stop the code then pop up a message box. If it is referenced it will just continue and will display a message in the ticker saying so.
Hood
Re: code to see if homed
« Reply #8 on: January 27, 2015, 02:23:50 AM »
thanks ever so much-- will also  give me an oppurtunity to look at a macro
think of the trees-- use both sides of the computer paper