Hello Guest it is May 04, 2024, 12:34:42 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

381
i have tested this here, and it works:

'start code ------------------------------------------------------------------------
Sub Main

   'Get tool information
   newtool = GetSelectedTool()      ' get the newtool
   acttool = GetCurrentTool()      ' get the acttool   
   Message "New Tool = " &newtool
   Sleep(200)

   ' new and acttool = 0
   If ((newtool = 0) and (acttool = 0)) Then
      message("new and old tool = 0 -> abort toolchange  !")
      Sleep(500)
      Exit Sub
   End If   

      ' new tool = 0
   If (newtool = 0) Then
      DoButton(1003)
      message("new tool = 0 -> abort toolchange  !")
      Sleep(500)
      Exit Sub
   End If   

   ' new and acttool are the same
   If newtool = acttool Then
      message("acttool and newtool are the same -> do nothing!")
      Sleep(500)
      Exit Sub
   End If
 
   'check toolnumber in range
   If  (((newtool > 14) Or (newtool < 1)) And (newtool <> 0)) Then
      DoButton(1003)
      Message (" toolnumber " & newtool & " is not in range (1-" &MaxTool &"). abort toolchange  ! ")
      MsgBox (" toolnumber " & newtool & " is not in range (1-" &MaxTool &"). abort toolchange  ! ")
      Exit Sub
   End If      

   'toolnumber 1 mastertool
   If  newtool = 1 Then
      Code ("G52 X0 Y0")
   End If      

   'toolnumber 2
   If  newtool = 2 Then
      Code ("G52 X32 Y0")
   End If      

   'toolnumber 3
   If  newtool = 3 Then
      Code ("G52 X64 Y0")
   End If      

'And so ON


      
   'set new tool
   SetCurrentTool( newtool )
   Code ("G43 H" & newtool)
   Message " "

End Sub
'end code ------------------------------------------------------------------------





382
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 13, 2021, 02:19:37 AM »
depending on your Motion Controller you can run your spindle in step/dir mode as well.
also the servo Controller supports a PZ+/PZ- Signal witch is a single pulse per rev. that can
be used for a index Input. i use this signals on my machines for indexed homing on the Motion axes.
 

383
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 11, 2021, 12:46:26 PM »
I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D

is soon your Hardware (Inputs/Outputs) is clear just start a new thread, and we will seen.

384
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 11, 2021, 07:02:09 AM »
never tryed the  SetProbeState() in reality only found it in the attached file.

i do it with a Little Piece of Hardware.

385
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 10, 2021, 12:22:21 PM »
so if the instruction itselv is running in VB Script Editor, it must also run in button script.

just make sure that you have pressed ENTER after the instruction to have a empty line
under the code.

386
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 10, 2021, 10:04:00 AM »
test it vb script editor

387
General Mach Discussion / Re: Mach 3: Programmatic change to config
« on: May 10, 2021, 09:18:55 AM »
i have tested:
Code: [Select]
SetProbeState(True) 'disable Active Low of probe input
SetProbeState(False) 'enable Active Low of probe Input

in Ver. 043.022 and Ver. 043.066 and it is working in both.



388
Mach Screens / Re: New Machine Setup Help (machstdmill)
« on: May 08, 2021, 09:05:06 AM »
main Menue -> View -> Load Screens  then Chose filename of your screenset.

389
General Mach Discussion / Re: Mach3
« on: May 07, 2021, 02:45:54 AM »
there is no "global" answer for this, it is allways depending on your Controller.

witch Controller are you using?
any documentation avaliable?

390
General Mach Discussion / Re: Mach3
« on: May 06, 2021, 12:56:46 PM »
usb Controller will Need a plugin.