Hello Guest it is March 29, 2024, 05:04:05 AM

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 - ozwes007

Pages: 1 2 3 4 5 6 7 8 9 10 11 »
1
VB and the development of wizards / Re: OEM/User/otherwise knowledge
« on: August 12, 2015, 06:34:01 PM »
would it be worth while changing the read ahead lines to a lower value on a fast machine TP?
or is this way of track.
It appears from what your saying, the faster the machine the higher the wait state value we need in the Macros.
And as a progression from that, as we update our computers to newer versions this is going to become a major issue with Wizards and such.

Wes

2
VB and the development of wizards / Re: OEM/User/otherwise knowledge
« on: August 12, 2015, 08:50:47 AM »
Havent had a chance to get back to this to test the sleep(100) so taking them out is no problem.
I was under the impression from other Subjects I've looked at that the Sleep(100) reduces the Load on the CPU.

Seems odd and very messy adding While Wend statements after every move, is this a Mach3 Coding issue?
Didn't seem to worry the Page 1 functions, however I'll test it tomorrow with all the While Wend statements in place.


Thanks again Guys

Wes

3
VB and the development of wizards / Re: OEM/User/otherwise knowledge
« on: August 11, 2015, 10:43:29 PM »
Heres a Bit of Code from the main Button.

'Pull in common Information so we know which process we need
ProbeFeed = GetOEMDRO(1053) 'Get the probe feedrate.
TipD = GetOEMDRO(1050) 'Get the Probe Tip O.D.
ProgCNC = GetOEMDRO(1062) 'Which Program to run
XStart = GetOEMDRO(800) ' X DRO
YStart = GetOEMDRO(801) ' Y DRO
ZSafe = GetOEMDRO(1306) ' Z Safe Distance
ZProbe = GetOEMDRO(1307) ' Z Probe Depth
XDist = GetOEMDRO(1304)
YDist = GetOEMDRO(1305)
SetUserLabel(34,"")
Call SetVar(2000,0)
Msg = "YStart = " & YStart
MsgBox Msg, 64 ,"Step"
Msg = "XStart = " & XStart
MsgBox Msg, 64 ,"Step"

Select Case ProgCNC

Case 1

Msg= "Probing Round Centre"
   MsgBox Msg, 64 ,"Probe Information"

If GetOEMDRO(1304)=0 Then 'First If Then
   Msg= "No Set User Bar Size to Probe - Terminating"
   MsgBox Msg, 64 ,"Error - Bar Size Zero"
End   
Else 'First Else
'Next Check and Program
Code "G91 F" & ProbeFeed
' This is the Probe hit LED and Second If Then
If GetOEMLED (825)=0 Then
' add outside moves
 PrepMoveY  = (YDist/3) - (YDist*0.05) + (TipD/2)
Do
  Code "G90 G00 Z" & ZSafe
   Code "G91 G00 Y" & PrepMoveY
   Code "G90 G31 Z-" & ZProbe
   While IsMoving()   
  Sleep(100) 
   Wend
YPosZVal=GetVar(2002)
   Code "G90 G00 Z" & ZSafe
   Code "G90 G00 Y" & YStart
   Msg = "Should Be at Y Start"
MsgBox Msg, 64 ,"Step"
      Code "G91 G00 Y-" & PrepMoveY
   Code "G90 G31 Z-" & ZProbe
   While IsMoving()   
   Sleep(100)
   Wend
   YNegZVal=GetVar(2002)
Code "G90 G00 Z" & ZSafe
Code "G90 G00 Y" & YStart   

' Do the Math
TrigB = PrepMoveY

If Abs(YPosZVal) > Abs(YNegZVal) Then 'Third If Then
CBar = Abs(YPosZVal) - Abs(YNegZVal)
FMove = CBar/2
Doy = 1
Else 'Third Else
CBar = Abs(YNegZVal) - Abs(YPosZVal)
FMove = CBar/2
Doy = 2
End If 'Third End If

'Do the Move or Exit
If CBar <= 0.002 Then 'Fourth If Then
Msg= "Z Probe difference <= 0.002 - To Small Exiting"
   MsgBox Msg, 64 ,"Probe Information"    
