Hello Guest it is April 18, 2024, 10:09:06 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

1101
General Mach Discussion / Re: Touch off plate script, something is wrong
« on: November 30, 2019, 05:40:39 AM »
Code: [Select]
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
   DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
   Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
   Code "G31Z-40 F60" 'probing move, can set the feed rate here as well as how far to move
   While IsMoving() 'wait while it happens
   Wend
   ZProbePos = GetVar(2002) 'get the axact point the probe was hit
   Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun 
   While IsMoving ()
   Wend
   Call SetDro (1.6, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
   Code "G4 P0.25" 'Pause for Dro to update.
   Code "G0 Z10" 'put the Z retract height you want here
   Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
   Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If

by reading your something look a bit strange

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

is Setting the variable PlateThickness to whatever UserDro(1151) is.

Call SetDro (1.6, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness

should be the code where the new Z-axis Offset is set.

IHMO it should be

Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness

or if you do not use the variable

Call SetDro (2, 1.6) 'set the Z axis DRO to 1.6mm fix


1103
If IsActive(OUTPUT1) Then
    DeactivateSignal (OUTPUT1)
Else
    ActivateSignal (OUTPUT1)
End If

1104
General Mach Discussion / Re: Multiple Profile with Tool Table
« on: November 24, 2019, 08:03:14 AM »
tooltabel is allways stored separat in c:\Mach3\macros\profile Name\Tools3.dat

so only copy/paste will work, or create VB script Export/inport the tooltable.

1105
that is the Problem between zeroing an axis and home a axis (by using a Limit Switch).
if you only "Zero" a axis you never know where this Zero is based on max of axis movement.

if you home an axis by using a Limit Switch you allways know exactly where the axis is (in machine
coords) by using G53.

1106
ok first of all, try to learn reading scipts, it is not just copy and paste , and everybody is happy.
ok "your" first script:

Code: [Select]
CurrentFeed   = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode  = GetOemDRO(819) 'Get the current G0/G1 state

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P3" 'this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4. F4" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the exact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, .060) 'change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   

this code line:
Code: [Select]
[color=red] Call SetDro (2, .060) 'change .060 to your plate thickness and then adjust for final accuracy
[/color]

will set your "new" z-Zero to 0.600 how ever it will not be your touch plate height



1107
General Mach Discussion / Re: Auto tool zero scfipt
« on: November 02, 2019, 07:31:57 AM »
try to Change:

Code "G90 G31 Z #1 F" & ProbeFeed 'Probing move

to

Code "G90 G31 Z #1 F" & ProbeFeed 'Probing move
Sleep(300)



1108
Feature Requests / Re: ARC-ON TIMER AND PIERCE COUNTER IN MACH3
« on: November 01, 2019, 12:29:28 PM »
just a bit of calculation

Code: [Select]
'check that endtime has not been calculated allready
If GetUserDro(1600) <> 99999 Then
'save the cuttime
SetUserDro(1601 , GetUserDro(1601) + ( Timer - GetUserDro(1600)))
'set calculation allready done
SetUserDro(1600,99999)
'UserDro 1602 for seconds
SetUserDro(1602 , GetUserDro(1601) Mod 60)
'UserDro 1603 for minutes
SetUserDro(1603 , (GetUserDro(1601)-GetUserDro(1602))/60)
End If

1109
General Mach Discussion / Re: Auto tool zero scfipt
« on: November 01, 2019, 03:34:57 AM »
where the z-axis is going to when you press the Goto Zero Button depends on your Settings in Config -> Save_Z-Setup. Goto Diagnostic page and have a look for all the Coords.

1110
CS-Lab / Re: CSMIO/IP-M and Mach3 Enable output issues
« on: October 31, 2019, 02:38:16 AM »
is the OUT0 led on the CSMIO-M comming ON?
Output assigned in Config->Ports&Pins->Output Signals?
if yes, assigned to what?