VFD mb2hal

More
23 Dec 2019 11:03 #153092 by rodw
Replied by rodw on topic VFD mb2hal

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?

HAL multiplies but does not divide so you need to mult2 by 1.66667
Then you can conv_float_s32 to get a signed integer or CONV_FLOAT_U32 to get to an unsigned integer
The following user(s) said Thank You: zajc3w

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

More
23 Dec 2019 13:31 #153097 by Todd Zuercher
Replied by Todd Zuercher on topic VFD mb2hal
The spindle command speed is available in both RPM and RPS (Hz) in hal. So dividing by 60 should not be nessisary.

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

More
23 Dec 2019 13:45 #153099 by zajc3w
Replied by zajc3w on topic VFD mb2hal

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 or Create an account to join the conversation.

More
24 Dec 2019 15:41 #153160 by zajc3w
Replied by zajc3w on topic VFD mb2hal
ITS ALIVE!!!
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.

File Attachment:

File Name: custom.hal
File Size:1 KB

File Attachment:

File Name: YL620_2019-12-24.ini
File Size:7 KB
Attachments:
The following user(s) said Thank You: Gnoem

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

More
21 May 2020 20:15 #168522 by Gnoem
Replied by Gnoem on topic VFD mb2hal
Thanks a lot! Have you maybe already succeeded to get a feedback from the VFD? Or realy found out whats needed to change in the hy_vfd file for the standart huanyang vfd for operating with the yl620? Honestly I dont understand how the commands are defined in the hy_vfd driver. As the functions are more or less the same in both models I thought its only changing of a few numbers, but as usual its more complicated...

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

More
22 May 2020 00:58 #168556 by aekhv
Replied by aekhv on topic VFD mb2hal

... 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 :) Try mb2hal with config file for YL620 above, zajc3w said it works.

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 or Create an account to join the conversation.

More
22 May 2020 09:31 #168565 by Gnoem
Replied by Gnoem on topic VFD mb2hal
yes the code of zajc3w works. It was quite nice seeing the first time the spindle switching on and off by computer commands.

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 or Create an account to join the conversation.

More
12 May 2021 22:19 #208666 by mattl
Replied by mattl on topic VFD mb2hal
Hi, I based my config for my YL620 on the one for this thread, but had some issues with it. Here is my working copy.

I also made some adjustment to my VFD Settings to help it work better at lower RPMs.
Attachments:

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

Time to create page: 0.151 seconds
Powered by Kunena Forum