Moving from Mach3 to LinuxCNC

More
22 Feb 2014 07:35 - 22 Feb 2014 07:36 #44057 by tgdavies@gmail.com
I have a Chinese 6040 CNC router with a Huanyang VFD, being driven by a Gecko G540 via an ethernet smoothstepper using Mach3.

(I realise that I can't use the ESS with LinuxCNC, but my setup makes it trivial to bypass)

The setup is pretty solid (although the other day Mach3 failed to start my spindle, didn't wait for it to start, and plunged the unrotated tool into the stock -- that's a one off so far) but I'm considering trying LinuxCNC because:

- I'm more comfortable with Linux than Windows
- Mach3 is very ugly.
- The plugin I use to control my VFD is closed source and while it is OK there are some improvements I would like to make.
- I want to start programatically controlling my CNC machine in real time (soft real time -- just positioning, not cutting)

What I'd like to understand before I attempt this is related to the last two points above:

1. I'm controlling my VFD via a USB to RS485 adapter. This does *not* talk standard Modbus but Huanyang's version. Is it possible to use this on LinuxCNC? Googling has been inconclusive.

2. The reason that I want to programatically control the CNC machine is for zeroing my stock -- I have a webcam mounted in my spindle, and use it to adjust the location of my jig by looking at the location of two pins -- so the sequence is:
a. go to pin1 location, set zero x and y in Mach3
b. go to pin2 location, see that it isn't right, tap the jig to move it
c. go back to step a until I'm happy with the setup.
Typing in the location of the pins is time consuming and error prone -- and I may need different z heights to focus correctly, so I would like to just have a button in the Java application I have written to use the webcam which tells LinuxCNC to go to a particular x,y,z location.
Can I write to a socket/named pipe/etc or call a C API to tell LinuxCNC to move?

Thanks,
Tom
Last edit: 22 Feb 2014 07:36 by tgdavies@gmail.com.

Please Log in or Create an account to join the conversation.

More
22 Feb 2014 10:19 #44059 by Todd Zuercher
#1 should be possible. Worst case scenario is you would have to write your own driver component for it. But I bet you could make the generic mb2hal driver do it.

#2 I am sure you could probably do it that way, but I doubt it would need to be that difficult. I would just make a pyvcp or glade panel with a couple of buttons that move you to the positions you want.

and as far as the ESS I would consider replacing it with a Mesa 5i25 for hardware step generation. (but I have 0 Mach experience)

Please Log in or Create an account to join the conversation.

More
22 Feb 2014 15:04 #44065 by tgdavies@gmail.com
Hi Todd,

Thanks for the quick response.

I was hoping that someone might already be running a Huanyang VFD -- they're very common. I'll see if I can get source to the Mach3 plugin.

Doing a custom UI sounds easy, and I'm sure I'll do it that way. But I do like doing things the hard way -- I would like to know if there's a C or network API for LinuxCNC.

Would you recommend a Mesa 5i25 for all LinuxCNC installations? Am I likely to lose fewer steps? They are certainly cheap compared to an ESS.

Thanks again,
Tom

Please Log in or Create an account to join the conversation.

More
22 Feb 2014 17:33 - 22 Feb 2014 17:53 #44066 by cncbasher
Tom ,
linuxcnc will control a Huanyang VFD , theirs quite a few people using them , the information is within the forum and the wiki .
everything you need is within linuxcnc , so i dont see a problem . i also suggest moving to a 5I25 and the 7i76 interface card , makes wiring a lot easier

www.linuxcnc.org/index.php/english/forum...erter-with-linux-cnc
also see
www.cnczone.com/forums/phase-converters/...-rs485-modbus-3.html
theirs some files in that thread for linuxcnc

the Huanyang vfd can be controlled via a 10v analog signal which the 7i76 addon card produces , along with a direction pin or relay , thats the simple way , however you can control it via the modbus interface over a serial port
and you would need mb2hal or a comp , i'm sure i have seen one on the forums , or at least i have the information on this in my archives



Dave
Last edit: 22 Feb 2014 17:53 by cncbasher.

Please Log in or Create an account to join the conversation.

More
23 Feb 2014 12:38 #44076 by Todd Zuercher

Would you recommend a Mesa 5i25 for all LinuxCNC installations? Am I likely to lose fewer steps? They are certainly cheap compared to an ESS.


If you are loosing steps due to mechanical reasons or problems with motors, wiring or your drive, nothing you do to your step generating will correct it, short of fixing the real problem.

I don't know how good or bad a Mach/Smooth Stepper system can be. But there is no reason that a properly configured LinuxCNC + 5i25 step system should loose steps because of timing issues and it is capable of delivering smooth steps at mHz rates with smooth and consistent velocity changes.

Please Log in or Create an account to join the conversation.

More
23 Feb 2014 15:00 #44077 by tgdavies@gmail.com
Mach3 plus a Smoothstepper works well for me -- I don't believe I lose any steps. Some people do have issues with Mach3 and plain parallel ports (though other people have no problems -- I have never tried just the parallel port)

What I meant to ask was: Is LinuxCNC + 5I25 likely to be better than LinuxCNC + Parallel port?

Thanks,
Tom

Please Log in or Create an account to join the conversation.

More
23 Feb 2014 21:18 #44079 by BigJohnT


What I meant to ask was: Is LinuxCNC + 5I25 likely to be better than LinuxCNC + Parallel port?

Thanks,
Tom


Hardware step generation is always better than software step generation (parallel port). Plus you get a ton of I/O and other features. The wiring is neat between the PC and the drive box with only one parallel cable. IMHO for $200 you just can't beat the 5i25 7i76 combo with cable.

JT

Please Log in or Create an account to join the conversation.

More
23 Feb 2014 23:27 #44084 by Todd Zuercher
I don't know what your wiring from your Smooth Stepper looks like. If it is just 1 or 2 parallel port plugged in, then the bare 5i25 should be able to directly replace it with nothing else. If there is other wiring (ie your VFD) is separate from the parallel ports, then the 7i76 daughter card would probably be a good idea.

Please Log in or Create an account to join the conversation.

More
24 Feb 2014 05:22 #44098 by tgdavies@gmail.com
Just one cable from the Smoothstepper to the G540. The way the G540 mounts the cable has to come through a slot in my drive box and plug into the outside of the G540. I thought that was nasty when I put it together, but it will be handy for this.

I don't have any home/limit switches as the moment, and don't miss them. I do have a probe input, but it goes via the G540, so ends up on the 'parallel port' cable anyway.

I hope to continue using RS485 for my VFD -- but the G540 will produce a 0-10V signal too, so I think I'll be OK with just a 5i25, even if I need to change my VFD control.

Thanks for all the advice.

Please Log in or Create an account to join the conversation.

Time to create page: 0.145 seconds
Powered by Kunena Forum