Exit Do

Else 'Fourth Else

If Doy = 1 Then 'Fifth If Then
ZFin = Abs(YNegZVal) + FMove
Code "G91 G01 Y" & PrepMoveY
Code "G90 G31 Z-" & ZFin
While Ismoving()
Sleep(100)
Wend
Code "G91 G31 Y-" & PrepMoveY
While IsMoving()   
Sleep(100)
Wend
YProbeVal = GetVar(2001)
Code "G90 G00 Z" & ZSafe
Code "G00 Y" & YProbeVal
Code "G91 Y-" & PrepMoveY
While Ismoving()
Sleep(100)
Wend
Call SetOEMDRO(802, YStart)
Sleep(250)
Code "G90 F" & ProbeFeed

Else ' Fifth Else
ZFin = Abs(YPosZVal) + FMove
Code "G91 G01 Y-" & PrepMoveY
Code "G90 G31 Z-" & ZFin
While Ismoving()
Sleep(100)
Wend
Code "G91 G31 Y" & PrepMoveY
While Ismoving()
Sleep(100)
Wend
YProbeVal = GetVar(2001)
Code "G90 G00 Z" & ZSafe
Code "G00 Y-" & Abs(YProbeVal)
Code "G91 Y" & PrepMoveY
While Ismoving()
Sleep(100)
Wend
Call SetOEMDRO(801, YStart)
Sleep(250)
Code "G90 F" & ProbeFeed

End If 'Fifth End If
End If ' Fourth End If

Loop

Else ' Second Else
 MsgBox("probe is touching")
End If 'Second End If
End If 'First End If

 If GetOEMLED(1006) = True Then '  Set to Zero
 Msg = "Axis set to Zero for Centre of Hole"   
      MsgBox Msg,64,"Successful Probe to Zero"   
Call SetOEMDRO(801,0)
Call SetOEMDRO(800,0)
Sleep(250)
   Else
   SetUserLabel(34,""   )   
End If

Case 2
Msg= "Probing Round Parallel"
   MsgBox Msg, 64 ,"Probe Information"

Case 3
Msg= "Probing Round Parallel while Centring"
   MsgBox Msg, 64 ,"Probe Information"

Case 4
Msg= "Probing for The End Of a Round Bar"
   MsgBox Msg, 64 ,"Probe Information"
'Start the Checks
'Checking for X Data
If GetOEMDRO(1304)=0 Then
   Msg= "No Set User Bar Size to Probe - Terminating"
   MsgBox Msg, 64 ,"Error - Bar Size Zero"
End   
Else
'Next Check and Program
Code "G91 F" & ProbeFeed
If GetOEMLED (825)=0 Then 'This is the Probe hit LED
' add outside moves
 PrepMoveX = XDist + (TipD*2)
   Code "G90 G00 Z" & ZSafe
   Code "G91 G00 X"    & PrepMoveX   
   Code "G90 G31 Z -" & ZProbe
   While IsMoving()   
   Sleep(100)   
   Wend
   Code "G04 P250"
If GetOEMLED (825) = True    Then
   Code "G90 G00 Z" & ZSafe
    Msg= "Probe hit prior to Z depth " & ZProbe & ". "
    Msg= Msg & " X Block dimensions are from Probe to the end of the Bar"       
      MsgBox Msg, 16 ,"Program Has Ended" 
   End
   Else
   Code "G91 G31 X-" & XDist
   While IsMoving()
   Sleep(100)   
   Wend
   Code"G04 P250"
   XProbePos = GetVar(2000)
   Msg= "Probed Value = "  & XProbePos   
   MsgBox Msg, 64 ,"XProbe Value   "
   XCentre = XProbePos - (TipD / 2)
      Msg= "Centre Vale = " & XCentre
   MsgBox Msg, 64 ,"XCentre Value"
   Code " G91 G01 X0.1"
   Code "G90 G00 Z" & ZSafe
   'Reset to Zero or Pass the Value
   If GetOEMLED(1006) = True Then
   Code "G90 G00 X" & XCentre
  While IsMoving()
  Sleep(100)
  Wend
   Call SetOEMDRO(801,0)   
   Call SetOEMDRO(800,0)
  Sleep(250)
   Else
   Code"G90 G00 X" & XStart
   While IsMoving()
  Sleep(100)
   Wend
   SetUserLabel(34,"Edge of the Round Bar is " & XCentre)   
