Hello Guest it is March 01, 2021, 02:36:55 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 - TPS

441
Mach Screens / Re: Touchscreen buttons
« on: May 04, 2020, 06:08:15 AM »
not directly, you have to add some more Buttons (G,F,and so on) and modify the code

Code: [Select]
SetOEMDro(DRONum,CDbl(Dlg1.FText))
   

to
Code: [Select]
Code Dlg1.FText

it should do something simular.

442
Mach Screens / Re: Touchscreen buttons
« on: May 04, 2020, 05:15:03 AM »
here: https://www.machsupport.com/forum/index.php?topic=36213.msg247828#msg247828

i posted some code to do it with vb script.

443
put a transparent button with no code over the dro.

444
VB and the development of wizards / Re: infrared screen
« on: May 03, 2020, 04:05:26 AM »
try this

Code: [Select]
   Sub Main()
      If  GetOEMLED(804) Then ' is run
        If IsActive(INPUT1)And (GetLed(116) = true) Then
          DoOemButton(1004)      ' 1004 DoOemButton stop
        End If
      End If     
   End Sub 



445
can you pls. post one of the gcode files?

446
Code: [Select]
Dim Num_Tools As Integer
Dim Ang_Move As Integer
Dim Req_Tool As Integer
Dim Current_Tool As Integer
Dim Lock_Move As Integer
Dim CW_Feed As Integer
Dim CCW_Feed As Integer
Dim Moves As Integer


Num_Tools    = 12 'number of tools on turret
Ang_Move     = 360/Num_Tools 'angular rotation per tool
Req_Tool     = GetSelectedTool()
Current_Tool = GetCurrentTool()
Lock_Move    = 15 'distance to move back onto paw to lock
CW_Feed      = 100
CCW_Feed     = 50

'Start tool change

If Req_Tool < 1 Then
  Message"Tool number too low"
  Code "M30"
End If

If Req_Tool = Current_Tool Then
  'do nothing
Else
  'do tool change
  If Req_Tool > Current_Tool Then
    Moves = (Req_Tool - Current_Tool) * Ang_Move
  End If
  If Req_Tool < Current_Tool Then
    Moves = (Num_Tools - Current_Tool + Req_Tool) * Ang_Move
  End If 
End If

'move to safe position
Code "G0 G53 X-.25 Z-.25"
Code "G04 P0.5"
'index turret
Code "G91 G94"
Code "G01 A" & Moves + 10 & "F" & CW_Feed
Code "G01 A-" & Lock_Move & "F" & CCW_Feed
While IsMoving()
Sleep(10)
Wend

SetCurrentTool Req_Tool
SetUserDRO 1500 , Req_tool
Code "G90"
Code "F" & Current_Feed



447
General Mach Discussion / Re: Gage Block height problem
« on: April 29, 2020, 10:25:09 AM »
i never thought that there is something wrong with the script, i only wanted to see witch OEMDro is used.

there is a lot Information here on the Forum about Win7 updates.

you should see in System tray witch was the last installed update.

btw. you did not add any other device like handwheel or something like this witch may use OEMDro(1001)

for a quick fix, you can edit your script and enter a fixed plate thickness for test:

Code: [Select]
GageH = 15.0   'OEMDRO(1001)=Gage Block Height

448
General Mach Discussion / Re: Gage Block height problem
« on: April 29, 2020, 06:05:27 AM »
OK your script uses OEMDRO(1001) for the Gage Block height.

OEMDRO(1001) is on Offset page left upper Corner.

what is going on if you enter there the 15mm?

449
General Mach Discussion / Re: Gage Block height problem
« on: April 29, 2020, 05:20:55 AM »
can you pls post your Auto tool Zero script?

450
General Mach Discussion / Re: Auto zero script problem
« on: April 29, 2020, 03:58:40 AM »
added some sleep's to your code, maybe it helps

Code: [Select]
ToolRadius = GetOemDRO(1112)/2  'custom tool diameter DRO
PlateOffset = 20  'X and Y offset
PlateThickness = 15  'Z offset

CurrentFeed = GetOemDRO(818)
CurrentAbsInc = GetOemLED(48)
CurrentGmode = GetOemDRO(819)
CurrentFeedOverride = GetOEMDRO(821)


'X 1st Pass at fast rate


Message "X axis 1st pass"
Sleep 2000
If GetOemLed (825) = 0 Then
DoOemButton (1008)
Sleep(250)
SetOemDRO (821,100)
Code "G90 G31 X20 F600"
While IsMoving()
Wend
Sleep(250)
XProbePos = GetVar(2000)
If Abs(XprobePos) <= Abs(20) - 0.1 Then
Code "G0 X" &XProbePos
While IsMoving()
Wend
Call SetDro (0,0)
Sleep(250)
Code "G1 X-1 F1000"
While IsMoving()
Wend
Message "X axis 2nd pass"
Sleep(250)
Else
Code "G53 G0 X" &x
While IsMoving()
Wend
Message "Material not found, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If
Else
Message "Probe is grounded, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If


'X 2nd pass at slow rate


DoOEMButton (1008)
Sleep(250)
Code "G31 X2 F30"
While IsMoving()
Wend
Sleep(250)
XProbePos = GetVar(2000)
If Abs(XprobePos) <= Abs(2) - 0.1 Then
Code "G0 X" &XProbePos
While IsMoving()
Wend
Call SetDro (0,ToolRadius)
Sleep(250)
Message "X axis is now zeroed"
Sleep(250)
Code "G91 G0 X-10"
Code "G0 Y-20"
Code "G0 X20"
While IsMoving()
Wend
Sleep(250)
Else
Code "G53 G0 X" &x
While IsMoving()
Wend
Message "Material not found, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If



'Y 1st Pass at fast rate


Message "(Y axis 1st pass)"
If GetOemLed (825) = 0 Then
DoOemButton (1009)
Sleep(250)
Code "G90 G31 Y20 F600"
While IsMoving()
Wend
Sleep(250)
YProbePos = GetVar(2001)
If Abs(YprobePos) <= Abs(20) - 0.1 Then
Code "G0 Y" &YProbePos
While IsMoving()
Wend
Call SetDro (1,0)
Sleep(250)
Code "G1 Y-1 F1000"
While IsMoving()
Wend
Message "Y axis 2nd pass"
Sleep(250)
Else
Code "G53 G0 Z0"
Code "G53 G0 Y" & y & "X" & x
Code "G53 G0 Z" & z
While IsMoving()
Wend
Message "Material not found, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If
Else
Message "Probe is grounded, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If


'Y 2nd pass at slow rate


DoOEMButton (1009)
Sleep(250)
Code "G31 Y2 F30"
While IsMoving()
Wend
Sleep(250)
YProbePos = GetVar(2001)
If Abs(YprobePos) <= Abs(2) - 0.1 Then
Code "G0 Y" &YProbePos
While IsMoving()
Wend
Call SetDro (1,ToolRadius)
Sleep(250)
Message "Y axis is now zeroed"
Code "G91 G0 Y-5"
Code "G0 Z20"
Code "G90 G0 X20 Y20"
While IsMoving()
Wend
Else
Code "G53 G0 Z0"
Code "G53 G0 Y" & y & "X" & x
Code "G53 G0 Z" & z
While IsMoving()
Wend
Message "Material not found, check connection and try again"
Code "F" &CurrentFeed
SetOemDRO (821,CurrentFeedOverride)
If CurrentAbsInc = 0 Then Code "G91"
If CurrentGMode = 0 Then Code "G0"
Sleep(250)
Exit Sub
End If