Hello Guest it is April 14, 2021, 10:28:30 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AdrianH

Pages: 1 2 3 4 5 »
1
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

2
I have timed out on being able to edit, but after more searches I have found out how to reverse the order of Ref all home as such I have changed
the VB script for the ref all button from
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

To

DoButton( 23 )
DoButton( 22 )
DoButton( 24 )

So that changes the order.  Now I have done this on two screens the Program run Alt1 screen and the MDI screen Al2, I thought they may have acted the same but for some reason they do not.  The Alt1 screen goes to safe Z height before moving Y and X.  The Alt2 screen does not, so I have missed something there?

Also I tried to use the following
DoButton( 23 )
DoButton( 22 )
DoButton( 24 )
Code("G1 Z10.0 F600")   ' Move up 10
  While (IsMoving())   ' Wait for movement to complete
  Sleep(100)      ' Sleep, so other threads can run while we wait
  Wend

But Z will not move to a height of 10.

So again I am missing something that must be obvious here?

I would still appreciate knowing how to make the machine or ABS Z the same as Work Z?

Thanks.

Adrian

3
Sorry this is probably as clear as mud.

I appreciate Mach3 has been superseded but would still appreciate getting the most out of my simple plasma system.

I have just fitted Home switches to X and Y and they work fine, Z home not connected in ports and pins inputs.
Ref all Home X and Y do as I would expect move to activate the home switches and then back off until the switch goes to normal State (NC) and with the home off setting I can make the displayed machine coords display what I enter.

I wanted to use Z probe to do similar for the Z axis by making the Z home the same input as the probe input and it does work exactly the same, only I realised it did Z first then Y then X and being a plasma table means Z could probe to an empty void hit limit then try and move Y and X jamming the head.  So I looked for a way to change the order of referencing to Y then X then Z, as I could always leave a block of steel for Z to touch off on at the home position.

But finding no way to change the order of homing I began to look for another way.

As I use an M800 macro to probe the top of work prior to cutting, I thought it could be possible to also set the Z axis machine coord as well as setting the work z axis coord.

But I can not discover what parameter I need to set, OEMDRO, DRO etc? either my brain is fuddled or I have missed something basic.

At the moment I can not remember where I got the 2002 to use in the line  GetprobePos = GetVar(2002),  2002 must be the position when the probe activated.  So I may have lost some docs or wiki link.
Later in the makro I use  Call SetOEMDRO(802, AH) where AH is the adjustment value before moving to pierce height but that is only working coords, I have tried a few of the DRO's without success but basically want to make the Z axis machine coord the same as the work coord so I can have some sensible soft limits working on Z.

Can anyone help please?

Adrian

4
OK sorry, I had assumed as I am using the Mach parallel port driver there may have been details about.

Cheers

Adrian

5
Thanks again Craig, the information is very useful.

On my own hobby build system I made certain assumptions down to the speed of pins so I  can change a few things and probably improve a bit on THC speed.

I have not seen this information in any docs, but will continue to look for it.  Will have to re-read all again including the stuff i do not use.

Thanks again.


Adrian

6
Thanks for the response Craig, I think I understand it, sort of!

I use the parallel port to drive all signals on my system, so as I now understand yours and Hoods comments, THC Up, Down and Arc OK, spindle and probe are sampled at 40uS or is it every input via the parallel port is sampled at 40uS including limit and home.

Yes I understand the debounce section but I am having difficulty in understanding what was debounced and what was not, I could not determine from docs.

I guess it is the  sentence you have written 'Mach3 inputs are polled at about 10Hz known as the macro pump rate'  I just think of  the THC as inputs like any other.

Thanks, I will read again when I have woken up properly.

Adrian

7
I have been pestering Hood with a few questions via another group and I wonder if Art, Brian or anyone could just verify a few things for me?

I had picked up from somewhere, possibly here, that the typical input pins are read at a speed of 10 Hz or every 100ms.  I may have got this from a macro timing so again unsure.

Hood remembers discussing similar around 10 years ago and believes that the THC inputs and probe inputs are a lot faster, and are done at 25,000Hz or every 40 uS (25,000 Kernel speed), this could tie in with the debounce period but to me only if all input pins are done at 25,000Hz.

Can anyone assist me with this just for a better understanding. I have searched through the Mach3 pdf's and not found an answer, only the debounce which says it changes with kernel speed and does not seem to differentiate between inputs.

Many thanks

Adrian

