Hello Guest it is May 13, 2021, 11:27:38 PM

### Author Topic: Tangential spindle  (Read 6127 times)

0 Members and 1 Guest are viewing this topic.

#### TPS

• 2,130
##### Re: Tangential spindle
« Reply #10 on: April 17, 2015, 06:04:57 AM »
changed getdro(18) to getdro(13)

sorry wrong dro
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

#### TPS

• 2,130
##### Re: Tangential spindle
« Reply #11 on: April 17, 2015, 06:38:29 AM »
Hello Damir,

the feedrate thing is not working to seperate between
G0 and G1. if i look to your g-code maybe we can use the
z-axis as second trigger like this:

act_Z=GetDro(2)

If (act_Z>69) and (GetLed(4)=True) 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.

#### BR549

• 6,952
##### Re: Tangential spindle
« Reply #12 on: April 17, 2015, 10:27:07 AM »
What exactly is it that you are trying to do ?? I would love to help BUT I have no idea as to what you need. Do you have a picture of the machine ??

(;-) TP

#### Damir

• 9
##### Re: Tangential spindle
« Reply #13 on: April 17, 2015, 11:17:20 AM »
Hello Damir,

the feedrate thing is not working to seperate between
G0 and G1. if i look to your g-code maybe we can use the
z-axis as second trigger like this:

act_Z=GetDro(2)

If (act_Z>69) and (GetLed(4)=True) Then
If Not IsActive(Input1) Then
DoSpinCW()
End if
End If

If IsActive(Input1) Then
DoSpinStop()
End if

Thomas

My Z-axis is never constant so that every time I need to change the script.

#### Damir

• 9
##### Re: Tangential spindle
« Reply #14 on: April 17, 2015, 11:35:17 AM »
Thanks BR549

#### TPS

• 2,130
##### Re: Tangential spindle
« Reply #15 on: April 18, 2015, 02:27:15 AM »
Hello Damir,

if the function should only be enabled between M3 and M5 call in
g-code we can use them to enable like this:

Code: [Select]
`setUserLed(2100,1)`add this conde in M5
Code: [Select]
`setUserLed(2100,0)`
and this in macropump
Code: [Select]
`If (GetUserLed(2100)=True) and (GetLed(4)=True) Then  If Not IsActive(Input1) Then    DoSpinCW()  End if  End If  If IsActive(Input1) Then    DoSpinStop()  End if  `
the only thing i see, that nothing resets the UserLed if
you cancle a program.
but give it a try.

Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

#### Damir

• 9
##### Re: Tangential spindle
« Reply #16 on: April 18, 2015, 04:18:27 AM »
Unfortunately again nothing
Start spindle motor and turn it off when it detects input, after that it does not start spindle motor.

Damir

#### TPS

• 2,130
##### Re: Tangential spindle
« Reply #17 on: April 18, 2015, 06:47:52 AM »
Hello Damir,

tested here:

M3
setUserLed(2100,1)

M5
setUserLed(2100,0)

macropump
If GetOEMLed(2100) and GetLed(4) Then
If IsActive(Input1) Then
DoSpinStop()
else
DoSpinCW()
End if
End If

don't ask me why GetUserLed does not work, GetOEMLed is working.

Thomas

anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

#### TPS

• 2,130
##### Re: Tangential spindle
« Reply #18 on: April 18, 2015, 07:09:30 AM »
ok i am pretty sure the next problem will be the dwell of the spindle,
because it is locking axis movement and so Input1 will go off again.

so i think the only practicable way well be to drive a axis not tangential and
control it miz g-code, something like this:

G0 Z0 A0
G0 X100 Y100
G0 Z70
M3
G1 X0
M5
G1 A90
M3
G1 Y80
M5
G1 A180
M3
G1 X100
M5
G1 A90

and so on.
what means you can only do straight line an no circles
(witch would not work anyway with this code for turn on/off spindle)

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

#### BR549

• 6,952
##### Re: Tangential spindle
« Reply #19 on: April 18, 2015, 10:15:21 AM »
OK there are 2 servos one drives the tufting head ( C axis )  and the other(Z axis) does what ?  Why don't you simply program the stops and starts in the Gcode program ??

(;-) TP