Hello Guest it is March 28, 2024, 04:37:44 PM

Author Topic: Possible to add a delay to Mach's reset?  (Read 4616 times)

0 Members and 1 Guest are viewing this topic.

Possible to add a delay to Mach's reset?
« on: November 20, 2012, 11:38:03 PM »
Hello, I have finally cut some metal on my 1980 Hurco KMB1 mill. I still have a few loose ends to clean and at a point that I need a couple pointers.

Here is what I have for a system.
Ethernet SS
PMDX-126
PMDX-107
DG2S-16035 (servo drives)

I need to some how add a delay to axis movement when I hit reset. Here is what happens.

I hit reset in Mach3, the PMDX-126 actives the drives reset line for 2 secs, the drive takes 2-3 seconds to run through its reset cycle before it will move the motors. The issue is I can hit reset and hit jog and Mach thinks it moving even though the drives have not finished resetting yet.

I would like add around a 5 second delay on reset in Mach so that I can't jog the machine until the drives reset.

I have looked at my drives and they don't have a ready to run line. They do have an error line which I have connected to the PMDX-126 and it works. But the error line doesn't show when the drive is done resetting and ready to run it only shows when the drive has faulted.

Is this something I could do with a brain?

Any ideas? I have done some searching here and on the net and have not seen anything that looks related.
-Wes

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #1 on: November 21, 2012, 12:36:55 AM »
NOT that I am aware of.    Just don't jog before the drives are on line.  EVen if you did not a problem as at that point MACh3 does not know where it is at anyway. You would have to Refhome  to regain position anyway.

(;-) TP
« Last Edit: November 21, 2012, 12:39:33 AM by BR549 »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #2 on: November 21, 2012, 04:05:40 AM »
Maybe something like this in the Reset Button would work for you

DoOemButton(1021)
Sleep 10
If  Not  GetOemLED(800) And GetOemLED (83) Then
DoOemButton  (103)
While IsMoving()
Wend         
Code "G4P5"
While IsMoving()
Wend
DoOemButton (103)
End If         


Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #3 on: November 21, 2012, 02:30:23 PM »
(;-) I am not keen on fiddling with saftey buttons.

Just a thought, (;-) TP

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #4 on: November 21, 2012, 04:15:17 PM »
I really dont consider any software buttons to be a safety button, to me hardware is where that should be but thats just me ;)
Hood

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #5 on: November 21, 2012, 04:26:04 PM »
I agree BUT the rest of the world does not seems to understand that part. (;-)

(;-) TP

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #6 on: November 21, 2012, 04:31:39 PM »
 I agree on that but they should ;)
The Industrial machine world tends to think hardware but sadly many who use Mach/EMC etc dont,
Hood

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Possible to add a delay to Mach's reset?
« Reply #7 on: November 21, 2012, 05:43:13 PM »
Can you create a macro that contains the delay and call it from the initialization string?
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Possible to add a delay to Mach's reset?
« Reply #8 on: November 27, 2012, 09:59:11 PM »
Thanks for the replies guys. Sorry about my late posting back on this. Been a busy few days with the holiday weekend.

BR549 - You are total right about the delay. I use Mach3 on my router but don't have homing switches on it. All the jobs I do I'm at the machine and they don't run very long. Being a machinist by day I was trying to setup my metal mill to be more like the machines that I work with everyday.

Hood - Thanks for the snip it of code. I have something to play with now. I have a couple jobs lined up for manual work at the moment so not going to be able to try this out until the weekend.

ger21 - That is a good idea I will have to give that a try also. Might be easier then the VB script.
-Wes

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Possible to add a delay to Mach's reset?
« Reply #9 on: November 28, 2012, 02:59:22 AM »
ger21 - That is a good idea I will have to give that a try also. Might be easier then the VB script.

They will be exactly the same, both VB, only difference is one you would save to a VB button the other you save as a macro in your macro folder.
Hood