grblHAL / Plugins_spindle

grblHAL plugins for spindle control
Other
9 stars 13 forks source link

Initial support for spindle power data #6

Closed dresco closed 2 years ago

dresco commented 3 years ago

Retrieves AC voltage and output current from Huanyang VFD, and calculates power

define SPINDLE_POWER_DATA to enable

Meliusja commented 2 years ago

I am curious why there is a desire to get motor power? Motor current is much more important since VFDs and motors are limited in their ability to support current. A VFD or motor can only achieve its power rating when the motor is at or above base speed and the voltage is high.

Also - Motor kVA is motor voltage motor current sqrt(3) Jeff

dresco commented 2 years ago

I am curious why there is a desire to get motor power?

kW felt like the most useful number to display (to me anyway) - as that's what both spindle and VFD are rated in. I have to retrieve power and voltage anyway, so all would be available. Has me wondering what commercial CNC machines display, perhaps just a load percentage?

Also - Motor kVA is motor voltage motor current sqrt(3)

I was going from the specs in the v1 Huanyang manual, where rated kW is simply V*A. Am assuming what is reported (on the display and over modbus) is the total current rather than per phase. I might put a clamp meter on and verify that one day. HY01D523B - 220V / 50Hz - 1.5 KW - 2.8 KVA - 7.0 A

This PR has stalled a bit anyway, as I need to rework some of the code before trying again.. Cheers, Jon.

Meliusja commented 2 years ago

I was just worried that people might be confused when they try to get 2kW from their 2kW motor/VFD when running at half speed, since both would only be capable of 1kW at half speed. The best number to display would be output current displayed as a percentage since it is the best indicator of how loaded the motor and vfd are. I would probably display it as a percentage or motor or vfd rated current which ever is lower.

BTW, output power and motor torque can be read directly from my HuanYang VFD. There must be a lot of variation among their VFD models.

Jeff

dresco commented 2 years ago

Closing this PR, will re-work for percentage spindle load in line with other machines..