Root 3 CNC - MKS DLC V2.0

I was able to get the SD card issue fixed.

In src/Serial.cpp, change line 124 from 4096 to 8192

After I made the change and updated the board it can see the SD card.

I’m having trouble with my VFD operating over RS485. When I issue M3 S10000 nothing happens.

I get this error back when monitoring the serial port:

ok
[MSG:Critical Spindle RS485 did not reach speed 1000. Reported speed is -1 rpm.]
ok
ALARM:10

It looks like whatever controller you’re using and sending the information out to the vfd over modbus is looking for confirmation back from the vfd that it has reached speed before it’ll start moving. That’s pretty common with CNC controllers especially higher-end ones.

If you’re using modbus for communication you need to make sure that the controller is pulling the correct spots in the hex locations to get back the “spindle at speed” okay confirmation. I don’t know much about what controller you’re using or vfd but both ends of that communication need to be set up correctly so it’s looking at the rate feedback data from the vfd.

1 Like

I enabled VFD debugging. This is what is happening when I issue $X and M3 S24000:

10:05:47.732 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:47.779 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:47.779 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:05:49.031 → [MSG:Caution: Unlocked]
10:05:49.031 → ok
10:05:50.054 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:50.054 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:50.054 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:05:52.322 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:52.322 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:52.322 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:05:54.638 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:54.638 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:54.638 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:05:56.912 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:56.912 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:56.912 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:05:59.462 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:05:59.462 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:05:59.462 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:01.731 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:01.731 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:01.731 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:03.212 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:03.676 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:04.001 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:04.001 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:04.047 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:04.186 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:04.697 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:05.207 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:05.671 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:06.181 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:06.320 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:06.320 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:06.320 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:06.688 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:07.200 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:07.710 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:08.174 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:08.590 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:08.590 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:08.590 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:08.683 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:09.192 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:09.700 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:10.210 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:10.675 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:11.140 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:11.140 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:11.140 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:11.186 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:11.695 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:12.207 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:12.672 → [MSG:Syncing RPM. Requested 24000, current -1]
10:06:13.183 → [MSG:Critical Spindle RS485 did not reach speed 24000. Reported speed is -1 rpm.]
10:06:13.183 → ok
10:06:13.183 → ALARM:10
10:06:13.415 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:13.415 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:13.415 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:13.697 →
10:06:13.697 → Grbl 1.3a [’$’ for help]
10:06:13.697 → [MSG:’$H’|’$X’ to unlock]
10:06:15.685 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:15.685 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:15.685 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:18.003 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:18.003 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:18.003 → [MSG:RS485 received message of unexpected length; expected 10, got 4]
10:06:20.282 → [MSG:RS485 Tx: 0x01 0x03 0xB0 0x05 0x00 0x02 0xF2 0xCA]
10:06:20.282 → [MSG:RS485 Rx: 0x01 0x30 0xC0 0xFC]
10:06:20.282 → [MSG:RS485 received message of unexpected length; expected 10, got 4]

I’m using the H2A spindle for my Spindle Type in my EPS32 machine.h. It seems to match what my G-Penny H100 VFD is according to the manual.

In the settings you probably have to tell the vfd to communicate over modbus/rs485 , have you set that parameter in the vfd yet?

Because a lot of times people might want to set it off of specific set points, or off of 0 to 10 volt, or off of modbus. And the vfd needs to know which of those it’s trying to communicate on.

1 Like

The H2A spindle is close but not close enough.

I ordered a RS485 converter adaptor so I can send commands directly to the VFD. So now I’m going to brush up on the Modbus standard over the weekend and Monday when I get the RS485 converter adaptor I can hopefully create a spindle profile with some help of the creator of Root CNC.

Best of luck. A lot of the import vfds don’t use a standard modbus protocol. A lot of them use a modified or truncated version which has some idiosyncrasies. For example I know that the huanyang vfds needed to have users make specialty plugins for them to work properly. You can take a look at user groups for mach3, uccnc, linuxcnc, etc to see the problems they ran into. And the modbus protocol though very powerful is not necessarily intuitive when you first start digging into it. I finally got mine figured out after almost 8 months of having my new cnc. I was able to get turning on the spindle, set rotation direction, and setting the vfd RPM working right away. But now I am now able to get it to give back actual rpm, current draw, voltage, alarm status, etc. That took me a while to figure out.

