Hello Guest it is April 16, 2024, 03:34:15 PM

Author Topic: GO TO WORK ZERO - ERROR  (Read 6857 times)

0 Members and 1 Guest are viewing this topic.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: GO TO WORK ZERO - ERROR
« Reply #20 on: September 18, 2017, 05:10:04 AM »
Hooked, sounds like your A axis no longer has an enabled motor mapped to it. Is that right?
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: GO TO WORK ZERO - ERROR
« Reply #21 on: September 18, 2017, 07:27:47 AM »
Hi Daryl,
Rustins code should be close to working.

First go to Operator/Edit Screen and <Go To Work Zero>. Open the Left Up script:
Code: [Select]
GoToWorkZero()
--local inst = mc.mcGetInstance()
--mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")

Note that the two lines of code are commented out, they do nothing. They have been put there so you can see and interpret what function GoToWorkZero() does.
The actual working code is in the screen load script.
Open the Screen Load script and scan down until you find the function you want, in my script line 218:
Code: [Select]
function GoToWorkZero()
    mc.mcCntlMdiExecute(inst, "G00 X0 Y0 A0")--Without Z moves
    --mc.mcCntlMdiExecute(inst, "G00 G53 Z0\nG00 X0 Y0 A0\nG00 Z0")--With Z moves
end

Rustin used the second line of code by uncommenting it but I'm dubious about the G53 code, that means that coord system for this move is in machine cords.

May I suggest trying:
Code: [Select]
mc.mcCntlMdiExecute(inst, "G00 X0 Y0 ")which by my reckoning will move at rapid traverse speed to X0 Y0 of work co-ords with no Z axis movement.

Evidently Rustin tried a similar edit and generated an error, I don't know why. One thing which occurred to me was 'what would happen if work co-ords are not defined
yet', would that cause an error that Rustin described?

It seems to work on my laptop...both with and without work co-ords being defined.

As I suggested in an earlier post if you find that this wee mod works save the modded screen set with a distinct name. Then use the new improved screen set in
your profile. That should prevent your favoured screen set being overwritten with an update.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: GO TO WORK ZERO - ERROR
« Reply #22 on: September 18, 2017, 04:00:47 PM »
Craig, THANKS for the comprehensive post.  I will tackle it today and let you know the outcome.

Cheers
Daryl
Re: GO TO WORK ZERO - ERROR
« Reply #23 on: September 18, 2017, 07:44:03 PM »
All good.  Worked as per your excellent post Craig.  THANKS for your patience.

Cheers

Daryl
Re: GO TO WORK ZERO - ERROR
« Reply #24 on: September 18, 2017, 08:09:42 PM »
Hi Daryl,
your'e welcome of course.

I'v thought a bit more about the line of code that Rustin used and I realise my doubt about the G53 code
is unfounded.

G53 is not modal, therefore the G53 machine co-ord move applies to the first line only ie the G00 G53 Z0 move,
it causes the Z axis to retract to machine zero, usually the topmost extreme of its travel, ie SAFE.
The subseqeunt moves are in work co-ords as G53 is not modal. The first is G00 X0 Y0 ie X and Y goto work zero
followed by G00 Z0 now the Z axis lowers to material top. Very simple and clever.

I've learnt something new even if no-one else has.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: GO TO WORK ZERO - ERROR
« Reply #25 on: September 19, 2017, 06:04:21 AM »
Craig,
Sorry, haven't had time to respond. Your last post describes exactly how my machine was responding, and now that you mention it, that's exactly why.

Daryl,
Glad to hear you've got it working.

I've got a big name tag engraving project, I'm starting on. I'll let y'all know how it goes.

Rustin