End If
End If 
Else
  MsgBox("probe is touching")
End If   
End If

Case 8
Msg= "Probing the Centre of a Rectangle Bar"
   MsgBox Msg, 64 ,"Probe Information"

Case 16
Msg= "Probing Rectangle Bar Parallel"
   MsgBox Msg, 64 ,"Probe Information"

Case 24
Msg= "Probing Rectangle Bar Parallel and Centre"
   MsgBox Msg, 64 ,"Probe Information"

Case 32
Msg= "Probing for the End of a Rectangular Bar"
   MsgBox Msg, 64 ,"Probe Information"

Case 64
Msg= "X Axis Probe of Vise Jaw for Square"
   MsgBox Msg, 64 ,"Probe Information"

Case 128
Msg= "Y Axis Probe of Vise for Square"
   MsgBox Msg, 64 ,"Probe Information"

Case Else
Msg= "Nothing selected to Probe"
   MsgBox Msg, 64 ,"Probe Information"

End Select

End

4
VB and the development of wizards / Re: OEM/User/otherwise knowledge
« on: August 11, 2015, 09:17:41 AM »
Hi TP,
I'm using version 67
Im not sure that would do anything mate as nothing is moving and the wait of 100 is less than g04 p5000 that I'm using.
I'm assuming the wait is milliseconds?
I'll try it tomorrow though.

Your thoughts on why?

Wes

5
VB and the development of wizards / OEM/User/otherwise knowledge
« on: August 11, 2015, 08:10:50 AM »
Can any one explain the difference of these commands in a wizard AND is there a difference if you place a DRO on the Global Page 0
GetOEMDRO(1051)
GetOEMDRO(800)
GetDRO(0)
Call GetDRO(0)
GetUserDRO(1051)

and then the Set Command of the same.

The reason i'm asking, is i'm having all sorts of bother getting and setting the X DRO values in a wizard.
If i put 5 second waits in they will work occasionally.If i put a Message Prompt they will always get and set.
its driving me around the twist.
Page 0 has the DRO on it
Page 1 seems to work all the time
Page two works when it feels like it.

Wes

6
VB and the development of wizards / Re: OnFormLoad
« on: July 17, 2015, 03:10:58 AM »
I think I may have found a way to do it. Does Not allow page specific but does what I need.
Using init.m1s in the Wizard directory does most of what I need.

If any one has an idea on the attachment of page specific OnFormLoad than I would appreciate the input.

Wes

7
VB and the development of wizards / OnFormLoad
« on: July 17, 2015, 01:57:59 AM »
does anyone now if it is possible to use a VB OnFormLoad or similar on a wizard. Im looking at changing some parameters in a wizard depending on setup and was wondering if this was possible and if so how do we attach it to the form.

Wes

8
General Mach Discussion / Re: Arrow keys don't work
« on: July 14, 2015, 07:55:56 PM »
upgrade to SP3 as well.

Wes

9
General Mach Discussion / Re: Need Mach 3 help please
« on: July 14, 2015, 07:55:10 PM »
needs to go into your machine specific macro folder.
ie c:\mach3\macro\{your profile name}\tools.dat

Wes

10
Mach3 under Vista / Re: Minimum PC requirements vs real life (Newbie)
« on: July 09, 2015, 11:39:21 PM »
You are correct Gerry regarding older systems like yours. They had Error correcting built into the memory and did not utilise low level interrupts to put everything to sleep. My Old HP machine was P III and worked brilliantly. However the new machines are worse than laptops in regard to turning of stuff in the background utilizing "shared" interupts. IT's so they can reduce power usage and be better for the environment ;-). Also today's ram is not error correcting as it used to be, although all Server boards have the ability to use error correcting ram. Hence the reason newer systems will produce problems that old systems wouldn't normally see when used in this way.

Wes

Pages: 1 2 3 4 5 6 7 8 9 10 11 »