Hello Guest it is March 18, 2024, 11:29:22 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

1341
Code: [Select]
ActivateSignal(Output8)
While NOT IsActive(Input22)
Sleep(50)
Wend
DeActivateSignal(Output8)

would be the code for a simple test

1342
Mach Screens / Re: chinese cnc probing macros?
« on: April 25, 2019, 02:51:16 AM »
all those "probing" macros will work, no question,
but the Point is the accuracy you whant to have?

but this is a complete other discussion and offtopic here.

1343
added some more debug info in this code. pls run this code and (assume you use Mach3 Standard
turn screenset) go to Diags. an use the History Button.
post the Textfile after running the macro.

Code: [Select]
OldTool = GetCurrentTool()
Tool = GetSelectedTool()
MaxToolNum = 4      'Max number of tools for the changer
debug = true

If debug = true Then
Message "OldTool: " & OldTool & " NewTool: " & Tool
Sleep(200)
End If

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

SetCurrentTool(NewTool)

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

Sub StartTool
   ActivateSignal(Output8)
   If debug = true Then
Message "Output8 On"
Sleep(200)
   End If
   'Code "G4 P4.0"    'Wait for the tool to rotate past the sensor
      While IsMoving()
      Wend
End Sub

Sub CheckPins
   If IsActive(Input22) Then
      NewTool = 1
      End If
   If IsActive(Input21) Then
      NewTool = 2
      End If
   If IsActive(Input20) Then
      NewTool = 3
      End If
   If IsActive(Input19) Then
      NewTool = 4
      End If
  If debug = true Then
Message "NewTool= " & NewTool
Sleep(200)
  End If
End Sub

Sub Stoptool
   DeActivateSignal(Output8)
   If debug = true Then
Message "Output8 Off"
Sleep(200)
   End If
      While IsMoving()
      Wend
   ActivateSignal(Output9) 
   If debug = true Then
Message "Output9 On"
Sleep(200)
   End If
      Code "G4 P1.0"    'Wait for the tool to rotate onto ratchet stop
      While IsMoving()
      Wend
   DeActivateSignal(Output9)
   If debug = true Then
Message "Output9 Off"
Sleep(200)
   End If
      While IsMoving()
      Wend
End Sub 

1344
General Mach Discussion / Re: Ref All Home
« on: April 25, 2019, 02:23:34 AM »
for the Moment i can not see the real benefit of your script, because the
G0 X/Y25 moves are done in the actual fixture Offset (G54..).
let's say for example your G54 0,0 is in machine coords at 200,200 the machine
will go to 225/225 and do the ref X/Y.

faster would be to use G53 G0 X/Y25 then machine will go to 25mm from Limit Switches,
but this is dangerous if machine has not been homed before, because this 25,25 can be somewhere.

this are only my insignificant thoughts. ;)

1345
try this code, now you should see in Status line witch TC place is detected by the Inputs

Code: [Select]
OldTool = GetCurrentTool()
Tool = GetSelectedTool()
MaxToolNum = 4      'Max number of tools for the changer

Message "OldTool: " & OldTool & " NewTool: " & Tool
Sleep(200)

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

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 IsActive(Input22) Then
      NewTool = 1
      End If
   If IsActive(Input21) Then
      NewTool = 2
      End If
   If IsActive(Input20) Then
      NewTool = 3
      End If
   If IsActive(Input19) Then
      NewTool = 4
      End If
  Message "NewTool= " & NewTool
  Sleep(200)
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 

1346
CS-Lab / Re: CSMIO-ENC Spindle Orientation
« on: April 24, 2019, 12:03:34 PM »
i have also linked my Encoder Output from spindle servo to c axis and ENC module.
but i am doing the spindle orientation (for the ATC) on the servo drive, this is enabled
by a digital Input on the servo and reported back by a digital Output from the servo.

1347
Mach Screens / Re: chinese cnc probing macros?
« on: April 24, 2019, 06:03:15 AM »
My thought was that they may be writing to OEMDRO2000, 2001,2002, ...

But maybe their notes are completely wrong.

you seem to be right, missed the post with the Changelog notes.
Looks like they are writing UserDro 2000...

