Hello Guest it is April 29, 2024, 10:52:41 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 - Sweep

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »
11
 :D happy, happy, happy  :D

Can't believe it. Run it 10 times with 10 perfect stop positions!!!!!
It may not be pretty or particularly fail safe, but that's something I/we can work on, but it works and works again.

SetOemDro(817,20)
DoSpinCW()
Sleep(5000)

While Not IsActive(INDEX)
Sleep(1)
If IsActive(INDEX) Then DoSpinStop()
Wend

It looks like the whole key to the problem was the Sleep prior to stopping the spindle. Now that this works I'll revisit some of your earlier, safer, macros with timeouts and see if I can get those to work. Result!
Your continued support has been, and will continue to be, much appreciated.

Thanks ...Sweep

12
The original principle seems fine, as the spindle really is creeping, but the reaction time must be affected by something that we are not considering.
I have just done a video which I am trying to upload as everything looks great except the ultimate stopping position.

...Sweep

13
Ok. Just run the macro but the stop position varies wildly.
So far I've run the macro 4 times without changing the rundown time and I've had the stop position at (approx) 90 deg past once, 180 deg past twice, and 270 deg past detection point once.  :(

14
Let me try again with your last macro. 10 minutes please  :)

15
Good Evening TP,

Tried the latest solution last night but without success, although I was very tired so I am going to have another go now.
Having watched the Brains videos it seems that may offer a faster reacting solution but I have never used them before.
I thought I could insert a phantom output in the toolchange macro which Brain would recognise, say output 6, and then have the brain terminate with button press 110 Spindle on/off when it sees Spindle Index change state. Something like:

SetOEmDro(817,20)
DoSpinCW()
Sleep(5000)
SetTimer(11)
ActivateSignal(OUTPUT6)
While GetOEmDro > 0
          Sleep(1000)
Else DeActivateSignal(OUTPUT6)
If GetTimer(11) >10 Then
          Message ("Spindle alignment not achieved")
          Exit Sub
End If
Wend

I'm not sure how correct that is as I don't know if I've got the While, Else, and Ifs in the right order.
As far as the Brain is concerned I need to do an And that only executes it if Spindle speec is >0 and Output6 is =1

What are your thoughts?

...Sweep

16
What are Brains?

17
Question for tomorrow WHat drives your spindle drive  PWM, +10v,step dir, ???

The spindle drive is by the PWM output from Mach3 converted to the 0-10v required by the DC controller by a homemade circuit board.
Using the closed loop spindle control I get speeds that are normally +/- 1rpm from that requested all the way from 20 to 3000rpm. There is a bit of an overspeed when the spindle first starts but this will stabilise within 3 or 4 seconds as the PID learns.

...Sweep

18
It has worked but only intermittantly. I have tried increasing the look time from 5 to 20seconds, to allow the spindle speed to stabilise at 20rpm, but this hasn't improved things.
I have had one r two instances where the spindle has stopped right on the proximity but this has only happened around 10% of the times I have run the cycle. Most of the time I am getting the 'time out' message.
I have also tried utilising a seperate INPUT instead of INDEX but the effect is the same.
I will try have another go with the C axis idea using the DIR output to control the relay.

Sweep

19
Good evening TP,

Thanks again for your support. Lets see what happens!
Will report in 15 minutes.

Sweep

20
I will have to close down now as it's 10:40pm over here and my eyes are getting tired.
Thanks for your help TC and goodnight.

...Sweep

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »