Spindle servo step/dir Problems
24 Oct 2024 17:32 - 24 Oct 2024 17:48 #313117
by Stran_ge
Spindle servo step/dir Problems was created by Stran_ge
Hello People,i have a 3,7kw Servo from szgh that i would like to use as my Spindle Servo via step/dir(external pulse control).
To be more precise i am using a original Mesa 7i95 and the SZGH Servo is SZGH09-2-24-3,7/5,5-4-1500 with a max speed of 15000 rpm.
I can send the manual for the spindle servo if s1 feels very motivated to read that.
I am a novice with linuxcnc but i watched a video from talla83 and suprisingly got the spindle to turn. I am able to adjust speeds/direction with the according commands.
There is some stuff that does not work.
First vmc_2.halof all using M3 turns the spindle ccw and m4 turns it cw. It should be the other way around. I checked the wiring first and everything seems to be correct as seen in the table for the encoder.
SZGH-ServoMesa 7i950A
0A+ QA3
0A- /QA3
0B+ QB3
0B- /QB3
0Z+ IDX3
0Z- /IDX3
I also checked if the step/dir was correct and it is(polarity too).
If i run the spindle via mdi M3 s200 i get this in halshow (attached picture M3 S200 with positive rps)
If i run the spindle via mdi M4 S200 i get this in halshow (attached picture M4S200 with negative rps)
What i also noticed in Halshow is that whenever i command the rpm to go over 300 the spindle at speed signal does not go true anymore.
I really hope someone can help me here or give me some tipps, i have checked and tried many things but nothing really helped.
Best regards
Nils
To be more precise i am using a original Mesa 7i95 and the SZGH Servo is SZGH09-2-24-3,7/5,5-4-1500 with a max speed of 15000 rpm.
I can send the manual for the spindle servo if s1 feels very motivated to read that.
I am a novice with linuxcnc but i watched a video from talla83 and suprisingly got the spindle to turn. I am able to adjust speeds/direction with the according commands.
There is some stuff that does not work.
First vmc_2.halof all using M3 turns the spindle ccw and m4 turns it cw. It should be the other way around. I checked the wiring first and everything seems to be correct as seen in the table for the encoder.
SZGH-ServoMesa 7i950A
0A+ QA3
0A- /QA3
0B+ QB3
0B- /QB3
0Z+ IDX3
0Z- /IDX3
I also checked if the step/dir was correct and it is(polarity too).
If i run the spindle via mdi M3 s200 i get this in halshow (attached picture M3 S200 with positive rps)
If i run the spindle via mdi M4 S200 i get this in halshow (attached picture M4S200 with negative rps)
What i also noticed in Halshow is that whenever i command the rpm to go over 300 the spindle at speed signal does not go true anymore.
I really hope someone can help me here or give me some tipps, i have checked and tried many things but nothing really helped.
Best regards
Nils
Attachments:
Last edit: 24 Oct 2024 17:48 by Stran_ge.
Please Log in or Create an account to join the conversation.
24 Oct 2024 18:19 #313125
by PCW
Replied by PCW on topic Spindle servo step/dir Problems
Sounds like either the encoder scale or the step/dir scale (or both) are wrong.
Please Log in or Create an account to join the conversation.
24 Oct 2024 18:26 #313128
by Stran_ge
Replied by Stran_ge on topic Spindle servo step/dir Problems
Hello PCW,
thank you for the fast answer.
I checked the parameter of the servo with the manufacturer and he told me that the motor resolution per revolution is 1024 which is then *4 4096.
4096/60 = 68.26667 = pulse per second.
How does a wrong scale invert the direction for m3/m4?
thank you for the fast answer.
I checked the parameter of the servo with the manufacturer and he told me that the motor resolution per revolution is 1024 which is then *4 4096.
4096/60 = 68.26667 = pulse per second.
How does a wrong scale invert the direction for m3/m4?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6430
24 Oct 2024 19:08 #313139
by tommylight
So, add a - to scale
Or
Invert the direction pin in hal.
Replied by tommylight on topic Spindle servo step/dir Problems
It does not, uless a - sign is in front of it.How does a wrong scale invert the direction for m3/m4?
So, add a - to scale
Or
Invert the direction pin in hal.
Please Log in or Create an account to join the conversation.
24 Oct 2024 19:22 #313141
by Stran_ge
Replied by Stran_ge on topic Spindle servo step/dir Problems
i edit the line:
setp hm2_7i95.0.encoder.05.scale - [SPINDLE_0]ENCODER_SCALE
with a minus but that alone does not change the direction of m3/m4.
If i now go ahead and change a direction parameter on my servo drive to reverse
the spindle turns cw via m3 and ccw via m4 while spindle-fb-rps and spindle-speed-rps signal are both positive at least tho still slightly different values.
So i guess i can hack my way around the m3/m4 problem but still the problem with the speed is not solved by this.
at a certain speed close to 1000 rpm and above the spindle-at-speed never becomes true.
setp hm2_7i95.0.encoder.05.scale - [SPINDLE_0]ENCODER_SCALE
with a minus but that alone does not change the direction of m3/m4.
If i now go ahead and change a direction parameter on my servo drive to reverse
the spindle turns cw via m3 and ccw via m4 while spindle-fb-rps and spindle-speed-rps signal are both positive at least tho still slightly different values.
So i guess i can hack my way around the m3/m4 problem but still the problem with the speed is not solved by this.
at a certain speed close to 1000 rpm and above the spindle-at-speed never becomes true.
Please Log in or Create an account to join the conversation.
24 Oct 2024 19:56 #313145
by PCW
Replied by PCW on topic Spindle servo step/dir Problems
You need to reverse the sign of the step scale (or invert the direction output)
to reverse the spindle
to reverse the spindle
Please Log in or Create an account to join the conversation.
24 Oct 2024 20:08 #313146
by Stran_ge
Replied by Stran_ge on topic Spindle servo step/dir Problems
i get what you mean but i dont have a step scale/ direction output in my hal.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19188
- Thank you received: 6430
24 Oct 2024 20:10 #313147
by tommylight
Replied by tommylight on topic Spindle servo step/dir Problems
Edit the ini file, not the hal file.
Please Log in or Create an account to join the conversation.
24 Oct 2024 20:14 #313148
by PCW
Replied by PCW on topic Spindle servo step/dir Problems
Its this (in the ini file)
OUTPUT_SCALE = 68.26667
OUTPUT_SCALE = 68.26667
Please Log in or Create an account to join the conversation.
24 Oct 2024 20:22 - 24 Oct 2024 20:28 #313149
by Stran_ge
Replied by Stran_ge on topic Spindle servo step/dir Problems
i did invert it to:
OUTPUT_SCALE = -68.26667
and now the spindle turns correct.
The Problem with the difference between spindle-fb-rps and spindle-speed-rps still persists tho. spindle-fb-rps is negative and spindle-speed-rps is positive (in case of m3).
This lead to spindle-at-speed never beeing true.
Edit: even when i invert the encoder scale the difference btw. the fb rps and speed rps(commanded) is too big for spindle at speed to be true.
OUTPUT_SCALE = -68.26667
and now the spindle turns correct.
The Problem with the difference between spindle-fb-rps and spindle-speed-rps still persists tho. spindle-fb-rps is negative and spindle-speed-rps is positive (in case of m3).
This lead to spindle-at-speed never beeing true.
Edit: even when i invert the encoder scale the difference btw. the fb rps and speed rps(commanded) is too big for spindle at speed to be true.
Last edit: 24 Oct 2024 20:28 by Stran_ge.
Please Log in or Create an account to join the conversation.
Time to create page: 0.144 seconds