Hello Guest it is October 17, 2019, 04:47:49 AM

Author Topic: Modbus Spindle Help  (Read 23824 times)

0 Members and 1 Guest are viewing this topic.

Modbus Spindle Help
« on: April 07, 2014, 12:42:45 PM »
Hi,

I have a Chinese 6040 Mill, it has a NowForever D100 VFD that drives a 1.5Kw spindle!

Using Mach3 the whole setup works fine but I would like to automate the start/stop/rpm of the spindle. I currently use the keypad to control these functions.

I have used  'kmtronic Modbus tester' to send correctly formatted codes for both read and write commands to the vfd to start the spindle, change the spindle rpm and stop it, and it works fine.

I have looked at the various documentation for Brains/vb etc etc and at first glance cant see the immediate way forward. But I think I need to get the basics working from Mach3 before proceeding...

Issue 1. I have enabled Modbus in 'Ports and Pins' and used 'Test Modbus' to read holding registers from the vfd and this works fine and returns the correct results, but I cannot write to any holding registers, 'Test Modbus' returns a 'illegal data value' when I want to write the same value back!

Issue 2. When I enable the 'Modbus Plugin Support' the 'Test Modbus will not read or write values and returns a 'Receive Timeout'.

The VFD spindle control registers are in a group with an address of 900H as per the manual below.

Any help or pointers would be an amazing help, as I am a bit in the dark at the moment.

Thanks, Earle

Re: Modbus Spindle Help
« Reply #1 on: May 24, 2014, 11:18:48 AM »
hi can you give me the configuration of your VFD I tried E100 with a manual but I can not communicate with the VFD he returns bizard characters.
Re: Modbus Spindle Help
« Reply #2 on: August 31, 2014, 11:35:16 PM »
Either of you guys have any luck controlling the E100/D100 VFD with modbus?  I can communicate just fine using Modbus Poll (http://www.modbustools.com/modbus_poll.asp) but only get a receive time out using the test feature in mach3.

Offline OCB

*
  •  11 11
    • View Profile
    • My Shop
Re: Modbus Spindle Help
« Reply #3 on: January 04, 2015, 10:08:50 AM »
Well I got this to work on my 6040. Here's what I done.
See attached pictures.
Just an old country boy!

Offline OCB

*
  •  11 11
    • View Profile
    • My Shop
Re: Modbus Spindle Help
« Reply #4 on: January 04, 2015, 10:12:31 AM »
If you want to use on/off control also add the following setup.
Just an old country boy!

Offline OCB

*
  •  11 11
    • View Profile
    • My Shop
Re: Modbus Spindle Help
« Reply #5 on: January 04, 2015, 10:33:14 AM »
Oh yea here's my setup for the output to run the on/off.
I was already using a 2nd parallel port and output 1 & 2 to run the VFD
forward and reverse. So you will need to change this setup to meet your
system setup.
Hope this helps, I spent about a whole day on this, I still have not found a
manual for the D100??
Just an old country boy!
Re: Modbus Spindle Help
« Reply #6 on: January 04, 2015, 06:18:22 PM »
Thanks for posting the screen shots, I went through and compared them to my setup and they are identical except that I am using a RS485 to serial adapter instead of a second parallel port.  Perhaps that is where my configuration problems lie.  Maybe Mach3 is finicky about what RS485 converter it will talk to.  I used a serial port sniffer to monitor all COM1 traffic and found that Mach3 was opening the port and trying to communicate but never getting a reply.  Sometimes the port testers would work, sometimes they wouldn't--could just be a glitch related to all the opening and closing of the port I was doing:

Code: [Select]

[31/08/2014 17:22:30] - Open port COM1 (C:\Program Files\Modbus Tools\Modbus Poll\mbpoll.exe)

[31/08/2014 17:22:31] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:22:31] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       
[31/08/2014 17:22:32] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:22:32] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       
[31/08/2014 17:22:33] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:22:33] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       

<more of the same removed>

[31/08/2014 17:24:47] - Close port COM1

[31/08/2014 17:26:24] - Open port COM1 (C:\Users\Mach3\Desktop\modbus testers\Simply Modbus Master 6.4.1.exe)

[31/08/2014 17:26:24] Written data
    01 03 00 00 00 03 05 cb                           .......Ë       
[31/08/2014 17:26:24] Read data
    01 03 06 00 00 00 00 00 00 21 75                  .........!u     
[31/08/2014 17:27:04] Written data
    01 03 00 00 00 03 05 cb                           .......Ë       
