{"id":9,"date":"2019-04-06T23:26:19","date_gmt":"2019-04-06T23:26:19","guid":{"rendered":"http:\/\/caldwellfam.net\/bill\/?p=9"},"modified":"2019-04-06T23:26:19","modified_gmt":"2019-04-06T23:26:19","slug":"mach3-e500-vfd-modbus-support-instructions","status":"publish","type":"post","link":"https:\/\/caldwellfam.net\/bill\/2019\/04\/mach3-e500-vfd-modbus-support-instructions\/","title":{"rendered":"Mach3 E500 VFD modbus support instructions"},"content":{"rendered":"<p>Connecting a spindle VFD to Mach3 through the Modbus (RS-485 serial port) is not an easy task, since the required information is spread all around the internet. This post is a step by step set of instructions that hopefully will help someone else get their VFD up and running quickly.<\/p>\n<p>For reference I am using Windows 10, Mach3 R3.043.066, and FDTI serial driver V2.12.16<\/p>\n<p>The E500 VFD is popular on many internet sites, that is why I decided to write the necessary code to do a port including the following commands and status:<\/p>\n<ol>\n<li>CW spindle<\/li>\n<li>CCW spindle<\/li>\n<li>Stop spindle<\/li>\n<li>Set spindle speed<\/li>\n<li>Receive spindle RPM and display it in True RPM DRO<\/li>\n<li>Stop spindle command support<\/li>\n<\/ol>\n<p>Step 1<\/p>\n<p>Modify the VFD settings changes for RS-485 port control<\/p>\n<p>This step will change the parameters necessary to enable the modbus communications port on the VFD so commands and status can be sent and received between the computer and the VFD.\u00a0Refer to the Panel operating method section of the VFD manual for the instructions on how to use the front panel controls on the VFD to modify these parameters. They will saved across power on\/off cycles, so this only needs to be done once. Please note once these settings are changed, you will no longer be able to control the motor from the VFD front panel.<\/p>\n<p>The E500 required three function values to be modified from the default values.<\/p>\n<ol>\n<li style=\"text-align: left;\">F0.00 =2 (default is 3) Frequency input channel<\/li>\n<li style=\"text-align: left;\">F0.02=1002 (default is 1000) Running command channel and mode<\/li>\n<li style=\"text-align: left;\">F2.19=1 (default is 2) Pairs of motor poles<\/li>\n<\/ol>\n<p>The VFD is now set to receive commands and send status to\/from the serial Modbus (RS-485 port on the side of the VFD) at 9600 baud, even parity.<\/p>\n<p>&nbsp;<\/p>\n<p>Step 2<\/p>\n<p>Mach 3 requires several settings be changed to allow commands to be sent and status to be received on the RS-485 ModBus port. Please note the computers do not implement RS-485 directly. You must purchase a USB to RS485 converter. All RS-485 data will be sent out the selected USB port on the computer through the converter, across the RS-485 cable to the VFD. The RS-485 protocol implements a differential electrical connection which provides a great deal of common mode noise immunity which is useful in the CNC environment.<\/p>\n<p>First, it is necessary to install the USB to RS-485 windows driver needed for the convertor.\u00a0Follow the instructions supplied with your convertor to install the driver.\u00a0Once the driver is installed, note the comm port it is associated with (Com3 in this case).<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Com-Port.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-46\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Com-Port-300x215.png\" alt=\"\" width=\"300\" height=\"215\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Com-Port-300x215.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Com-Port-768x549.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Com-Port.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The following pictures show the necessary changes to Mach 3 to enable the serial communications port. Once these changes are made they will be permanently stored in the Mach 3 settings.<\/p>\n<p>Locate the engine configuration&#8230; Ports and pins menu and check the 2 check boxes shown below in the Restart if changed section.<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Enable-ModBus.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-43\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Enable-ModBus-300x178.png\" alt=\"\" width=\"300\" height=\"178\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Enable-ModBus-300x178.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Enable-ModBus.png 718w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Locate the Modbus serial control monitor and follow the example below. Change the serial port number depending on the Comm port that windows assigns to the serial converter (Com3 in this example).<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-Command-Spindle-CW-enable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-44\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-Command-Spindle-CW-enable-300x259.png\" alt=\"\" width=\"300\" height=\"259\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-Command-Spindle-CW-enable-300x259.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-Command-Spindle-CW-enable.png 525w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Locate the Modbus configuration menu and fill it in exactly as shown below. This is used to map the addresses in the VFD to the Brain logic which will be implemented in the next step.<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-configuration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-45\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-configuration-300x196.png\" alt=\"\" width=\"300\" height=\"196\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-configuration-300x196.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-configuration-768x503.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/ModBus-configuration.png 860w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>After all these settings are made, Mach 3 is configured to send commands and receive status from the VFD.<\/p>\n<p>&nbsp;<\/p>\n<p>Step 3<\/p>\n<p>Mach 3 uses, what they refer to as a brain, to implement software ladder logic. It is used to convert the higher level commands (set speed for example) to the lower level commands (and status) necessary for the E500 VFD to operate with Mach 3. The Brain file is available at the following location: request through e-mail to me at bill@caldwellfam.net<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-49\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-300x171.png\" alt=\"\" width=\"300\" height=\"171\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-300x171.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-768x439.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-1024x585.png 1024w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain.png 1251w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The brain file must be downloaded then transferred to the Mach3\/Brains folder.<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-48\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-location-300x221.png\" alt=\"\" width=\"300\" height=\"221\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-location-300x221.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-location-768x567.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-location.png 774w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Once it is loaded it must be selected to be used by Mach 3. go the the Brains pull down menu and select the E500 VFD Control.brn file.<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-enable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-47\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-enable-239x300.png\" alt=\"\" width=\"239\" height=\"300\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-enable-239x300.png 239w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Brain-enable.png 298w\" sizes=\"auto, (max-width: 239px) 100vw, 239px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Step 4<\/p>\n<p>Initialization files must be added and modified to complete the installation of the VFD control.<\/p>\n<p>First it is necessary to create a macro to allow the RPM of the VFD to be displayed. Using notepad, create a file called M1000.m1s with the contents exactly as shown below. .<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-52\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-script-300x154.png\" alt=\"\" width=\"300\" height=\"154\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-script-300x154.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-script.png 458w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This macro must then be installed in the Mach3\/macros\/Mill folder.<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-51\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-location-300x221.png\" alt=\"\" width=\"300\" height=\"221\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-location-300x221.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-location-768x567.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/Init-location.png 774w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The last step is to call the newly created init macro and set other init. parameters as necessary. Please refer to the following screen to make the necessary changes.<\/p>\n<p>Some of the check boxes on your screen might differ from this example, but the Initialization string box must be filled out as shown.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/init-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-50\" src=\"http:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/init-config-300x189.png\" alt=\"\" width=\"300\" height=\"189\" srcset=\"https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/init-config-300x189.png 300w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/init-config-768x483.png 768w, https:\/\/caldwellfam.net\/bill\/wp-content\/uploads\/2018\/04\/init-config.png 989w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This completes the installation of the necessary files to allow you to control your E500 VFD spindle controller through the normal Mach3 control panel interface and from G code.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connecting a spindle VFD to Mach3 through the Modbus (RS-485 serial port) is not an easy task, since the required information is spread all around the internet. This post is a step by step set of instructions that hopefully will help someone else get their VFD up and running quickly. For reference I am using &hellip; <a href=\"https:\/\/caldwellfam.net\/bill\/2019\/04\/mach3-e500-vfd-modbus-support-instructions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Mach3 E500 VFD modbus support instructions<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/posts\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/comments?post=9"}],"version-history":[{"count":11,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/posts\/9\/revisions"}],"predecessor-version":[{"id":57,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/posts\/9\/revisions\/57"}],"wp:attachment":[{"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/media?parent=9"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/categories?post=9"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/caldwellfam.net\/bill\/wp-json\/wp\/v2\/tags?post=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}