Hello Guest it is March 29, 2024, 09:32:16 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

1361
add

msgbox ("M6 Start executed")

at the begin of the macro to see that the macro is called

like this ?

msgbox ("M6 Start executed")
OldTool = GetOEMDRO (1200)
Tool = GetSelectedTool()
MaxToolNum = 4      'Max number of tools for the changer

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

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

Call StartTool

While NewTool <> Tool
   Call CheckPins
   While IsMoving()
   Wend
Wend

Call StopTool

Call SetUserDRO (1200, NewTool)
SetCurrentTool(NewTool)

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

Sub StartTool
   ActivateSignal(Output8)
   'Code "G4 P4.0"    'Wait for the tool to rotate past the sensor
      While IsMoving()
      Wend
End Sub

Sub CheckPins
   If Not IsActive(Input22) Then
      NewTool = 1
      End If
   If Not IsActive(Input21) Then
      NewTool = 2
      End If
   If Not IsActive(Input20) Then
      NewTool = 3
      End If
   If Not IsActive(Input19) Then
      NewTool = 4
      End If
End Sub

Sub Stoptool
   DeActivateSignal(Output8)
      While IsMoving()
      Wend
   ActivateSignal(Output9) 
      Code "G4 P1.0"    'Wait for the tool to rotate onto ratchet stop
      While IsMoving()
      Wend
   DeActivateSignal(Output9)
      While IsMoving()
      Wend
End Sub 




yes

1362
do you have enabled in

Config -> General Config -> Tool Change -> Auto Tool Change

1363
add

msgbox ("M6 Start executed")

at the begin of the macro to see that the macro is called

1364
how do you initiate toolchange

in lathe mode it is

M6 T0101 for example

1365
then replace:
Open "c:\TESTFILE.txt" For Output As #1 ' Open to write file

by:
Open "c:\TESTFILE.txt" For Append As #1 ' Open to write file

1366
has the file "c:\TESTFILE.txt" been created ?
how do you call the code?

1367
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: April 11, 2019, 02:53:47 PM »
i think CMyScriptObject.h file from machremote example is also a good reference


1368
Modbus / Re: Arduino and MODBUS to controll chinese ac servo spindle
« on: April 10, 2019, 01:51:24 PM »
IMHO,
i would go the "traditional" road.

0-10V for Speed control
use the digital Inputs Forward reverse orientation.

modbus i think will be an adventure.

1369
hello Roy,

pls describe what functions you Need, and we will see.

1370
General Mach Discussion / Re: Auto Calculator Size
« on: March 19, 2019, 02:35:48 AM »
font and fnt size can not be modyfied in VB script.

the only Thing you can Play with is: Menu -> Function Cfg's -> Font