Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: richy on January 21, 2014, 04:24:16 AM

Title: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 04:24:16 AM
Hi Everybody

What I have here is a Flow waterjet machine that is driven by a PA8000 Rockwell Automation PLC and a windows based pc system.

We are in Thailand and have no support engineer backup for any of the PLC or the windows software and as the machine is business-critical, I have been tasked to convert this machine to run a linux based program if at all possible. The gaffer has a real dislike for anything windows based and to be honest and we are awaiting mach4 which I saw is going to available on the linux platform. The purpose of this thread will be to show in detail what needs to be done to connect mach 3 /4 / linux cnc and Panasonic servo drives, and, when I lose my way, hopefully get some help from the esteemed readers on here who helped out so much on previous threads like this one:

http://www.machsupport.com/forum/index.php/topic,24005.0.html (http://www.machsupport.com/forum/index.php/topic,24005.0.html)

Ok I'm gonna go and take a bunch of photos and post those up so you can see what this thread is going to be all about  ;D

Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: Hood on January 21, 2014, 07:11:08 AM
I wouldnt be holding my breath for Mach4 on Linux. As far as I understand it will be  quite a while after Mach4 is out that it will be ported to Linux, could be wrong but....
Hood
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 08:03:47 AM
Thanks for the update Hood, the news that mach is coming to linux is enough for us, we will wait.

In the meantime we will use both linuxcnc and mach 3 in this build and see which one works out best for our requirements.

Here is the machine we will be modyfying.... 60,000 psi pump, watertank, cutting head and 3 axis powered by three different sizes of Panasonic ac servo motors, x and y motors drive the ballscrews via a pulley arrangement, z axis is driven directly by the smallest of the three motors.

