- Posts: 12160
- Thank you received: 0
VFD mb2hal
HAL multiplies but does not divide so you need to mult2 by 1.66667zajc3w wrote: Thanks.
Mux4 seems more legant way to doing it, just have to figure out syntax.
I'm beginning to think that modyfiing hy_ modbus driver might be asier than trying to understand how hal ticks...
Conversion of rpm to Hz is another one.
All need is to divide rpm by 6 and convert to integer. Can I just slap division by 6 in hal?
Then you can conv_float_s32 to get a signed integer or CONV_FLOAT_U32 to get to an unsigned integer
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4739
- Thank you received: 2
Please Log in to join the conversation.
Todd Zuercher wrote: The spindle command speed is available in both RPM and RPS (Hz) in hal. So dividing by 60 should not be nessisary.
Discovered this literally 2 minutes ago while browsing wiki.
YL620 VFD take frequency in 0.1Hz resolution.
400Hz equals 4000.
So in my case (2pole spindle motor) absolute speed in rps multiplied by 10 and converted to uint32 will just do the trick.
Assuming that mb2hal will send olny 2 bytes when given uint32 input.
Will test it tommorow when I get some workshop time.
Thanks
Please Log in to join the conversation.
Thank you again for help.
I'm posting working YL620 mb2hal ini file with custom.hal in case anybody needs it
It works on box standard LinuxCNC2.7.14
BTW if you consider this VFD, dont!
If you have massive noise problems, you've been warned.
Schaffner FN2060-16-06 mains filter will help a lot (my DAB! radio works now) and ferrite bead(donut shaped ring) on rs485 line will stop your screen from going wonky.
Attachment not found
Attachment not found
Please Log in to join the conversation.
Please Log in to join the conversation.
Gnoem wrote: ... to change in the hy_vfd file for the standart huanyang vfd for operating with the yl620?
Hi,
Huanyang uses modified MODBUS protocol with non-standard function codes. It's wrong idea to modify it back to standard MODBUS functionality
Also probably you will be interested in other way to communicate with YL620: forum.linuxcnc.org/24-hal-components/391...communicaiton#168359
Please Log in to join the conversation.
Still I want to go further. Let's see. Thanks also for your advice with vfdmod I will have a look on this. The first impression looks a bit cleaner and easier to understand than md2hal.
Please Log in to join the conversation.
I also made some adjustment to my VFD Settings to help it work better at lower RPMs.
Please Log in to join the conversation.
