Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Folinn BD600 class in "Spindles" for RS485 support #1173

Open
apopanda opened this issue Mar 22, 2024 · 8 comments
Open

Feature: Folinn BD600 class in "Spindles" for RS485 support #1173

apopanda opened this issue Mar 22, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@apopanda
Copy link

apopanda commented Mar 22, 2024

Machine Context

Running a Root controller with the G-Penny spindle + VFD setup. They sent a Folinn BD600. It's not supported via RS485, so I'll write up the support

Feature Description

I'm attempting to create a working setup for this VFD for my use. After I get it working (and the entire process is followed), it could be merged. PR guidelines state, that an issue needs to be made for discussion. The code will be here:
https://github.com/apopanda/FluidNC
Manual for the VFD is here
https://cononmotor.com.au/wp-content/uploads/2017/09/BD600-Manual.pdf
And contains most of the necessary addresses, responses, etc.

Other Approaches

I really don't want to use PWM or switch cables around, so I'd rather implement it.

How I Can Help

There's no need for help from the Developers right now. I'm writing the implementation myself.

@apopanda apopanda added the enhancement New feature or request label Mar 22, 2024
@MitchBradley
Copy link
Collaborator

I am starting to shy away from including more VFDs into the code base. Every one increases our support cost.

@snoozemoose
Copy link

Is there any update to this? I also have the BD600 and just bought a board to start using FluidNC.

@apopanda
Copy link
Author

Is there any update to this? I also have the BD600 and just bought a board to start using FluidNC.

Apologies, I saw your comment, decided to reply when I had the time, then forgot about it. I have finished the implementation and am currently using it on my CNC laptop. The implementation that's here isn't complete. When I find the time, I'll grab the code from the other machine and upload it here. I've setup a reminder for myself to do so, should be here within a week at most.

@snoozemoose
Copy link

snoozemoose commented Jan 8, 2025

@apopanda I missed your reply until now, thanks for getting back to me! I've pulled in your current changes and am looking forward to your coming uploads. I'm running a GPenny spindle 24k RPM at 800 Hz , will I need to change anything other than _minFrequency and _maxFrequency in the header file? Poles and phase are already the same.

@MitchBradley
Copy link
Collaborator

I had a look at the code in the github repo above and I have a couple of concerns:

  • The commentary does not match the code. The commentary mentions commands 5, 1 and 4, while the code uses commands 6 and 3.
  • It seems to me that the speed will be set to either 0 or max, because of this line
       uint32_t speed_percentage = (dev_speed / _maxFrequency) * 100 * 100; // percentage, two decimal places

It is integer arithmetic, and the phrase dev_speed / _maxFrequency will evaluate to 1 if dev_speed==_maxFrequency, otherwise 0. For integer scaling, you need to do the multiplication before the division.

@apopanda
Copy link
Author

apopanda commented Jan 9, 2025

I had a look at the code in the github repo above and I have a couple of concerns:

* The commentary does not match the code.  The commentary mentions commands 5, 1 and 4, while the code uses commands 6 and 3.

* It seems to me that the speed will be set to either 0 or max, because of this line
       uint32_t speed_percentage = (dev_speed / _maxFrequency) * 100 * 100; // percentage, two decimal places

It is integer arithmetic, and the phrase dev_speed / _maxFrequency will evaluate to 1 if dev_speed==_maxFrequency, otherwise 0. For integer scaling, you need to do the multiplication before the division.

The code that's uploaded isn't ready. I need to get to my workshop laptop and upload the working version. I have that one running with all the settings setup, frequency working etc.

@apopanda
Copy link
Author

Alright, I uploaded what I had on the laptop. I'll take a look at the commentary soon, though it most likely me fixing the code in debug, and not updating comments. Or copying from the original file and not changing them to the BD600 at all. More likely I filled it out according to what I understood from the manual, but it turned out to be more simple - 06 for write and 03 for read, and I didn't edit it.

@snoozemoose you will need to setup the VFD as it says in the .cpp file. Basically setting max frequency, command source to RS485, frequency source etc. Make sure to check all of this with the manual, just in case.

@snoozemoose
Copy link

snoozemoose commented Jan 19, 2025

@apopanda, I just wanted to let you know that I will test your code as soon as I can but I still have some things to finish on my machine before I’m ready. Thanks a lot for uploading the fixes!
Edit: hopefully I’ll be ready within the coming two weeks 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants