1
General Mach Discussion / Re: Mach3 Plasma set-up. How do I set the z axis machine coords in VB script?
« on: April 26, 2018, 06:36:21 PM »
The last post tonight before I go to bed, sorry but I keep playing and playing until I manage to get somewhere.
I was on the latest version of Mach3 and realise the plasma screen Ii am using has a few old codes in there so I changed the Ref all home buttons to use the OEM buttons, I also added some waiting in there as I guessed that I had to do so similar to my VB code for probing of the top of work so the two reference all buttons now have the following codes:
DoOEMButton(104) ' Go to Safe Z
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend
DoOEMButton(1023) ' Reference Y
DoOEMButton(1022) ' Reference X
DoOEMButton(1024) ' Reference Z
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend
DoOEMButton(104) ' Go to Safe Z
It basically works for an initial set up to be safe enough that I do no damage. It was confusing however, that if Z was already at Z=10 which is my safe height, the 1st DoOEMButton(104) will move Z up to 20mm, before referencing. I then realized that the Safe Z was set for incremental which is probably the safest way for it to be.
Adrian
I was on the latest version of Mach3 and realise the plasma screen Ii am using has a few old codes in there so I changed the Ref all home buttons to use the OEM buttons, I also added some waiting in there as I guessed that I had to do so similar to my VB code for probing of the top of work so the two reference all buttons now have the following codes:
DoOEMButton(104) ' Go to Safe Z
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend
DoOEMButton(1023) ' Reference Y
DoOEMButton(1022) ' Reference X
DoOEMButton(1024) ' Reference Z
While (IsMoving()) ' Wait for movement to complete
Sleep(100) ' Sleep, so other threads can run while we wait
Wend
DoOEMButton(104) ' Go to Safe Z
It basically works for an initial set up to be safe enough that I do no damage. It was confusing however, that if Z was already at Z=10 which is my safe height, the 1st DoOEMButton(104) will move Z up to 20mm, before referencing. I then realized that the Safe Z was set for incremental which is probably the safest way for it to be.
Adrian