2 videos this week covering how to install an RS485 adapter to your PC and tehn control your spindle. I split it into 2 seperate videos so that viewers can watch the relevant version without the distraction of irrelevant information relating to another control system. It should make viewing easier. Whether you are intersted in Mach3 or UCCNC just watch the appropiate video for your control software. Even if you don't run these control systems watching will give an insight into what RS485 is and how it is used. MACH3 - episode 147 The plugin used is available from this website.
Plugin type and port number: full motion plugin (Mach3 use the plugin for all motor movement) IO Extender (Mach3 still use parallel port for motion but use the plugin for some of it's input/output. Must select a available parallel port number. A second port number (default 2) may be entered for dual port USB card. Restart Mach3 if any change. The general Mach3 software operation remains mostly the same when using HiCON plugin. Starting Mach3 with HiCON To launch Mach3 with HiCON plugin, double-click on the Mach3 Mill or Lathe software icon on the desktop as you would normally run using parallel port. It shows the following dialog box with the option to select M3HiON plugin.
It has most of the information required to make the plug in work but please watch the video to the end as there is an extra step I did to make the plugin work which is not mentioned in the documentation. Without it the plugin won't work. This is quite an old plugin and it should be very stable. UCCNC - episode 148 The plugin for UCCNC has been under development for a little while but the latest version was released only a few days ago. A big thank you to Dan911 for all the hard work he has put into developing this plugin and also the help he gave me in tracking down a problem with the adapter I had. (more on that below) The development thread for the plugin can be seen here. The actual plugin I used in this video, HY10, is located here Subscribe to the development thread for new plugin versions as they are released.
![Mach3 Mach3](/uploads/1/2/5/4/125448905/627910494.jpg)
The plugin file contains a text document giving instruction on changes you needed to make to the VFD configuration as well as UCCNC. Wiring Diagram The wiring for this couldn't be simpler It requires only 2 wires and these need to be a twisted pair. Feel free to use a screened cable but make sure there are 2 wires in the cable and use them for communication. Ground the shield at the VFD end only and do not connect the other end of the shield. Click to enlargen VFD Programming For both Mach3 and UCCNC the VFD programming was the same. Here are the settings I changed. It is not complete programming for the VFD but simply the changes needed to bring it under RS485 control.
It assumes an already working spindle PD001 2 Enable RS485 PD002 2 Enable RS485 PD004 400 Spindle frequency from spindle name plate PD023 1 Disable reverse rotation of spindle PD163 1 VFD Address PD164 1 Baudrate 9600 PD165 3 8bit, No parity, 1 Stopbit, RTU RS485 adapters I had a bit of trouble with the first adapter I purchased with it failing to change the speed of the VFD intermittently and seemed to run slow on startup with the UCCNC plugin. When i got the new one I opened up both RS485 adapters and I noticed 2 things about the first adapter I have purchased. 1st the metal case of the USB plug was not soldered to the circuit board. Not a problem as far as the operation of the adapter goes but mechanically it will cause premature failure of the device as it puts strain on the USB connectors pins. It also gives a clue as to the quality of the build. 2nd I noticed that the USB to serial IC is unlabeled and it is not because the name has been scratched off as is sometimes done to hide a critical IC's identity.
I suspect it is a copy of the Prolific 2303 chip and was not working correctly with the drivers. The utility on the prolific website identified it as a PL 2303 series chip so maybe it is genuine but I find it hard to believe they wouldn't put their name on it. This IC is also a well known target of counterfiet though the Prolific drivers aren't meant to work with it at all. The FDTI chipset maker is also a target for chipset copying and thier latest drivers won't work with a counterfiet chipset. Hi Robert, I ended up buying mine from a New Zealand based auction site like Ebay because I wanted to get on with the job It has the CH340G chipset in it and I suspect that the seller bought them off Ebay in the first place for resale in this country. Pretty much all the adapters should work but the closest I found is the one below which uses the same CH340G chipset but is lightly different circuit board.
It might be a more updated circuit. They are all cheap adapters at less than $2USD delivered. Cheers Peter https://www.ebay.com/itm/CH340G-Chip-USB-to-RS485-485-Converter-Adapter-For-Win7-Linux-XP-Vista-top-M58967?epid=&hash=item51d6b247b7:g:dCUAAOSwpDdVTtMT. Hi Joel, I'm not familiar with the Shopbot so can't really say. What I do know is that RS485 is a protocol standard so to output should be the same on any device. There are 2 types of the adapter.
One has 4 wires and the other has 2 wires like I used. Assuming you are using either Mach3 or UCCNC then they don't care what adapter you use so long as they can can find it. More than that I can't really say. I am curious what a $100 USB Rs485 adapter looks like.
Do you have a link? You might not be able to post it here so you can email me [email protected] Cheers Peter. Hi, I have watch the video and finally found the spindle controller which is the top power supply unit in your box if i am not mistaken.
This unit is not a VFD and this viseo only covers the Huanyang VFD units. The spindle on your machine, I am guessing because you didn't show it, is a DC motor with a collet adapter on it. Similar to the spindle the Jerry used here This type of motor cannot be connected to an RS485 adapter. For this type of setup you need to use PWM (Pulse Width Modulation)to control speed and a relay to turn it on and off. It doesn't look like your breakout board has provision for either of these so you will need to add your own. Unfortunately I cannot offer you more help than this as I am not familiar with your machine or its control system. If you are not confident with electronics and do not understand exactly what you are doing then it would be wise to avoid an upgrade of this nature until you find someone local who can help you with this.
The closest video to what you want to do that I have is this one Other than the programming in Mach3 nothing else will apply to your setup thought the principle is the same. You Spindle has no programming unlike the VFD unit i have.
Sorry that I can't help any more than this. Cheers Peter. The box that has the spindle speed showing on it is a VFD drive and will not work with your spindle. The VDF drive is for 3 phase motors while your spindle is a DC motor. You buy the VFD and spindle as a matching set. Unless you are upgrading your machine to something bigger I seriously doubt that the machine could handle a full sized spindle which will be much larger and 3 to 4 times heavier than what you currently have.
I'm not trying to discourage you and the best way to learn is to do. I encourage you to persue your upgrade with the help of someone local especially the spindle on / off which would be the easiest to do and the most useful. The problem is I am not in a position to assist with your desired upgrade. A pity really because I think I would enjoy doing it as a hands on project if you lived locally just for the fun of it. Trying to do this remotely would be a disaster. As for building an entire control system, I do not do that so can't give you a price. Best of luck Cheers Peter.
No The USB port is a replacement for the Parallel port but it may not work with Mach3. You would need to check with the supplier if the USB port will work with Mach3 and if there is a USB driver for it. It is definately not for RS485 as that is used for VFD drives with 3 phase spindles. The Mach3 RS485 driver I show in the video will only work with a specific range of Huanyang VFD drives which uses a non standard version of communication. The spindle on the machine on Ebay is the same as yours and is a simple DC motor. I watched a quite few videos of people with the 3040 machine and they all manually turn on and adjust the speed so it doesn't look like it is automatic.
You will need to ask the seller the capabilities of the machine and its control software but my opinion is that it will be manual like your current machine. That said it mentions 'Control unit:triaxial one-piece drive + ring variable power + PWM speed' in the specs but I suspect it simply means it uses PWM to control speed and it is done via the speed knob on the front of the unit like your current one. I also suspect that the word triaxial in the description is made up by Google Translate. What a Ring Variable Pawer Supply is is nyones guess.
It also mentions 'Acceptable software:only CNCUSB' From what I can tell CNCUSB is a software controller package like Mach3 only more basic so maybe it needs to use this software with the USB port. Again you will need to ask the seller. Shows the CNCUSB software.
The problem with Spec's written in Chinglish is they can mean almost anything. The 6040 machine is very common and it looks like there are many versions of the machine and control box so what you get is anyones guess. I really believe this to be a larger version of what you already have with all manual control. That is my best guess as far as this machine goes. Cheers Peter If you would like to support my channel please consider using the affiliate link below to enter Ebay when you make a purchase.
I will receive a small commission on any purchase you make at no cost to you. The link simply takes you to the main Ebay page from where you can browse and any purchase as normal.
Hi, The VFD shown in the Ebay link is a Huanyang VFD and will work with RS485 on Mach3. It is one of the VFD units I considered when I upgraded my machine but I dicided to go for a bigger spindle.
The description mentions '(PWM stepless speed regulation)' so maybe it is already setup with speed control. It also mentions '3-axis control box with the power supply + spindle speed regulator' which would imply that speed regulation is built into the control box. Since the box has no speed knob on it I would assume they are using PWM to achieve this. With configuration changes to the VFD it could be made use RS485 as shown in my video though if it already has speed control I wouldn't bother changing it. For what it is worth I chose to use PWM on my machine rather than RS485 and it works just as well.
I hope this helps Cheers Peter I didn't realize you lived in Europe when I mentioned the Affiliate link in my previous post so it probably wouldn't work for you as it is for the USA Ebay site. I live in New Zealand so I use the USA site.
Here is one for Ebay UK if you wish to support my channel at no cost to yourself but no problem if you would rather not. Anonymous Sorry to bother you again ive been doing a lot a research and found out that my cnc i have got from ebay link below says it has ' PWM stepless speed regulation'. All 3 axis work fine and i can switch on manually the spindle and turn manual the dial.I ve contacted the seller and they they the setting are correct but cannot get the PWM speed and on off in mach3.Any idea would be grateful, or any idea to maybe manually find all the correct ports and pin.Because i just think the spindle settings are wrong. While I believe the spindle is PWM ontrolled as it is the only efficient way of regulating it's speed I don't think that the spindle is under the control of Mach3 or that there is any provision for it. Trace all the wires running from the spindle power supply to the board that connects to the Mach3 parallel port. I would expect 5 wires.
3 for the PWM control though it might be done with 2 at a pinch and 2 from the relay in the break out board to the Spindle ower supply. The spindle power supply / control will have the spindle wires going to it as well as the spindle on / off switch and the variable resistor for setting the speed on the front panel.
You will need to photogragh it so I can see where the wires are going and email the photos to me. Email it to [email protected] Cheers Peter. Hi Franco The Manual you linked to is on your PC but assuming it is an E100 I downloaded the manual and on page 19 it says that modbus used +485 and -485 terminals The phot below shows the terminals are on the top row 6 & 7th from the left if yours is the same. Check out the website below. It gives a detailed description of how to connect your E100 VFD to Mach3 This is the best I can do to help as I do not have an E100.
Cheers Peter. Hi, The setup is behaving the same as mine. The first time you use the spindle after turning it off you have to give it a speed before it will work.
The same happens when using PWM as well. This isn't a problem if you are runnig a Gcode file as it should have the S10000 in it but it is a pain if you are trying to do something manual. I did have a look to see if there was a solution but I haven't come up with one yet. It is probably a safety thing to stop the spindle starting when it is turned on. Cheers Peter.
Hello All, On the website of the developer of the plugin he has some errors listed and i am reviving one, the error i get is (unable to read value) i have done what he describes to do and i continue to get the same error. I am using the HY VFD with a 2.2KW spindle. I have set all the vfd settings as directed.
It is a working state prior to giving this set up a go. Something i noticed is i purchused the CH340T chip and not the 340G. Will this cause communication issues? Like the issue i am having. I purchased the CH340T adapter of amazon for $6.99 not ebay.
I figured the extra 4 bucks is worth not having to wait weeks on in. The one that comes from china and the one CNC NUTS is using is this G version not the T. I did a little digging and it appears the T version chip might be configured a little different so this is why i ask. My computer reads the chip just fine, it shows as COM4.
But when i go to configure the plug in in mach it gives me the error unable to read values. One thing i do not currently have is the shielded twisted cable.
Would this have effect on establishing communication between VFD and mach? I did use a drill and twisted two wires together, i am not sure if that qualifys as a twisted pair or not. I have shielded twisted pair wire on order.
Any Help on this would be greatly appreciated. Hello and welcome to my Blog. My name is Peter Passuello and I live in New Zealand. My interest in CNC machines over the last 10 years has extended to making videos in an attempt to entertain and instruct on using these machines as well as provide enjoyment. I hope to use this platform as a place to expand on the Youtube content I provide. Thanks for taking the time to look and I hope you will continue to enjoy. Please feel free to leave comments and ask questions by using the contact form on this site.
Cheers Peter.
Oooh, I just figured out how any arbitrary button on the display can execute any arbitrary button or m-code function in mach3, through 1 simple brain, 1 simple script, 1 Modbus register, and 1 invisible dro and 1 invisible led. It looks feasible to handle LEDs and DROs on the display in a similar fashion. That means you could just put a button, dro, or led on the display, and it will work without having to do anything in mach, except add your own m-code script files for custom functions. If I can just make the display customizable, that will be something.
As it is, each function has a separate screen control hard-wired to a brain and Modbus address in mach3, which is very cumbersome to configure all those functions individually on the display and in mach3, and each one adds to the Modbus payload. One thing I haven't figured out yet is how to execute g-code or view g-code on the display, that's something I'd like to have. Ok, now I tested a mach3 plugin, and it worked, and that will allow using a serial port between mach3 and the arduino, so it won't need Modbus, or brains, or hotkeys. But now, it is turning out totally different than when I started, so it's back to the drawing board to start over, now that I've learned how all the different parts work. When I started I had never used an arduino or touch screen or Modbus or brains or thc or any of the things I've been doing in this project steadily making progress though. Sorry I haven't drawn anything lately.