Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Snipes44 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.
-
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
-
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
-
(;-) I am not keen on fiddling with saftey buttons.
Just a thought, (;-) TP
-
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
-
I agree BUT the rest of the world does not seems to understand that part. (;-)
(;-) TP
-
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
-
Can you create a macro that contains the delay and call it from the initialization string?
-
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.
-
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