- Configuring LinuxCNC
- Advanced Configuration
- Spindle reversing using a reversing relay wanted with delay or wait low RPM
Spindle reversing using a reversing relay wanted with delay or wait low RPM
10 Nov 2020 02:37 #188836
by alkabal
Hi all
I like to allow my spindle mill Cortini L300 to lowering the rpm before activating/desactivating relay.
The relay is connected directly to motor wire, inversion is like a manual switch, and i think this is a really bad idea to do this immediately whithout checking low rpm or 0 rpm.
Some month ago i do something similar for delay the enable pin from vfd for add a "soft stop"
Unfortunately the timedelay is not enough for reverse/forward change because the asked speed from motion is done immediately.
so i have do this that "do the job"" but i'm open to any better suggestion
I like to allow my spindle mill Cortini L300 to lowering the rpm before activating/desactivating relay.
The relay is connected directly to motor wire, inversion is like a manual switch, and i think this is a really bad idea to do this immediately whithout checking low rpm or 0 rpm.
Some month ago i do something similar for delay the enable pin from vfd for add a "soft stop"
Unfortunately the timedelay is not enough for reverse/forward change because the asked speed from motion is done immediately.
so i have do this that "do the job"" but i'm open to any better suggestion
# timedelay before changing direction for prevent too much current inside motor and relay
setp timedelay.spindle-reverse-soft-stop.on-delay [SPINDLE_0]SOFT_REVERSE_DELAY
setp timedelay.spindle-reverse-soft-stop.off-delay [SPINDLE_0]SOFT_REVERSE_DELAY
net spindle-ccw => timedelay.spindle-reverse-soft-stop.in
net spindle-reverse-soft-stop <= timedelay.spindle-reverse-soft-stop.out
net spindle-reverse-soft-stop => [HMOT](CARD0).7i76.0.0.spindir
setp near.spindle-reverse-timedelay.difference 0.002
net timedelay-near-zero-reverse <= timedelay.spindle-reverse-soft-stop.elapsed
net timedelay-near-zero-reverse => near.spindle-reverse-timedelay.in1
setp near.spindle-reverse-timedelay.in2 5.002 # time elapsed after change so does not work at startup need to first select both direction for initilising
net timedelay-near-reverse-enable-pid <= near.spindle-reverse-timedelay.out
net timedelay-near-reverse-enable-pid => and2.spindle-reverse-timedelay.in0
net spindle-enable-soft-stop => and2.spindle-reverse-timedelay.in1
net spindle-enable-soft-stop-and2revdelay <= and2.spindle-reverse-timedelay.out
net spindle-enable-soft-stop-and2revdelay => pid.spindle.enable
Please Log in or Create an account to join the conversation.
11 Nov 2020 10:40 - 11 Nov 2020 10:40 #188980
by alkabal
Replied by alkabal on topic Spindle reversing using a reversing relay wanted with delay or wait low RPM
Hi
Impossible for me to found a way to do this correctly from hal so I’m in the process of writing a .comp for allow spindle enable management and dir relay vs actual velocity.
This is not what I really want but that work really better
If this can be useful for someone you can ask
Br
Impossible for me to found a way to do this correctly from hal so I’m in the process of writing a .comp for allow spindle enable management and dir relay vs actual velocity.
This is not what I really want but that work really better
If this can be useful for someone you can ask
Br
Last edit: 11 Nov 2020 10:40 by alkabal.
Please Log in or Create an account to join the conversation.
11 Nov 2020 23:14 - 11 Nov 2020 23:17 #189064
by alkabal
Replied by alkabal on topic Spindle reversing using a reversing relay wanted with delay or wait low RPM
Investigating some signal i have see something strange, using 2.8 from rpi4 official iso (thanks a lot for this !!)
I have see some irregularity in the spindle.0.on signal with halscope
What did you think about that ?
For the moment i can't reproduce so this is maybee only a little bug from halscope, i don't know
I have see some irregularity in the spindle.0.on signal with halscope
What did you think about that ?
For the moment i can't reproduce so this is maybee only a little bug from halscope, i don't know
Attachments:
Last edit: 11 Nov 2020 23:17 by alkabal.
Please Log in or Create an account to join the conversation.
12 Nov 2020 01:32 - 12 Nov 2020 01:32 #189079
by alkabal
Replied by alkabal on topic Spindle reversing using a reversing relay wanted with delay or wait low RPM
Well
I have some good result with .comp for adding a soft stop and soft reverse.
The very good news is the unplanned good effect on the mill controller.
Planned : add some delay if relay need to be activated/deactivated before starting controller
Planned : add some speed check before reversing direction for controller that need a relay for inverting motor wire
Planned : Soft stop allow my lathe to decrease speed before activate the regen brake (i think this one is too much efficient but i wan't to keep it for emergency use) forum.linuxcnc.org/10-advanced-configura...le-soft-stop?start=0
Unplanned : Soft stop allow the mill (without any brake) to decrease speed more quickly
I have some good result with .comp for adding a soft stop and soft reverse.
The very good news is the unplanned good effect on the mill controller.
Planned : add some delay if relay need to be activated/deactivated before starting controller
Planned : add some speed check before reversing direction for controller that need a relay for inverting motor wire
Planned : Soft stop allow my lathe to decrease speed before activate the regen brake (i think this one is too much efficient but i wan't to keep it for emergency use) forum.linuxcnc.org/10-advanced-configura...le-soft-stop?start=0
Unplanned : Soft stop allow the mill (without any brake) to decrease speed more quickly
Attachments:
Last edit: 12 Nov 2020 01:32 by alkabal.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Spindle reversing using a reversing relay wanted with delay or wait low RPM
Time to create page: 0.102 seconds