Hello Guest it is September 20, 2021, 06:44:35 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 - TPS

1341
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



1342
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.


1343
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.

1344
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.

1345
can you post your G-Code ?

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

1347
General Mach Discussion / Re: Macro in G-code pauses execution for 1 sec
« on: September 28, 2018, 02:03:36 AM »
or contact vital Systems customer Support?

1348
General Mach Discussion / Re: Macro in G-code pauses execution for 1 sec
« on: September 27, 2018, 02:43:42 PM »
if you Show us your M29 macro, somebody will be able to help you.

1349
something like this should work:

If IsActive(INPUT1) and (GetUserLed(2000) = false) Then
 SetOEMDro(2000,GetOEMDro(2000)+1)
End If

If IsActive(INPUT1)  Then
 SetUserLed(2000,1)
Else
 SetUserLed(2000,0)
End If

not tested, just written down

1350
VB and the development of wizards / Re: macro for adjusting jog speed
« on: September 15, 2018, 02:56:00 AM »
there must be something else in your macro witch causes the Compiler error.

if i run

Call SetOemDro(3,2)

here it works fine, make sure that there is a CRLF at the end of the line.