[31/08/2014 17:27:04] Read data
    01 03 06 00 00 00 00 00 00 21 75                  .........!u     
[31/08/2014 17:27:12] Written data
    01 03 00 00 00 06 c5 c8                           ......ÅÈ       
[31/08/2014 17:27:13] Read data
    01 03 0c 00 00 00 00 00 00 00 06 00 00 01 f4 1b   ..............ô.
    67                                                g               
[31/08/2014 17:27:19] - Close port COM1

[31/08/2014 17:27:48] - Open port COM1 (C:\Mach3\Mach3.exe)

[31/08/2014 17:27:59] Written data
    01 03 00 01 00 02 95 cb                           ......•Ë       
[31/08/2014 17:28:06] Written data
    01 03 00 01 00 02 95 cb                           ......•Ë       
[31/08/2014 17:28:09] Written data
    01 03 00 01 00 02 95 cb                           ......•Ë       
[31/08/2014 17:28:11] - Close port COM1

[31/08/2014 17:28:16] - Open port COM1 (C:\Mach3\Mach3.exe)

[31/08/2014 17:28:16] Written data
    01 03 05 02 00 01 25 06                           ......%.       
[31/08/2014 17:28:17] Written data
    01 03 05 02 00 01 25 06                           ......%.       
[31/08/2014 17:28:18] Written data
    01 03 05 02 00 01 25 06                           ......%.       
[31/08/2014 17:28:19] Written data
    01 03 05 02 00 01 25 06                           ......%.       

<more of the same removed>

[31/08/2014 17:28:26] - Close port COM1

[31/08/2014 17:28:28] - Open port COM1 (C:\Mach3\Mach3.exe)

[31/08/2014 17:28:30] Written data
    01 03 00 00 00 01 84 0a                           ......„.       
[31/08/2014 17:28:33] Written data
    01 03 00 00 00 01 84 0a                           ......„.       
[31/08/2014 17:29:37] Written data
    01 03 00 00 00 03 05 cb                           .......Ë       
[31/08/2014 17:30:21] Written data
    01 03 00 00 00 06 c5 c8                           ......ÅÈ       
[31/08/2014 17:32:06] Written data
    01 03 00 00 00 06 c5 c8                           ......ÅÈ       
[31/08/2014 17:32:18] - Close port COM1

[31/08/2014 17:32:19] - Open port COM1 (C:\Mach3\Mach3.exe)

[31/08/2014 17:32:19] Written data
    01 03 05 02 00 01 25 06                           ......%.       
[31/08/2014 17:32:20] Written data
    01 03 05 02 00 01 25 06                           ......%.       
[31/08/2014 17:32:21] Written data
    01 03 05 02 00 01 25 06                           ......%.       

<more of the same removed>

[31/08/2014 17:33:15] - Close port COM1

[31/08/2014 17:33:20] - Open port COM1 (C:\Users\Mach3\Desktop\modbus testers\ModbusMAT 1.1.exe)

[31/08/2014 17:33:40] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:33:41] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:33:42] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:33:43] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:34:41] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:34:42] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:34:43] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:34:46] - Close port COM1

[31/08/2014 17:35:14] - Open port COM1 (C:\Users\Mach3\Desktop\modbus testers\ModbusMAT 1.1.exe)

[31/08/2014 17:35:16] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:17] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:18] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:19] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:36] - Close port COM1

[31/08/2014 17:35:53] - Open port COM1 (C:\Program Files\Modbus Tools\Modbus Poll\mbpoll.exe)

[31/08/2014 17:35:54] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:54] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       
[31/08/2014 17:35:55] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:35:55] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       

<more of the same removed>

[31/08/2014 17:35:59] - Close port COM1

[31/08/2014 17:38:36] - Open port COM1 (C:\Users\Mach3\Desktop\modbus testers\ModbusMAT 1.1.exe)

[31/08/2014 17:38:41] Written data
    01 03 00 00 00 0a c5 cd                           ......ÅÍ       
[31/08/2014 17:38:41] Read data
    01 03 14 00 00 00 00 00 00 00 06 00 00 01 f4 00   ..............ô.
    02 9c 40 00 00 00 50 f2 0f                        .œ@...Pò.       
[31/08/2014 17:38:45] - Close port COM1


Very strange that the VFD doesn't respond when Mach3 is talking.  Maybe the timing of the messages is off?  All the programs are configured for 9600/8N1.
Re: Modbus Spindle Help
« Reply #7 on: July 14, 2016, 03:09:06 AM »
Hello OCB, What your configuration in the VFD for communication with RS485 ?