2 Likes

I need to do some custom modbus stuff.
Can you point me to any learning resources you found help please ?

Most of the stuff I found was slightly specific to UCCNC which is what I use to drive my router. That in combination with looking over a lot of other people’s config files in the UCCNC forums and reading the Huanyang GT manual. Modbus is really a confusing topic for me still, but the biggest thing was finding what addresses and hex values needed to be passed back and forth between what the vfd knows and what the UCCNC modbus plugin is looking for. To be honest my methodology was akin to the monkeys smashing on keyboards to write the works of Shakespeare approach. Sorry I can’t be of more assistance.

2 Likes

Well, I’m getting closer to controlling my H100 VFD over RS485 using my Root Controller. I’m not sure what the issue is here.

I’m kind of thinking it might just make more sense to purchase a different vfd. One that is used by a lot of other members in the Root CNC group but I feel like I’m really close to getting this one working.

[MSG:INFO: RS485 Tx: 0x01 0x04 0x00 0x00 0x00 0x02 0x71 0xCB]
[MSG:INFO: RS485 Rx: 0x01 0x04 0x04 0x00 0x00 0x0F 0xA0 0xFE]
[MSG:INFO: RS485 CRC check failed]
[MSG:INFO: RS485 Tx: 0x01 0x04 0x00 0x00 0x00 0x02 0x71 0xCB]
[MSG:INFO: RS485 Rx: 0x01 0x04 0x04 0x00 0x00 0x0F 0xA0 0xFE]
[MSG:INFO: RS485 CRC check failed]
[MSG:INFO: RS485 Tx: 0x01 0x04 0x00 0x00 0x00 0x02 0x71 0xCB]
[MSG:INFO: RS485 Rx: 0x01 0x04 0x04 0x00 0x00 0x0F 0xA0 0xFE]
[MSG:INFO: RS485 CRC check failed]
[MSG:INFO: RS485 Tx: 0x01 0x04 0x00 0x00 0x00 0x02 0x71 0xCB]
[MSG:INFO: RS485 Rx: 0x01 0x04 0x04 0x00 0x00 0x0F 0xA0 0xFE]
[MSG:INFO: RS485 CRC check failed]
[MSG:INFO: RS485 Tx: 0x01 0x04 0x00 0x00 0x00 0x02 0x71 0xCB]
[MSG:INFO: RS485 Rx: 0x01 0x04 0x04 0x00 0x00 0x0F 0xA0 0xFE]
[MSG:INFO: RS485 CRC check failed]
[MSG:INFO: VFD RS485 Unresponsive]
[MSG:INFO: VFD: Max speed:2400rpm]
[MSG:INFO: VFD: Min speed:600rpm]

Hey fellas I’m new to CNC and building my own machine at the moment. Love this tread because I just purchased the MKS DLC 2.1. The “CNC Shield” boards weren’t tickling my fancy and I liked this Makerbase board for the 4 axis/dual Y axis ports at the top. Now I’m realizing I’ll actually be using the “external stepper driver” pins to use with my DM542 stepper drivers. So my question, @bcrazycramer - how did you provide signal to your 2nd y axis driver? Jumper the wires from one y axis stepper driver to the next? Seems like there should be a cleaner solution than that but I’ve done worse with decent results shrug

Yes that is what I did.

Although I’m not using this board any longer. I’m using a Root Controller and running FluidNC. Well almost anyway. Don’t ever buy an off brand VFD. We are going through the trials of setting up a new spindle type for FluidNC.

2 Likes

Well I successfully jumpered the Makerbase DLC 2.1 single Y axis pinout to two stepper controls. Worked like a flippin charm and I’m up and running. Thanks for the info! Honestly I wonder why I don’t see more people opting for this board over the typical Arduino Shield GRBL thing you see everywhere. The Makerbase board has pins for laser and probe which is super handy for a $20 board. Bought a cheap probe on Amazon and don’t have to do the paper method ever!

Top two stepper drivers in this pic are my two Y axis controllers - you can see they’re wired together on the control side.

5 Likes

Hello,
Any link to this board firmware (MKS DLC V2.0)? Thanks in advance.

I think that it can run the original grbl.

1 Like

Is there a switch for laser-spindle control on this board?

Yep. Schematics and firmware are widely available for this board. Laser and spindle control are on there

1 Like

A post was split to a new topic: MKS DLC32 v2.1