VFD mb2hal

More
6 years 10 months ago #153073 by andypugh
Replied by andypugh on topic VFD mb2hal
The reason I suggested mux was that it appears that the requirement is 18 for forward and 1 for stop?

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

More
6 years 10 months ago #153090 by zajc3w
Replied by zajc3w 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?

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

More
6 years 10 months ago #153092 by rodw
Replied by rodw on topic VFD mb2hal

zajc3w 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?

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


RodW
The following user(s) said Thank You: zajc3w

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

More
6 years 10 months ago #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
6 years 10 months ago #153099 by zajc3w
Replied by zajc3w on topic VFD mb2hal

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

More
6 years 10 months ago #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:706 B

File Attachment:

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

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

Time to create page: 0.394 seconds
Powered by Kunena Forum