Skip to content

H100: Use vfd_config.vfd_rpm_hz for hz<->rpm conversion#44

Open
Zelberor wants to merge 1 commit intogrblHAL:masterfrom
Zelberor:h100-add-vfd_rpm_hz
Open

H100: Use vfd_config.vfd_rpm_hz for hz<->rpm conversion#44
Zelberor wants to merge 1 commit intogrblHAL:masterfrom
Zelberor:h100-add-vfd_rpm_hz

Conversation

@Zelberor
Copy link
Copy Markdown

@Zelberor Zelberor commented Mar 31, 2026

Changes:

  • The H100 driver now uses the vfd_config.vfd_rpm_hz parameter for the hz<->rpm conversion just like YL620A/GS20

I made the change, because I own a 24000rpm/800Hz spindle that requires a different conversion factor than the 60 that is hardcoded in the driver. (Mine requires 30).


The alternative to this change would be to load the Max RPM value / VFD_GetRPMAt50Hz, like it is done for the "Huanyang v1", but the documentation for this parameter seems weird. Manual of the H100

Similar to the Huanyang, the H100 has a F144 parameter. It is labelled differently in the summary and description sections:

  • Summary: Rated rotating speed of motor (Ex. factory value per manual: 1440, but was set to 24000 when I got it)
  • Description: Motor rotating speed. It shall be set according to actual speed of the motor; displayed value is identical to this parameter and can be used as the parameter used for monitoring to facilitate the user;this set value is corresponding to to the rotating speed at 50Hz.

The VFD_GetRPMAt50Hz probably originated from the 50Hz part in this description?

I think entering the rpm@50Hz value into F144 is wrong.
My assumption is, that F144 is supposed to contain the rated/nominal/max rpm of the motor. And the 50Hz in the description only exists, because most industrial motors are rated for 50Hz, not 400 or 800.

I can also sort-of prove my assumption, because:

  • a) my VFD already had 24000 set when I got it from Aliexpress
  • b) I activated the "Operation speed" display option on the H100, which means the display now shows rpm instead of Hz. And the display shows the correct values with F144=24000.

You can activate the "Operation speed" display option with F170=2. Then on the "main" screen cycle through the display options with SHIFT(4 times: output freq -> set freq -> output current -> output voltage -> option set in F170). F180 can be used to set the default display option, btw. My VFD now always shows rpm instead of Hz :)

Anyway, I am still unsure about the proper meaning of F144 and opted to use the vfd_config.vfd_rpm_hz parameter instead.
Another option would be to read the number of poles (F143), where 400Hz spindles usually have 2 and mine has 4. Idk.

@terjeio
Copy link
Copy Markdown
Contributor

terjeio commented Apr 1, 2026

Reading the number of poles is preferable since adding the setting will trigger a settings reset for the spindle plugin and likely all plugins registered after it.

@Zelberor
Copy link
Copy Markdown
Author

Zelberor commented Apr 1, 2026

I see.

Just some further observations from the F143/F144 behavior (which I find really confusing):

  • F143 seems to only affect the display output when the vfd is stopped and F144 only affects it when the spindle is running...?
  • So as en example:
    • With F143=4 and F144=24000, I get 200Hz=6000rpm for both stopped and running state, which is correct for my spindle.
    • If I change just the F143 pole number from 4->2, the display now shows 12000rpm set value in the stopped state. But when running it's still at 6000.
    • Turning it around: If I just change F144=12000, then in the stopped state I still see 6000rpm. But when running it's now just 3000rpm.
  • Both F143 and F144 don't seem to make any difference in the actual operation. The spindle sounds completely the same.

Now reading F143/144 for the rpm<->hz conversion could still result in breaking changes for users since I suspect many have not set up F143/144. The parameters are not mentioned in many guides. But I agree that that is better than resetting settings.

I also agree that the pole number should be used for the calculation; I just wonder if it might make sense to read both values and sanity-check them against each other. And then issue a warning if they don't match?

Soo.. how should I proceed? And should I update this PR or create a new one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants