Servo Encoder set up issue
19 Feb 2022 15:17 - 20 Feb 2022 14:05 #235328
by rider-83
Servo Encoder set up issue was created by rider-83
CNC Lathe, using AC Servo for spindle motor.
Servo Type: Generic 90ST-M02430 (Sometimes listed as Vevor or Yichuan)
Gearing is 1:1
I'm having some issues with screw cutting and also feed rates, and my attention is drawn to the encoder.
I have since moved away from the homemade encoder assembly that was mounted on the spindle in favour of using the encoder that is a built in part of the servo drive.(I initially believed my home made encoder was the root of the issue, but the problem remains even with the new encoder)
I am collecting Phases A & B, and index Z (Single ended only on all phases)
There may be several issues with my configuration, but one at a time:
If I set the servo encoder to 100 PPR(Via parameter 217 in the servo drive)
and
encoder.0.position-scale to 400 (100x4 Because i'm using Quadrature)
Then if I look at 'encoder.0.position' via HAL Show, and rotate the spindle slowly one turn by hand, then I see not 1.0 but 25.0 instead
If I set the servo encoder to 100
and
encoder.0.position-scale to 100 (ignoring Quadrature)
Then if I look at 'encoder.0.position' via HAL Show, and rotate the spindle by hand, then I see an exact 100
Therefor I have found that If I set the servo encoder to 100
and
encoder.0.position-scale to 10000
Then I see the correct 1.0per turn
What would cause this incorrect count ?
Servo Type: Generic 90ST-M02430 (Sometimes listed as Vevor or Yichuan)
Gearing is 1:1
I'm having some issues with screw cutting and also feed rates, and my attention is drawn to the encoder.
I have since moved away from the homemade encoder assembly that was mounted on the spindle in favour of using the encoder that is a built in part of the servo drive.(I initially believed my home made encoder was the root of the issue, but the problem remains even with the new encoder)
I am collecting Phases A & B, and index Z (Single ended only on all phases)
There may be several issues with my configuration, but one at a time:
If I set the servo encoder to 100 PPR(Via parameter 217 in the servo drive)
and
encoder.0.position-scale to 400 (100x4 Because i'm using Quadrature)
Then if I look at 'encoder.0.position' via HAL Show, and rotate the spindle slowly one turn by hand, then I see not 1.0 but 25.0 instead
If I set the servo encoder to 100
and
encoder.0.position-scale to 100 (ignoring Quadrature)
Then if I look at 'encoder.0.position' via HAL Show, and rotate the spindle by hand, then I see an exact 100
Therefor I have found that If I set the servo encoder to 100
and
encoder.0.position-scale to 10000
Then I see the correct 1.0per turn
What would cause this incorrect count ?
Last edit: 20 Feb 2022 14:05 by rider-83.
Please Log in or Create an account to join the conversation.
19 Feb 2022 18:52 #235340
by PCW
Replied by PCW on topic Servo Encoder set up issue
That would be 10000 counts/turn so more that a few turns per second = say a few hundred RPM would be the fastest the spindle encoder could be read with a parallel port.
Please Log in or Create an account to join the conversation.
19 Feb 2022 19:30 #235343
by rider-83
Replied by rider-83 on topic Servo Encoder set up issue
It dawned on me later that the original PPR value was 2500 factory default.
4x2500=10000
I'm wondering, if the new value I selected of 100ppr hasn't actually registered and is still 2500.
I've discovered that the actual encoder is 2500, but the driver does some stuff with the signal to select different ppr's at the user port end , I think ?
4x2500=10000
I'm wondering, if the new value I selected of 100ppr hasn't actually registered and is still 2500.
I've discovered that the actual encoder is 2500, but the driver does some stuff with the signal to select different ppr's at the user port end , I think ?
Please Log in or Create an account to join the conversation.
19 Feb 2022 20:07 - 19 Feb 2022 20:08 #235345
by PCW
Replied by PCW on topic Servo Encoder set up issue
The drives encoder resolution should not change (its fixed at 2500 PPR)
The question is: can you change the drives simulated encoder output resolution.
The question is: can you change the drives simulated encoder output resolution.
Last edit: 19 Feb 2022 20:08 by PCW.
Please Log in or Create an account to join the conversation.
19 Feb 2022 20:38 #235348
by rider-83
Replied by rider-83 on topic Servo Encoder set up issue
Hmmmm.
The manual isn't very clear, as its one of those Chinese to English types. Plus, its tiny, which doesn't help,as the text isn't very clear.
I was led to believe from the manual, that the ppr is manipulated via a parameter, but perhaps they mean something else by that.
I shall scour through it to see what I can find regarding the output resolution.
The manual isn't very clear, as its one of those Chinese to English types. Plus, its tiny, which doesn't help,as the text isn't very clear.
I was led to believe from the manual, that the ppr is manipulated via a parameter, but perhaps they mean something else by that.
I shall scour through it to see what I can find regarding the output resolution.
Please Log in or Create an account to join the conversation.
20 Feb 2022 14:17 - 20 Feb 2022 14:18 #235386
by rider-83
Replied by rider-83 on topic Servo Encoder set up issue
Success !
I've found some parameters that adjust the 2500ppr. The manual doesn't draw your attention to them or relates them all together when adjusting the PPR, so this is how it was missed.
For those out there with the same type of servo, please note.
PPR is default 2500
Pn217 = 2500
Pn016 = 1 (Freq Division)
Pn017 = 1 (Denominator)
Calculation is Pn217 / (Pn16/Pn17) = PPR
or 2500 / (1/1) = 2500 PPR
Then 2500 x4 = 10,000 Using Quadrature
In my case I require 400 counts in my HAL Scale setting, Therefor:
Pn217 = 2500
Pn016 = 25
Pn017 = 1
Or 2500 / (25/1) = 100
Then 100 x4 =400 (In HAL)
The erratic spindle readings have now settled down dramatically. The tacho on the servo drive now corresponds exactly with 'encoder.0.velocity-rpm'
However, the speed indicated by both readings is slightly below commanded rpm, and fluctuates by around 25rpm, but I believe this may be down to my speed control circuit.
I hope this is useful information to others that have purchased a similar servo drive, and are struggling with the manual.
I've found some parameters that adjust the 2500ppr. The manual doesn't draw your attention to them or relates them all together when adjusting the PPR, so this is how it was missed.
For those out there with the same type of servo, please note.
PPR is default 2500
Pn217 = 2500
Pn016 = 1 (Freq Division)
Pn017 = 1 (Denominator)
Calculation is Pn217 / (Pn16/Pn17) = PPR
or 2500 / (1/1) = 2500 PPR
Then 2500 x4 = 10,000 Using Quadrature
In my case I require 400 counts in my HAL Scale setting, Therefor:
Pn217 = 2500
Pn016 = 25
Pn017 = 1
Or 2500 / (25/1) = 100
Then 100 x4 =400 (In HAL)
The erratic spindle readings have now settled down dramatically. The tacho on the servo drive now corresponds exactly with 'encoder.0.velocity-rpm'
However, the speed indicated by both readings is slightly below commanded rpm, and fluctuates by around 25rpm, but I believe this may be down to my speed control circuit.
I hope this is useful information to others that have purchased a similar servo drive, and are struggling with the manual.
Last edit: 20 Feb 2022 14:18 by rider-83.
Please Log in or Create an account to join the conversation.
06 Mar 2022 12:21 #236499
by rider-83
Replied by rider-83 on topic Servo Encoder set up issue
I've discovered another issue with my encoder set up.
When running the spindle CW (M3), all is well.
However, when I select CCW (M4), then I loose the 0-10v signal.
I achieve spindle direction change by swapping the 0-10v polarity via a relay.
This system worked perfectly fine until I wired in the servo encoder.
If I remove the wires that supply the 0-10v to the servo drive, and meter across them, then I see the correct readings in either M3 (+ 0-10v) or M4 (- 0-10v).
What I'm seeing is almost like the - 0-10v is being pulled down to zero for some reason.
The phase signals supplied from the servo drive are +A/-A +B/-B & +Z/-Z
But rather than collect these differential signals, I've opted for single sided and collect just +A +B +Z.
According with the manual, I have wired +A , +B , +Z and the GND pins from the servo drive directly to my second LPT port. Phases are connected to pins 10,11 & 12 respectively, and GND to pin 25.
If I pull the DB25 from the LPT/servo drive, then the spindle performs correctly.
I don't seem to be able to see the wood from the trees here. Have I missed something in respect to the direct connect to the LPT port?
When running the spindle CW (M3), all is well.
However, when I select CCW (M4), then I loose the 0-10v signal.
I achieve spindle direction change by swapping the 0-10v polarity via a relay.
This system worked perfectly fine until I wired in the servo encoder.
If I remove the wires that supply the 0-10v to the servo drive, and meter across them, then I see the correct readings in either M3 (+ 0-10v) or M4 (- 0-10v).
What I'm seeing is almost like the - 0-10v is being pulled down to zero for some reason.
The phase signals supplied from the servo drive are +A/-A +B/-B & +Z/-Z
But rather than collect these differential signals, I've opted for single sided and collect just +A +B +Z.
According with the manual, I have wired +A , +B , +Z and the GND pins from the servo drive directly to my second LPT port. Phases are connected to pins 10,11 & 12 respectively, and GND to pin 25.
If I pull the DB25 from the LPT/servo drive, then the spindle performs correctly.
I don't seem to be able to see the wood from the trees here. Have I missed something in respect to the direct connect to the LPT port?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
06 Mar 2022 14:39 #236507
by tommylight
Replied by tommylight on topic Servo Encoder set up issue
If you are reversing the analog output, it requires reversing encoder scale by putting a - in front of the number.
Please Log in or Create an account to join the conversation.
06 Mar 2022 16:16 #236517
by rider-83
Replied by rider-83 on topic Servo Encoder set up issue
I can try it, but would that physically pull down the signal?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19209
- Thank you received: 6438
06 Mar 2022 18:47 #236526
by tommylight
Replied by tommylight on topic Servo Encoder set up issue
No.
I did not get that with the " 0-10v is being pulled down to zero"
I did not get that with the " 0-10v is being pulled down to zero"
Please Log in or Create an account to join the conversation.
Time to create page: 0.083 seconds