Hello Guest it is April 16, 2024, 09:26:45 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.


Topics - tantan

Pages: « 1 2 3 4
31
VB and the development of wizards / code "G04 P2.0" problem
« on: April 24, 2008, 12:36:25 PM »
hi again,

i have the next macro which runs perfect except for the [ code "G04 P2.0" ] part. i am sure the subroutine is executed but the output is not latched for 2 seconds. i hope someone can help me because it is an essential part of my machine. (i run mach3 2.63 version on windows xp).

'SetUserDRO(1200,GetSelectedTool())
'OldTool = GetOEMDRO (1200)
wantedtool = GetOEMDRO (1200) 'GetSelectedTool()
MaxToolNum = 8      'Max number of tools for the changer

If newtool = wantedtool Then
Message ("Selected Tool already loaded")
Exit Sub
End If

'While wantedtool > MaxToolNum
'Tool = Question ("Enter New Tool Number up to " & MaxToolNum)
'Wend

While wantedtool <> newtool

Call actualtool
Call rotateCW
     
Wend 

Call stop_and_lock_turret



'//// Subroutines /////////

Sub actualtool

   If isActive(Input1) And isactive(Input2) And isactive(Input3) And Not isactive(Input4) Then
      NewTool = 1
      End If
   If isActive(Input1) And isactive(Input2) And Not isactive(Input3) And Not isactive(Input4) Then
      NewTool = 2
      End If
   If isActive(Input1) And isactive(Input2) And Not isactive(Input3) And isactive(Input4) Then
      NewTool = 3
      End If
   If isActive(Input1) And Not isactive(Input2) And Not isactive(Input3) And isactive(Input4) Then
      NewTool = 4
      End If
   If isActive(Input1) And Not isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 5
      End If
   If Not isActive(Input1) And Not isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 6
      End If
   If Not isActive(Input1) And isactive(Input2) And isactive(Input3) And isactive(Input4) Then
      NewTool = 7
      End If
   If not isActive(Input1) And isactive(Input2) And isactive(Input3) And not isactive(Input4) Then
      NewTool = 8
      End If
     
      setcurrenttool(newtool)
     
End Sub


Sub rotateCW
   ActivateSignal(Output6)
      While IsMoving()
      Wend
     
End Sub

Sub stop_and_lock_turret

   DeActivateSignal(Output6)
      While IsMoving()
      Wend
   ActivateSignal(Output5) 
      Code "G4 P2"    'Wait for the tool to rotate onto ratchet stop
      While IsMoving()
      Wend
   DeActivateSignal(Output5)
      While IsMoving()
      Wend
     
End Sub   
   

thanks

antoine
the netherlands

32
VB and the development of wizards / some VB questions
« on: April 20, 2008, 07:12:19 AM »
hi,

i just started with VB programming in Mach3 (version 2.63). in "general config" i switched "run marco pump" on.

but i have the following questions:

1. my macrocode runs but only if i start it manually. how can i let it run continuously when mach starts.
2. i want an extra button on a standard mach screen (lathe) to jump to my own developed screen. how can i edit de default mach screens.
3. i have a button and a button script on my own developed mach screen. but when i press the button (with my mouse) the VB buttonscript does not run?

thanks,

antoine
the netherlands

33
hi,

can anyone help me to become an alphacam postprocessor for mach3 (turning)

thanks

antoine
the netherlands

Pages: « 1 2 3 4