1348
dspMC/IP Motion Controller / Re: PC requirements for Mach4 with DSPMC
« on: April 24, 2019, 03:13:17 AM »
Mach4 Recommended Requirements

PREFERRED: 32 or 64-bit Laptop or Desktop – Using an External Motion Controller
Windows XP, Windows Vista, Windows 7, and Windows 8
An appropriate external motion controller
Mach4 Plugin for the selected Motion Controller
2Ghz CPU
1GB RAM
Video Card with 256MB RAM(Large G-code files, especially 3D files will require a video card with 512MB RAM or higher)


32-bit Desktop – Parallel Port Recommended Requirements
32-bit version of Windows XP, Windows Vista, or Windows 7
Mach4 Parallel Port Legacy Plugin (cost applicable)
2Ghz CPU
1GB RAM
Non-integrated Video Card with 256MB RAM(Large G-code files, especially 3D files will require a video card with 512MB RAM or higher)
*Use of Parallel Port for machine control only with desktop style computers with 32-bit versions of windows 7 and below.

1349
Mach Screens / Re: chinese cnc probing macros?
« on: April 24, 2019, 02:15:43 AM »
from Mach3Mill_1.84 doc
chapter 10.7.12 Straight Probe – G31

description:

After successful probing, parameters 2000 to 2005 will be set to the coordinates of the
location of the controlled point at the time the probe tripped and a triplet giving X, Y and Z
at the trip will be written to the triplet file if it has been opened by the M40
macro/OpenDigFile() function (q.v.)


example code:


N010 (probe to find center and diameter of circular hole)
N020 (This program will not run as given here. You have to)
N030 (insert numbers in place of <description of number>.)
N040 (Delete lines N020, N030, and N040 when you do that.)
N050 G0 Z <Z-value of retracted position> F <feed rate>
N060 #1001=<nominal X-value of hole center>
N070 #1002=<nominal Y-value of hole center>
N080 #1003=<some Z-value inside the hole>
N090 #1004=<probe tip radius>
N100 #1005=[<nominal hole diameter>/2.0 - #1004]
N110 G0 X#1001 Y#1002 (move above nominal hole center)
N120 G0 Z#1003 (move into hole - to be cautious, substitute G1 for G0 here)
N130 G31 X[#1001 + #1005] (probe +X side of hole)
N140 #1011=#2000 (save results)
N150 G0 X#1001 Y#1002 (back to center of hole)
N160 G31 X[#1001 - #1005] (probe -X side of hole)
N170 #1021=[[#1011 + #2000] / 2.0] (find pretty good X-value of hole center)
N180 G0 X#1021 Y#1002 (back to center of hole)
N190 G31 Y[#1002 + #1005] (probe +Y side of hole)
N200 #1012=#2001 (save results)
N210 G0 X#1021 Y#1002 (back to center of hole)
N220 G31 Y[#1002 - #1005] (probe -Y side of hole)
N230 #1022=[[#1012 + #2001] / 2.0] (find very good Y-value of hole center)
N240 #1014=[#1012 - #2001 + [2 * #1004]] (find hole diameter in Y-direction)
N250 G0 X#1021 Y#1022 (back to center of hole)
N260 G31 X[#1021 + #1005] (probe +X side of hole)
N270 #1031=#2000 (save results)
N280 G0 X#1021 Y#1022 (back to center of hole)
N290 G31 X[#1021 - #1005] (probe -X side of hole)
N300 #1041=[[#1031 + #2000] / 2.0] (find very good X-value of hole center)
N310 #1024=[#1031 - #2000 + [2 * #1004]] (find hole diameter in X-direction)
N320 #1034=[[#1014 + #1024] / 2.0] (find average hole diameter)
N330 #1035=[#1024 - #1014] (find difference in hole diameters)
N340 G0 X#1041 Y#1022 (back to center of hole)
N350 M2 (that's all, folks)


as written, a good Motion Controller or PP machine will have the exact result of G31 in
uservars 2000...2002

1350
I moved the " mark from in front of the G00 to In front of the X and now the machine works as it should.

imho by doing this, you should see a scripter Compiler error in the Status line, and the M6End macro
will not be executed at all. -> so no move