8
OK Success, I was not correctly understanding the IF Then Else bit on testing for condition, I do not go:  If GetOemLed(825) = 1

I just go: If GetOemLed(825)

as in the following works:
' APH
' Update 15/06/17
If GetOemLed(825) Then      ' The probe LED is already on
  Message "Probe input active"   ' notify
  Code "M1"         ' Code out the M1 to stop the machine if set to allow
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  WEND            ' Wait end
Else            ' probe not set
  Message ""         ' clear message
  Code "G31 Z-30.0 F500"    ' probe surface
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  Wend            ' Wait end
  ZprobePos = GetVar(2002)    ' get contact point
  Code "G0 Z" &ZprobePos    ' return to point to remove overshoot
  While (IsMoving())      ' Wait For movement To complete
  Sleep(100)         ' Sleep, so other threads can run While we wait
  Wend            ' Wait end
  Call SetOEMDRO(802, -3.60)    ' Set Z DRO = 0.00
  Code "G1 Z 2.5 F500"      ' go to just above pierce height
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  Wend            ' Wait end                 
End If            ' End 





Adrian


9
I am trying a few more things without success such as defining a variable at the beginning called Ptest
I have tried to Dim as Integer and the following as below without winning.

I am not getting the message in the status window that the probe is active so I am assuming that the GetOEMLED(825) is the same as G21 and activates the probe, it self to still cause the issue, so will look to see if there is a way just to read the input pin directly?

' To find top of work and not screw ARC's
' Lots of tries
' APH
' Update 15/06/17
SetVar(Ptest,GetOEMLED(825))
If Ptest = 1 Then      ' The digitise LED is already on
  Message "Probe input active"   ' notify
  Code "M1"         ' Code out the M1 to stop the machine if set to allow
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  WEND            ' Wait end
Else            ' probe not set
  Code "G31 Z-30.0 F500"    ' probe surface
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  Wend            ' Wait end
  ZprobePos = GetVar(2002)    ' get contact point
  Code "G0 Z" &ZprobePos    ' return to point to remove overshoot
  While (IsMoving())      ' Wait For movement To complete
  Sleep(100)         ' Sleep, so other threads can run While we wait
  Wend            ' Wait end
  Call SetOEMDRO(802, -3.60)    ' Set Z DRO = 0.00
  Code "G1 Z 2.5 F500"      ' go to just above pierce height
  While (IsMoving())      ' Wait for movement to complete
  Sleep(100)         ' Sleep, so other threads can run while we wait
  Wend            ' Wait end                 
End If            ' End     


Food time back later.

Adrian

10
Posting in lunch break at work so hope I can get the problem described correctly.

Mach3 licensed, on a CNC Plasma cutter, I use a Macro M800.M1s and call this as part of Sheetcam output Gcode before every pierce.

On some occasions, when some piece of metal has decided to jam things up I can find that the head is raised and the probe is already active before I call G31, so I get a message to say Probe input ignored and Mach3 then for some reason starts to move the X, Y or Z erratically which means I then loose position and have to stop the cutter, sort out positions and recommence cutting.

So the idea I has was on my M800.m1s check to see if the probe was active before doing a G31, but I can not get it to work, so not sure where I am going wrong.

Here is my M800 code as it is now and how I thought I could get it to work, can someone point me to my errors?

' APH
Code "G31 Z-30.0 F300" 'probe surface
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
' Wait For movement To complete
While (IsMoving())
' Sleep, so other threads can run While we wait
Sleep(100)
Wend
Call SetOEMDRO(802, -1.80) 'Set Z DRO = 0.00
Code "G1 Z 3.0 F300"
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End

and new attempt is

' APH
' Update 15/06/17
If GetOEMLED(825) = 1 Then   ' The digitise LED is already on
Message " Probe input active"
Code "M1"         ' Code out the M1 to stop the machine if set to allow
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
WEND            ' Wait end
ELSE
Code "G31 Z-30.0 F500" 'probe surface
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
ZprobePos = GetVar(2002) 'get contact point
Code "G0 Z" &ZprobePos 'return to point to remove overshoot
' Wait For movement To complete
While (IsMoving())
' Sleep, so other threads can run While we wait
Sleep(100)
Wend
Call SetOEMDRO(802, -3.60) 'Set Z DRO = 0.00
Code "G1 Z 2.5 F500"
' Wait for movement to complete
While (IsMoving())
' Sleep, so other threads can run while we wait
Sleep(100)
Wend
' End                                   
End if




Cheers

Adrian

Pages: 1 2 3 4 5 »