Hello Guest it is April 25, 2024, 10:43:26 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

1641
General Mach Discussion / Re: VB Script
« on: October 09, 2018, 05:21:32 PM »
ok was a "Little bit" ofline, added some debuging msg boxes, to see what is going on


Code: [Select]
'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXNeg = GetVar(2000)


MsgBox "X Probe - : " + CStr(ProbeXNeg)


'clear the probe
Code "G91 X2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"


    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXPos = GetVar(2000)


MsgBox "X Probe + : " + CStr(ProbeXPos)



'clear the probe
Code "G91 X-2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"

'goto the center
middle = ProbeXNeg + ((ProbeXPos - ProbeXNeg)/2)


MsgBox "center : " + CStr(middle)

Code "G90 G01 X" + CStr(middle)
    While IsMoving()
Sleep(10)
    Wend           
SetOEMDro(800,0)

End Sub





1642
General Mach Discussion / Re: VB Script
« on: October 08, 2018, 01:00:03 AM »
Code: [Select]
'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXNeg = GetVar(2000)

'clear the probe
Code "G91 X2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"


    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXPos = GetVar(2000)

'clear the probe
Code "G91 X-2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"

'goto the center
middle = ProbeXNeg + ((ProbeXPos - ProbeXNeg)/2)
Code "G90 G01 Y" + CStr(middle)
    While IsMoving()
Sleep(10)
    Wend           
SetOEMDro(800,0)

End Sub



1643
General Mach Discussion / Re: VB Script
« on: October 07, 2018, 01:47:10 PM »
no idea why this warning Comes up, but try this code:

Code: [Select]
'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXNeg = GetVar(2000)

'clear the probe
Code "G91 X2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"


    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXPos = GetVar(2000)

'clear the probe
Code "G91 X-2 F150"
    While IsMoving()
Sleep(10)
    Wend           
Code "G90"

'goto the center
middle = ProbeXNeg + ((ProbeXPos - ProbeXNeg)/2)
Code "G90 G01 Y" + CStr(middle)
SetOEMDro(800,0)

End Sub



1644
General Mach Discussion / Re: VB Script
« on: October 07, 2018, 10:28:32 AM »
ok try this, sorry i can't test the code for the Moment.

Code: [Select]
'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend          

'get the exact probepos
ProbeXNeg = GetVar(2000)

'clear the probe
Code "G91 X2 F150"
    While IsMoving()
Sleep(10)
    Wend          
Code "G90"


    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend          

'get the exact probepos
ProbeXPos = GetVar(2000)

'goto the center
middle = ProbeXNeg + ((ProbeXPos - ProbeXNeg)/2)
Code "G90 G01 Y" + CStr(middle)
SetOEMDro(800,0)

End Sub



1645
General Mach Discussion / Re: VB Script
« on: October 07, 2018, 08:18:56 AM »
Code: [Select]

'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXNeg = GetVar(2000)

    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeXPos = GetVar(2000)

'goto the center
middle = ProbeXNeg + ((ProbeXPos - ProbeXNeg)/2)
Code "G90 G01 Y" + CStr(middle)
SetOEMDro(800,0)

End Sub



1646
General Mach Discussion / Re: VB Script
« on: October 04, 2018, 03:04:36 AM »
here a simple sxript for X

Code: [Select]
'simple X-center script
Sub Main()
SetOEMDro(800,0)

    'do the X- probe
    Message ("probe X- ")
    Code "G31 X-100 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x <= -100 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X- canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeX- = GetVar(2000)

    'do the X+ probe
    Message ("probe X+ ")
    Code "G31 X200 F150"
    While IsMoving()
        x = GetOEMDRO(800) 'X actpos
        If x >= 200 Then
            DoOEMButton(1003) 'Stop too far no probe hit
            MsgBox ("Probe X+ canceled , no probe hit!" )
            Exit Sub
        End If
    Wend           

'get the exact probepos
ProbeX+ = GetVar(2000)

'goto the center
middle = ProbeX- + ((ProbeX+ - ProbeX-)/2)
Code "G90 G01 Y" + CStr(middle)
SetOEMDro(800,0)

End Sub

be careful, not tested, just written down.

z-axis has to be in probe hight.


1647
General Mach Discussion / Re: DRO question
« on: October 01, 2018, 01:41:56 PM »
i think you have to read a Little bit about machine coordinates and work coordinates.

machine coordinates will only be set to Zero by doing a reference with reference Switches.

1648
CS-Lab / Re: Completely lost with my CSMIO IP-m 4
« on: September 29, 2018, 03:27:00 AM »
if you use the CS-Lab email

office@cs-lab.eu

and ask for

Wojtek Trawicki

you normaly get a good Support.
i got allways an answer within two days.

1649
can you post your G-Code ?

1650
if you go to the settins page , right lower Corner, does it Show mm's or Inch ?