Hello Guest it is March 29, 2024, 03:53:06 AM

Author Topic: Tangential spindle  (Read 7865 times)

0 Members and 1 Guest are viewing this topic.

Tangential spindle
« on: April 15, 2015, 11:52:05 AM »
Hello

If someone can help me with the script, I currently use 4-axis in the tangential mode.
4-axis rotates servo motor (step / dir), which serves as a spindle motor.
My question is, spindle motor should run only until the 4-axis is not moving, and stop when moving 4-axis.
4-axis movement detected by capacitive sensor (input1)
thanks

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Tangential spindle
« Reply #1 on: April 16, 2015, 03:07:39 AM »
Hi,

macropump can help:

If IsActive(Input1) Then
  DoSpinStop()
End If

Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Tangential spindle
« Reply #2 on: April 16, 2015, 05:15:07 AM »
I tried with this script:

If Not IsActive(Input1) Then
DoSpinCW()
End if 
If IsActive(Input1) Then
DoSpinStop()
End if 
End

and works but it is immediately activated and working all the time and to jog, G0 and G1.
I need a script that would be activated only in G1.
Thanks

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Tangential spindle
« Reply #3 on: April 16, 2015, 06:37:36 AM »
Hi,

something like this might work:

act_feedrate=GetDro(18)

If (act_feedrate<1500) and (GetLed(4)=1) Then
  If Not IsActive(Input1) Then
    DoSpinCW()
  End if 
  If IsActive(Input1) Then
    DoSpinStop()
  End if 
End If

Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Tangential spindle
« Reply #4 on: April 16, 2015, 12:06:56 PM »
Thank you for helping me.
Unfortunately does not work, script the Start spindle motor but not turn off spindle when the input is active.
thanks

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Tangential spindle
« Reply #5 on: April 16, 2015, 02:41:03 PM »
Ok seems not to be so easy,

act_feedrate=GetDro(18)

If (act_feedrate<1500) and (GetLed(4)=1) Then
  If Not IsActive(Input1) Then
    DoSpinCW()
  End if 
End If

  If IsActive(Input1) Then
    DoSpinStop()
  End if 


Thomas
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Tangential spindle
« Reply #6 on: April 17, 2015, 04:44:09 AM »
does not work
when first detected active (input1) turns off spindle motor and then do not turn on spindle.
question:
Could we use M code in the G-code to activate the script, for example M3 activate script, M5 deactivate script (or we can create some other M code),
because we are in the script from before had a problem because she started immediately as soon as start Mach3?
thanks
Damir

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Tangential spindle
« Reply #7 on: April 17, 2015, 05:05:09 AM »
Hello,

--Could we use M code in the G-code to activate the script, for example M3 activate script, M5 deactivate script (or we can create some other M code),
--because we are in the script from before had a problem because she started immediately as soon as start Mach3?
--thanks
--Damir

please try to explane what is the real clue behind this fuctionality,
because for the moment i am not that i understand 100% the thing.

maybe a snipped of your g-code wold help.



Thomas  




anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Tangential spindle
« Reply #8 on: April 17, 2015, 05:36:03 AM »
I make a machine for making rugs and use tufting head (driven by servo motor) tufting head rotates 360 degrees.Such a script I need to stop the servo motor while the tufting head rotates, otherwise makes mistakes and hitting too many yarns in one place.

this is an example of my G-coda:
G21 (metric ftw)
G90 (absolute mode)
G91.1 X0.00 Y0.00 Z0.00 F2500.00 (axis position)
G91.1 Z0.00 F2500.00

M01 (Tufting yarn colors 'Layer 1')
(Tufting consisting of 1 segments.)
G0 X98.20 Y120.82
Z70.00 (z-axis in the position)
M3 G4 P3 (needle start wait 3ms)
G1 X-96.94 Y120.82
G1 X-96.94 Y114.33
G1 X98.20 Y114.33
G1 X98.20 Y107.84
G1 X-96.94 Y107.84
G1 X-96.94 Y101.35
G1 X98.20 Y101.35
G1 X98.20 Y94.86
G1 X-96.94 Y94.86
G1 X-96.94 Y88.36
G1 X98.20 Y88.36
G1 X98.20 Y81.87
G1 X-96.94 Y81.87
G1 X-96.94 Y75.38
G1 X98.20 Y75.38
G1 X98.20 Y68.89
G1 X-96.94 Y68.89
G1 X-96.94 Y62.40
G1 X98.20 Y62.40
G1 X98.20 Y55.91
G1 X-96.94 Y55.91
G1 X-96.94 Y49.42
G1 X98.20 Y49.42
G1 X98.20 Y42.93
G1 X-96.94 Y42.93
G1 X-96.94 Y36.44
G1 X98.20 Y36.44
G1 X98.20 Y29.94
G1 X-96.94 Y29.94
G1 X-96.94 Y23.45
G1 X98.20 Y23.45
G1 X98.20 Y16.96
G1 X-96.94 Y16.96
G1 X-96.94 Y10.47
G1 X98.20 Y10.47
G1 X98.20 Y3.98
G1 X-96.94 Y3.98
M5 Z0.00 (needle stop z-axis in the position)
G4 P0 (wait 0ms)

(end of tuft job)
M5 Z0 (needle stop z-axis in the position)
G4 P0 (wait 0ms)
G0 X0 Y0 Z0 A0 F2500.00 (go back to zero)

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Tangential spindle
« Reply #9 on: April 17, 2015, 05:58:25 AM »
Hi Damir,

makes it a little bit clearer
put this in macropump:


act_feedrate=GetDro(13)

If (act_feedrate<3500) and (GetLed(4)=True) Then
  If Not IsActive(Input1) Then
    DoSpinCW()
  End if  
End If

  If IsActive(Input1) Then
    DoSpinStop()
  End if  


what i try to do with this:

act_feedrate=GetDro(13)
If (act_feedrate<3500) and (GetLed(4)=True) Then

is to the check the atual feedrate the 3500 must be lower than your G0 feedrate and
higher than your max G1.
try to use this to seperate between G0 and G1.

the GetLed(4)=True is to check that a g-code programm ist started.



Thomas
« Last Edit: April 17, 2015, 06:03:59 AM by TPS »
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.