Feature Request - SSV
Moderator: cnckeith
-
- Posts: 75
- Joined: Thu May 12, 2022 2:13 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Feature Request - SSV
Yes, you're right, of course 60 degrees. Only if you write 60 in parameter 51 only crap comes out. I had to halve the value so that it looks the way it should.
It's a shame you don't feel like it, thanks anyway
Stephan
It's a shame you don't feel like it, thanks anyway
Stephan
-
- Posts: 2291
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Feature Request - SSV
Maybe I have basic SSV tomorrow, but I must solve a small problem with alternating timers...
Uwe
Uwe
Re: Feature Request - SSV
There are lots of ways to use timers to make something happen repeatedly/periodically.
The simplest form, which I use for blinking lights and similar applications, requires just one timer.
This would make the memory bit turn on for a half second, then off for a half second, and repeat.
The key is the exclusive-or (^) operator. In the one scan of the PLC program where the timer has reached its preset (500ms), then the bit "Alternating_T" will evaluate to 1 (true), and the XOR will cause AlternatingBit_M to become 1 if it was 0, or 0 if it was 1. In every other scan, Alternating_T evaluates to 0, and AlternatingBit_M will be unchanged.
On the next line, if this is the scan in which the timer has reached its preset, then we reset the timer so it starts over at 0 when we set it again (via the "IF True" line) in the next scan.
For SSV, I imagine you would want a longer period than one second; and the alternating memory bit could be a flag that indicates whether you are increasing speed or decreasing speed.
The simplest form, which I use for blinking lights and similar applications, requires just one timer.
Code: Select all
Alternating_T IS T__
AlternatingBit_M IS MEM__
;...
IF True THEN Alternating_T = 500, SET Alternating_T
IF AlternatingBit_M ^ Alternating_T THEN (AlternatingBit_M)
IF Alternating_T THEN RST Alternating_T
The key is the exclusive-or (^) operator. In the one scan of the PLC program where the timer has reached its preset (500ms), then the bit "Alternating_T" will evaluate to 1 (true), and the XOR will cause AlternatingBit_M to become 1 if it was 0, or 0 if it was 1. In every other scan, Alternating_T evaluates to 0, and AlternatingBit_M will be unchanged.
On the next line, if this is the scan in which the timer has reached its preset, then we reset the timer so it starts over at 0 when we set it again (via the "IF True" line) in the next scan.
For SSV, I imagine you would want a longer period than one second; and the alternating memory bit could be a flag that indicates whether you are increasing speed or decreasing speed.
-
- Posts: 2291
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Feature Request - SSV
Thank you Marc for your help.
Very basic SSV functionality is here:
In this stage acceleration is only from settings in the servo driver, but maybe I figure out how to do this in PLC.
With 200-500 ms time and +-200rpm it runs smooth enough to be useful.
After G10 P980 R0 it depends on the state of SSV1_M what rpm will run, so better to set M3 Sxxx new.
Uwe
Very basic SSV functionality is here:
Code: Select all
;SSV Uwe G10 P980 R1 turns SSV ON, G10 P980 R0 turns SSV OFF
;G10 P981 Rxxx time for SSV in ms
;G10 P982 Rxxx rpm change for SSV in +- revolution
IF SpinStart_M && SV_MACHINE_PARAMETER_980 == 1 THEN SSV1_T = SV_MACHINE_PARAMETER_981, SET SSV1_T , SpinSpeedCommand_FW = SV_PC_COMMANDED_SPINDLE_SPEED
IF SSV1_M ^ SSV1_T THEN (SSV1_M), SpinSpeedCommand_FW = SV_PC_COMMANDED_SPINDLE_SPEED
IF SSV1_T THEN RST SSV1_T
IF SpinStart_M && SV_MACHINE_PARAMETER_980 == 1 THEN SSV2_T = SV_MACHINE_PARAMETER_981 /2, SET SSV2_T
IF SSV2_M ^ SSV2_T THEN (SSV2_M), SpinSpeedCommand_FW = SV_PC_COMMANDED_SPINDLE_SPEED
IF SSV2_T THEN RST SSV2_T
IF SSV1_M && SSV2_M THEN SpinSpeedCommand_FW = SpinSpeedCommand_FW - SV_MACHINE_PARAMETER_982 /2
IF SSV1_M && !SSV2_M THEN SpinSpeedCommand_FW = SpinSpeedCommand_FW - SV_MACHINE_PARAMETER_982
IF !SSV1_M && SSV2_M THEN SpinSpeedCommand_FW = SpinSpeedCommand_FW + SV_MACHINE_PARAMETER_982 /2
IF !SSV1_M && !SSV2_M THEN SpinSpeedCommand_FW = SpinSpeedCommand_FW + SV_MACHINE_PARAMETER_982
IF SpinSpeedCommand_FW > 1 THEN SET MEM999
IF SpinSpeedCommand_FW < 1 THEN RST MEM999
; In manual mode, assuming spindle is on, use speed scaled from CCFG max
With 200-500 ms time and +-200rpm it runs smooth enough to be useful.
After G10 P980 R0 it depends on the state of SSV1_M what rpm will run, so better to set M3 Sxxx new.
Uwe
Last edited by suntravel on Tue May 21, 2024 1:03 pm, edited 1 time in total.
-
- Posts: 58
- Joined: Thu Feb 01, 2024 5:34 am
- Acorn CNC Controller: No
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: Yes
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Contact:
Re: Feature Request - SSV
Kindly make a video for who is going to try it .
I wrote a version of this in LCNC before on my router. and it worked fairly well.
I wrote a version of this in LCNC before on my router. and it worked fairly well.
-
- Posts: 2291
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Feature Request - SSV
It is only copy and paste, compiling the PLC...
The hard part for me was the alternating timer, but with help from marc easy.
I hope some day I will have a better understanding of how to make things work in the PLC.
Definitions:
Code: Select all
SSV1_M IS MEM614
SSV2_M IS MEM617
SSV1_T IS T49
SSV2_T IS T50
Uwe
-
- Posts: 2291
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Feature Request - SSV
Test on my lathe
D14 1.4404 steel ap0.5mm F0.25mm S2500 min-1, turned down to 12mm, Z0 140mm in front of the chuck
SSV with 1.5s +-200 rpm
I would say a significant improvement compared to turning without SSV.
Uwe
D14 1.4404 steel ap0.5mm F0.25mm S2500 min-1, turned down to 12mm, Z0 140mm in front of the chuck
SSV with 1.5s +-200 rpm
I would say a significant improvement compared to turning without SSV.
Uwe
-
- Posts: 58
- Joined: Thu Feb 01, 2024 5:34 am
- Acorn CNC Controller: No
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: Yes
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Contact:
Re: Feature Request - SSV
wow that makes a lot of difference. Thanks for reporting back!
-
- Posts: 2291
- Joined: Thu Sep 23, 2021 3:49 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 6433DB0446C1-08115074
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Germany
Re: Feature Request - SSV
It works with threading also
But why is G10 on the lathe different than on the mill ?
Mill : G10 P980 R1
Lathe : G10 P1980 R1
Uwe
But why is G10 on the lathe different than on the mill ?
Mill : G10 P980 R1
Lathe : G10 P1980 R1
Uwe
Re: Feature Request - SSV
An unfortunate historical artifact.
Mill software came first, and it made sense to specify the parameter number directly with the P value.
Then when lathe software was developed, it was intended to be consistent with Fanuc 0T and similar controls.
On a Fanuc 0T lathe control, "G10 P1 ..." would set tool offset values for T1. So the form for setting machine parameters got bumped up 1000.
Granted, this implementation is still not strictly Fanuc-compatible. The "G10 P1 ..." form (P value between 1 and 99) is supposed to set tool wear offsets, and "G10 P1001 ..." (P value between 1001 and 1099) is supposed to set geometry offsets; but the Centroid interpretation was to use P values from 1 to 99 set set geometry offsets, and not to allow setting wear offsets with G10.
Mill software came first, and it made sense to specify the parameter number directly with the P value.
Then when lathe software was developed, it was intended to be consistent with Fanuc 0T and similar controls.
On a Fanuc 0T lathe control, "G10 P1 ..." would set tool offset values for T1. So the form for setting machine parameters got bumped up 1000.
Granted, this implementation is still not strictly Fanuc-compatible. The "G10 P1 ..." form (P value between 1 and 99) is supposed to set tool wear offsets, and "G10 P1001 ..." (P value between 1001 and 1099) is supposed to set geometry offsets; but the Centroid interpretation was to use P values from 1 to 99 set set geometry offsets, and not to allow setting wear offsets with G10.