(http://i1290.photobucket.com/albums/b521/rng648/2014121152118Small_zps626568dc.jpg)
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 08:11:56 AM
Here is the control cabinet, the plc is contained in the shiny box near the top

(http://i1290.photobucket.com/albums/b521/rng648/2014121154754Small_zps90ac3296.jpg)

This mess has to go....

(http://i1290.photobucket.com/albums/b521/rng648/2014121154710Small_zpsa07796b5.jpg)

Control panel showing software, this thing takes about 5 minutes to boot up in the morning and is buggy as hell.......generally a nightmare to work with. The memory appears to be a similar size to that of the zx81 I had for christmas in 1986  :D

(http://i1290.photobucket.com/albums/b521/rng648/2014121154422Small_zps995c52e4.jpg)

Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 08:15:51 AM
Here we have the three Panasonic A4 servo drives, I've spent the last couple of months trying to make sense of the 380 page manual for these things. I think I have a good grasp of what it takes to hook these up. Time will tell  ;)

(http://i1290.photobucket.com/albums/b521/rng648/2014121154837Small_zps358fa9e3.jpg)
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 08:43:05 AM
This machine has 24volt Omron NO NPN proximity switches. After much studying and reading on the internets, we realised that these were not ideal, we ordered a few of the same Omron switch but they are NC and PNP, which I'm hoping will hook up to this 24 volt breakout board from cnc4pc, the postie will be here with those any day now.

(http://i1290.photobucket.com/albums/b521/rng648/C31R1ACustom_zpsca958d02.jpg)

Page 7 of the manual for that breakout board (attached at bottom of this post) seems to indicate I can connect those switches directly to the boards sinking inputs.

In the ace thread I linked to earlier it was pointed out that I would need line drivers, those are on their way with the BOB right now from cnc4pc dot com.

(http://i1290.photobucket.com/albums/b521/rng648/difflinedriver_zps5ecc9c15.jpg)
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 08:57:59 AM
Anybody used those line drivers before? The manual for them doesn't spell things out clearly for an idiot like me  ::)

(http://i1290.photobucket.com/albums/b521/rng648/linedriver_zps19c4c84c.jpg)

I'm thinking that the GND and +5v I can get from the BOB and that "channel A" could be "DIR pin 2" from the breakout board.

"Channel B" could be "STEP pin 3" from my breakout board? Does that make any sense?  :D

On the output side that would mean pin 5 and 6 would be the differential DIR signals - & + that get fed into the panasonic drivers?



Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: Hood on January 21, 2014, 09:04:48 AM
Personally I would look at the motion controllers that work with Mach that have 24 I/O.
Also not looked up the drives but if they can be driven with +/- 10v analogue signal I would go that way rather than step/dir.

Drawback to that is the motion controllers wont work with Linux, you would need a different interface for LinuxCNC and atthis time that wouldnt work with Mach.

Hood
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 11:29:19 PM
Hood, these drives here have pos, vel and torq mode, they are running in velocity mode now so I'm guessing that this csmio product would be perfect for running + - 10v analogue signals:

http://www.cs-lab.eu/en/index.php?m=gallery&s=show&fid=61&sort=&uinfo=CSMIOIPA_Ethernet_Motion_Controller__Analog__10_V (http://www.cs-lab.eu/en/index.php?m=gallery&s=show&fid=61&sort=&uinfo=CSMIOIPA_Ethernet_Motion_Controller__Analog__10_V)

Problem is csmio stuff is aimed at mach 3 though it seems? and therefore windows for now, and at 599 Euro's it's a non-starter not because of the price but because it's not compatible with our long term goal of only having linux site-wide.

I think we'll press on with step / dir for now, see how that pans out. We got a few of the 50 pin connectors for the a4 drives today and test cable is being soldered up. Installed the Panaterm software on a pc so the parameters in the drive can be changed and saved remotely, still waiting for the proprietary cable in the post for that though.
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 21, 2014, 11:51:14 PM
For running step dir signals from mach 3 linux etc you'll need position control mode selected in your driver.

In our case that was parameter PR02 which is set to "0"

Here's page 83 of the manual showing the connections that need to be made.......

(http://i1290.photobucket.com/albums/b521/rng648/positioncontrolmode_zps5628b986.png)

Full manual for these drives can be downloaded here http://pewa.panasonic.com/downloads/a4/ (http://pewa.panasonic.com/downloads/a4/)
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: Hood on January 22, 2014, 03:17:42 AM
That is correct, the CSMIO will most likely only ever be Mach, there is a plugin being done for Mach4 so if/when Mach4 runs Linux then it will run that.
From what you are saying however it seems you are determined you will not be using a windows based OS so I think you would be better sticking to LinuxCNC and looking at components that are best for it and your hardware. Going down the step/dir route, especially if using the parallel port will hamper your resolution or velocity severely. Whether that will matter or not I am not sure as I dont know what kind of resolution you require for a waterjet.

Hood
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 23, 2014, 05:02:26 AM
Yes Hood, Linux OS is our chosen path so linuxcnc and later Mach 4 are the long term goals. We have a mach 3 demo to test with on a windows partition.

I noted what you said about step/dir and had a good google around to see what others were using with servo's in velocity mode and linuxcnc, it seems the 5i25 and 7i77 mesa combo is popular and at-a-glance seems to be what I would need? I can certainly order that kit but I've no experience of mesa boards so it would take a while to get up to speed.

Nearly ready to test the step dir on an axis to see how that behaves........
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: Hood on January 23, 2014, 07:17:17 AM
Dont know the mesa boards to use I am afraid, you would be better asking on the LinucCNC forum.
Hood
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: richy on January 28, 2014, 12:06:28 AM
Ok, got the machine jogging nicely via dual boot mach3 and linuxcnc via step / direction commands into the Panasonic drivers.

Gonna make a like here of the major connections and parameters that need to be made / ammended so the next guy doesnt have to spend untold hours reading the manuals like I did ::)

The cnc4pc differential line driver I showed earleir got + - 5v from usb "Channel A"  became "step" and "Channel B" became "dir" wired straight from any old breakout board.

Inside the panasonic driver you have to change parameter Pr40 to setting "1" this enable the inputs for dedicated differential signals via pins  44, 45, 46, 47 which I wired as 44 to step - from the output of the differential line driver. Pin 45 to step + from the output of the line driver, 46 to dir - from line driver and 47 to dir +.

Other parameters to enable position control mode (step / dir control) within the driver are as follows, (we bought the dvop 1960 cable and loaded up the free panaterm software to assist with parameter changes, highly recommended purchase)

Parameter PR02 needs to be 0

Parameter PR04 needs to be 1

Parameter PR40 needs to be 1 (unless you are using single ended step / dir signals in which case inputs into driver are going into pins 3,4,5,6 in diagram below, not recommended by the way)

Parameter PR42 needs to be 3

Parameter PR43 needs to be 1

Parameter PR01 needs to be 1

Parameter PR4E needs to be 2

(http://i1290.photobucket.com/albums/b521/rng648/positioncontrolmode_zps5628b986.png)

Pin 7 needs +24v
pin 41 need the minus side of that 24 v supply
Then connect pins 33,29,8,9,31,30 to pin 41, the minus side of the 24v power supply.  All those pins mentioned on this line should really form part of your safety strategy, via realays and e-stop buttons etc as a way of disabling the drives.

Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: andre13442 on January 07, 2016, 09:15:02 AM
Hi, i use the different line driver, are you still on this forum??
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: andre13442 on January 07, 2016, 09:18:28 AM
Anybody used those line drivers before? The manual for them doesn't spell things out clearly for an idiot like me  ::)

(http://i1290.photobucket.com/albums/b521/rng648/linedriver_zps19c4c84c.jpg)

I'm thinking that the GND and +5v I can get from the BOB and that "channel A" could be "DIR pin 2" from the breakout board.

"Channel B" could be "STEP pin 3" from my breakout board? Does that make any sense?  :D

On the output side that would mean pin 5 and 6 would be the differential DIR signals - & + that get fed into the panasonic drivers?




i use this differential driver, are you still on this forum??
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: BR549 on January 07, 2016, 02:08:34 PM
HUM,  i am not exactly sure why you are asking for linux CNC  help on the Mach3 forum ????? Shoudl you not be over at teh LinuxCNC forum ?? I dought you will find much help here.

(;-) TP
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: ger21 on January 07, 2016, 05:02:32 PM
He's waiting for the Linux version of Mach4. ;)
Title: Re: Upgrade to Mach 3 / 4 Linuxcnc from PLC, using Panasonic A4 servos.
Post by: BR549 on January 07, 2016, 05:12:40 PM
I would not hold my breath for that one (;-)

(;-) TP