Lathe threading waiting

More
11 Jun 2019 14:38 - 11 Jun 2019 14:39 #136611 by bjames28
Dear All,

After several hours of thinking, testing and failing i have no more ideas what is the reason of lathe threading not starting

The encoder with A,B, Z signals are connected to Mesa 7i90, the HAL connections are done in the attached HAL file.
The encoders counts exactly 2000 per one spindle revolution (encoder scale set to 2000), the index polarity is correct (it goes up only once per revolution)

The motion.spindle-index-enable is connected to the encoder and also I have working spindle-at-speed
Because the non-linearity of pwm signal driving the VFD I added 50% tolerance of actual spindle speed , but this didn't help either.

The spindle speed seems very stable, so 400 RPM showed on the screen was checked with a hand-held meter.

Very similar setup with same gcode and encoder from other vendor just works nicely

What else should I check to find the possible reason of the issue?
Attachments:
Last edit: 11 Jun 2019 14:39 by bjames28. Reason: missing HAL attachment

Please Log in or Create an account to join the conversation.

More
11 Jun 2019 15:17 #136614 by PCW
Replied by PCW on topic Lathe threading waiting
Looks like either your spindle control or encoder scale are backwards

(commanded speed -400 RPM actual speed +319 RPM)
The following user(s) said Thank You: bjames28

Please Log in or Create an account to join the conversation.

More
11 Jun 2019 17:42 #136625 by bjames28
Replied by bjames28 on topic Lathe threading waiting
Thank you very much for the hint, when I changed the encoder scale to -2000, the magic happened :)

Other, issue I mentioned in first post is: how to correct the non-linearity of PWM output generated by Hostmot2 pwmgen?

Attached I upload a screenshot of sheet which contains the commanded RPM values and the measured DC voltage values on the input pins of VFD.
The beginning, the midpoint and the end values are exactly as expected, but others are up to 30% above or below the linear line.
Can it be compensated on software side ?
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Jun 2019 17:52 #136626 by PCW
Replied by PCW on topic Lathe threading waiting
That's pretty non-linear... How is the conversion to analog done?

You can correct for this by using the "lincurve" component If the analog conversion cannot be improved

Please Log in or Create an account to join the conversation.

More
11 Jun 2019 18:31 #136630 by bjames28
Replied by bjames28 on topic Lathe threading waiting
In actual setup I use custom made electronics, a 74HTC541 liner driver plus stuff very similar to the attached schematics, made by my colleague. Sorry, I have no exact drawing right now.
In this version there is no chance to modify it. But for the future version of this board I'd appreciate your recommendation.

As for "lincurve" I found this example , it seems pretty easy to implement.
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Jun 2019 18:45 #136634 by PCW
Replied by PCW on topic Lathe threading waiting
If you are using 1K and 10 UF for your filter, you probably should raise your PWM frequency to 1 KHz or so

1K -->10 uF RC would have ~2.5V ripple at 100 Hz, 50 %

Please Log in or Create an account to join the conversation.

Time to create page: 0.071 seconds
Powered by Kunena Forum