Machsupport Forum

Third party software and hardware support forums. => Galil => Topic started by: Kitamura on May 19, 2013, 03:01:15 AM

Title: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 19, 2013, 03:01:15 AM
Hello,

We are trying to setup a Kitamura T-12, that has already been setup using a Galil DMC-1840 pci card and a Contec 16 I/O card. It has the original DC motors and includes the automatic tool changer. The machine was fully functional with the current setup, but was decommissioned. We have since purchased the machine, and are attempting to get it running. Apparently the machine was removed in a running condition, so should be fairly simple to get going again? Everything is still there except the computer, however we have the original cards from it.

We are using a fresh computer to run the machine, running windows XP. We have successfully installed the PCI drivers, DMC Smart term and Mach 3 Trial to get us going.
All of the software recognises the controller fine. We have installed the Contec drivers, but not the Contec Mach plugin?

We have powered the machine up, and we are unsure where to go to from here, as far as moving axis or downloading the data that was burnt to the pci card when it was last running.

Any help would be greatly appreciated.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 21, 2013, 11:50:04 PM
No hints anyone?
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on May 22, 2013, 08:44:48 AM
Hi Kit,
First off I am not sure if Mach3 will run the Galil plugin without actually owning a valid license.
If you read the Galil plugin manual I believe the first thing is to verify that the Galil is communicating with the smart term software. Then, once you have the axis tuned, which you nay already have since the card has run the system in the past,
Then install the Mach3 Galil and Contec plugins and get them working. If all goes well it should take a day to get it all running.

Just remember that we all have jobs too and may not have the time to answer your questions when you want them answered. I will help as time and knowledge allows.

Mike
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 22, 2013, 11:42:54 PM
Thanks for the reply,

So when the machine was initially set up would the configuration of been burnt to the cards ROM? If so do we need to retrieve it to the computer or can we just start commanding motor movements in smart term now the machine is set up and the card communicates with smart term etc?

Thanks again
Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on May 23, 2013, 12:04:03 AM
Thanks for the reply,

So when the machine was initially set up would the configuration of been burnt to the cards ROM? If so do we need to retrieve it to the computer or can we just start commanding motor movements in smart term now the machine is set up and the card communicates with smart term etc?

Thanks again
Jack
..Hopefully,
It has been awhile since I used smart term but I believe you can call up what is burn into the card with smart term. If it has been burnt into the card then yes you should be able to command motion via smart term and get  an axis to move.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 23, 2013, 12:11:18 AM
OK thanks Will give it a go this weekend when i get back to the machine

Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: smurph on May 31, 2013, 06:06:52 PM
Not sure what was running the machine before hand.  Galil + Contec smells like camsoft to me.  I really don't know how camsoft saves the motor tuning values.  With Mach3 and the Galil plugin, we require that the motor tuning is burned on the card.  

So the main thing that needs to be burned into the card is the PID values for each motor.  MG KPA; MG KIA; MG KDA;, etc...  will show you the values.  I think stock is 64, 0, 64 but I'm not real sure.  So if you see something low like that, then you are going to have to tune the motors.

Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 31, 2013, 06:26:27 PM
Hello thanks for the tip. I come across a problem on sunday night where the servos aren't getting there constant power as there are 3 contactors which Aren't latching but ran out of time to troubleshoot it further as i can only work on the machine weekends unfortunately. but hopefully i will get the issue sorted today so i can resume testing/programming.

Thanks
Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on June 03, 2013, 05:17:52 AM
After some further inspection we have determined the following:
 - The reason the contactors on the drive cards aren't latching is they are awaiting a signal from OPTO 22 G4PB32DEC board.
 - We are unsure what controls this board, but it plugs into an auxiliary plug attached to the Galil card.
 - Two of the relays(?) on the OPTO 22 board light up, unsure if this means anything or not. They are in positions 0 and 1.
 
We are unsure what exactly the function of this board is, and how we can interface with it.

Additionally, we are unsure how the Contec card interfaces with the Galil ICM.

Here's some photos:
This is the Opto 22
http://imageshack.us/a/img442/6793/mg8671.jpg

Here is the ICM
http://imageshack.us/a/img801/1716/mg8672.jpg

And here are the Fanuc A20B-0004-017 Drive cards
http://imageshack.us/a/img401/7030/mg8670.jpg


Thanks again for your help and any ideas would be greatly appreciated.

Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on June 03, 2013, 06:03:57 AM
After some further inspection we have determined the following:
 - The reason the contactors on the drive cards aren't latching is they are awaiting a signal from OPTO 22 G4PB32DEC board.
 - We are unsure what controls this board, but it plugs into an auxiliary plug attached to the Galil card.
 - Two of the relays(?) on the OPTO 22 board light up, unsure if this means anything or not. They are in positions 0 and 1.
  We are unsure what exactly the function of this board is, and how we can interface with it.

The outputs from the OPTO22 board need to be set up to be driven from the Mach3 enable signals so when you take Mach3 out of E-stop the drives get re-enabled.
If the Opto 22 Board is connected to the ICM-1900 it is controlled with Mach3 via the galil plugin. IIRC it is using the extened I/O of the plugin.

Quote
Additionally, we are unsure how the Contec card interfaces with the Galil ICM.

The Contec card normally wouldn't interface with the Galil card but would be controlled directly by the software, in this case Mach3 via the Contec plugin.

It sounds like you really need to sit down with the manuals for Mach3, the Galil plugin, the Contec plugin, the Galil board, and the ICM board. I would also consider drawing up a wiring diagram so you know which wire goes where.

Quote
Here's some photos:
This is the Opto 22
http://imageshack.us/a/img442/6793/mg8671.jpg

Here is the ICM
http://imageshack.us/a/img801/1716/mg8672.jpg

And here are the Fanuc A20B-0004-017 Drive cards
http://imageshack.us/a/img401/7030/mg8670.jpg


Thanks again for your help and any ideas would be greatly appreciated.

Jack

Let me know if I can be of more help.

Mike
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on June 03, 2013, 11:58:02 PM
Hello again Thanks for the reply,

I have drawn up a rough picture of what plugs into where.
(http://img189.imageshack.us/img189/1337/circuitr.png)


I have the manual for the Galil equipment and have read it but i cant work out what the Contec card needs to do. I'm not sure if I'm trying to configure Mach to enable the extended I/O and the Contec I/O so I can the command motor movements, Or if I'm first trying to configure Galil suite to turn on the I/O then command movements. If we are trying to get Galil suite to make movements etc I don't understand how to make it enable the Contec I/O?

Thanks again

Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on June 04, 2013, 06:24:27 AM
Hi Jack,
A couple of things,
1. I would not have expected the Contec card to be connected to the ICM. It will take some research to figure out exactly what the contec is doing. Regardless of what it is doing exactly you will need to install the Contec plugin to make it function.

2.It looks like from your drawing that you need to get the Galil plugin installed, setup to run the servos and the extended I/O. Then you need to work on the Contec plugin unless someone has a better idea of what is going on.

3.From the Galil manual.
"Note for interfacing to OPTO-22 G4PB24:  When using the OPTO-22 G4PB24 I/O mounting rack, the user will
only have access to 48 of the 64 I/O points available on the controller.  Block 5 and Block 9 must be configured as
inputs and will be grounded by the I/O rack. "

4. Please find out the model number of the contec board.

HTH
Mike
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on June 06, 2013, 04:58:10 AM
Hi there,

Ill find out the model number of the board this weekend and will be drawing a complete wiring diagram of everything and ill report back when I'm done.

Thanks

Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on June 16, 2013, 05:48:01 AM
Over the last couple of weeks we have made some decent progress;

We installed a driver for the Contec card that included a diagnostic program, allowing us to manually toggle the relays on the Opto-22 board.
This has allowed all the axis amplifiers to switch on and be controlled by the Galil board, and seems to be a good way to get everything going until we write a macro in Mach.

Using SmartTerm we were able to tune the axis motors (setting KD, KP and KI). The X axis seemed to work without tuning, but it was required to make the Y and Z axes move.
After tuning, we seem to be able to make all the motors move in all directions, with full control of speed, acceleration etc.
We used a pdf on Galil's website to do this, increasing KD until the error became unstable, then KP, then KI.

However, we still have yet to iron out some problems:

When first turning on the machine and switching the X axis relay through the Contec program, the X axis runs away. If you switch the relay off and back on, it then runs away in the opposite direction. If you then toggle it a third time it will settle down. Before tuning the Z axis, it would also do this, however after tuning it does not seem to do it anymore.

When tuning the Z and Y axis, we could considerably increase KD and KP, to 1000 and 80 for Z, and 1000 and 40 for Y, without the servo vibrating. With the X axis, KD and KP could only be set to 100 and 5 (Galils recommended minimum settings to start tuning are 100 and 5), and was still less stable than the other two axis. Increasing KI to 1 made all axes unstable.
Also, is tuning in Galil a waste of time, should we just be doing this later in Mach?

When using SmartTerm to issue a move command to all three axis at once (PR 5000 and BG), at one stage the Z axis moved the wrong direction, and another time it ran away alltogether. All other times, once the machine has been safely powered up everything is fairly reliable.

When starting Mach with power to the servos, all servos run away. Perhaps they are trying to home or something similar?


Apart from that, I think we are definitely on the right track anyhow.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on June 16, 2013, 05:53:35 AM
We should probably update the wiring diagram above to show:
 - The Contec card drives the Opto-22 board (and the Opto-22 board has no direct interface with the Galil card.
 - Both outputs from the Galil card go to the Galil board

Sorry for the confusion earlier. This makes much more sence.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on June 16, 2013, 09:39:35 AM
Over the last couple of weeks we have made some decent progress;

We installed a driver for the Contec card that included a diagnostic program, allowing us to manually toggle the relays on the Opto-22 board.
This has allowed all the axis amplifiers to switch on and be controlled by the Galil board, and seems to be a good way to get everything going until we write a macro in Mach.

Nice to see some progress being made.
you may not need a macro for Mach3 to do this. Once the Contec plugin is installed, Mach3 may just allow you to set those contec outputs to be axis enable. Mach3 turns the axes on one at a time with a small delay between each activation to prevent a massive current draw caused by switching them on all at the same time.

Using SmartTerm we were able to tune the axis motors (setting KD, KP and KI). The X axis seemed to work without tuning, but it was required to make the Y and Z axes move.
After tuning, we seem to be able to make all the motors move in all directions, with full control of speed, acceleration etc.
We used a pdf on Galil's website to do this, increasing KD until the error became unstable, then KP, then KI.

I find that KI can be problematic and many times it can be left at zero. Ki or the integral part of the PID loop helps get rid of any final error. When just using PD some systems will not cancel out a small final error. Many times Ihave found this error to be so small as to not be a problem. When using I on a different controller thay also give a max I error I belive that helps with the I insabiltiy. I am however not the greatest PID tuner so your mileage may vary.

However, we still have yet to iron out some problems:

When first turning on the machine and switching the X axis relay through the Contec program, the X axis runs away. If you switch the relay off and back on, it then runs away in the opposite direction. If you then toggle it a third time it will settle down. Before tuning the Z axis, it would also do this, however after tuning it does not seem to do it anymore.

It may be wise to make sure that the Galil card is in control of the axes before turning on the enable from the Contec card. I would normally think that the Galil card would have the axis enables connected to it as opposed to having the Contec card do it.


When tuning the Z and Y axis, we could considerably increase KD and KP, to 1000 and 80 for Z, and 1000 and 40 for Y, without the servo vibrating. With the X axis, KD and KP could only be set to 100 and 5 (Galils recommended minimum settings to start tuning are 100 and 5), and was still less stable than the other two axis. Increasing KI to 1 made all axes unstable.
Also, is tuning in Galil a waste of time, should we just be doing this later in Mach?

IIRC you must use the BN command to burn these settings into the Galil card. The only tuning you will do under Mach3 is to set the units per distance, max velocity and  acceleration.


When using SmartTerm to issue a move command to all three axis at once (PR 5000 and BG), at one stage the Z axis moved the wrong direction, and another time it ran away all together. All other times, once the machine has been safely powered up everything is fairly reliable.

When starting Mach with power to the servos, all servos run away. Perhaps they are trying to home or something similar?

Apart from that, I think we are definitely on the right track anyhow.

If the machine isn't reliable using smarterm it won't be better under mach3. Use smarterm to make sure it works before going into Mach3 to test run.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on July 14, 2013, 04:56:17 AM
We seem to have gone back somewhat after learning a bit more about what we have and how it all works.

The Fanuc amplifiers we have are velocity type, and appear to utilize what we assume to be an aftermarket frequency to voltage converter which needed to be enabled.
As we were trying to tune them as torque amplifiers rather than the velocity amplifiers, we have set KD KP and KI back to zero for now.
It may be worth noting that the Galil card does not directly control the amplifiers (no wire in AMPENX), it is controlled by a relay on the OPTO-22 board.
Our amplifiers are part number A20B-0004-0171.

We have managed to change the offset voltage on the amplifier such that when the motor is off or the motor command wire (MOCMDX) is unplugged the motor does not runaway. We can get it to sit still, but it generally after a few minutes it will start to gradually increase in speed by itself. We have not touched Gain or Dither from their original values. However, if you kill the power and turn everything on again the offset has to be readjusted to get the motor to stay still.

When issuing a SH command in Galil with the motor MOCMDX wire plugged back in the motor will run away. Changing the offset voltage in Galil using the OFX=n command can get the motor to stop running away. Again as above, if you kill the power and turn everything on again OFX has to be readjusted to get the motor to stay still.

We have removed the motor from the machine so that it cannot cause any damage with these runaways.

We are currently trying to locate a manual for the Fanuc amplifier so we can tune it properly. We have access to an oscilliscope.
However, we are unsure of several things still:
 - Why the offset needs to be readjusted each time?
 - Why the motor will runaway when issued a SH command, and why having a different offset voltage in Galil fixes the problem (temporarily)?

Thank you everybody for your help so far, it has been a very steep learning curve for us.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: TOTALLYRC on July 14, 2013, 09:03:44 AM
Hi Kit,
If the motors are running away they are either sensing the encoders incorrectly or they are not sensing them at all. In Mach3 under the configure plugins/galil/axis setup you can select either servo or servo reverse. this selection is the same as changing the motor wire polarity. I am not sure howto do this usingthe the galil commands. The way the controller works when setup properly is to keep the encoder position equal to the commanded position +- the following error.

HTH
Mike
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: smurph on July 14, 2013, 04:02:24 PM
I completely agree with Mike.  If the motor is running away with SH, then you probably have an encoder problem. 

The motor encoders can be logically reversed with the Galil MT command.  Read up on that one.  Also, the Galil can be setup to keep runaways from causing problems.  See the OE (OFF on error) command.

As to the OFx needing to be adjusted every time, that is going to be an servo drive amplifier issue.  The Galil will apply the same voltage offset every time.  Could there possibly be some change in resistance on that circuit?  The Fanuc drives you have may operate on a PWM control input.  So I guess that third party device converts analog voltage signals to frequencies that the drive understands.  If this is the case, then you may have an offset issue in the V to PWM device.  You must check this and make sure that the frequency output is stable with regards to voltage applied.  Also, devices like this may float if there is no input, which may explain your drift.

But this is a hard problems to solve on any servo system.  The main way people handle it is to remove power from the servo amp when there is no command voltage.  This is why the SH and MO Galil commands operate the AMPENx signal.  I would strongly suggest working this into your control circuit.  You can leave the Opto22 relay intact.  Just wire the AMPENx into the circuit in series so that both the Opto22 relay and SH need to be active to enable the servo drive.

Torque and Velocity refer to the mode by which the servo drive operates, not by how it is controlled.  The Galil cares not whether the drive is torque or velocity.  Only the Galil PID values may change between the two modes.  Tuning is accomplish the same way regardless.  You are simply looking for a command response that fits your needs.  If you have a servo drive that will do either torque or velocity, one may work better than the other for any particular application.  But if you only have velocity control...  then that is what you are going to use.  :)

Steve
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: cnc-it on October 30, 2013, 04:25:06 AM
Just a note on these type of Fanuc drives. In the original Fanuc set up the encoder goes back to the mother board from the motor, the motor would be without a tacho..a circuit on the  Fanuc board then uses the signal for position checking and also converts the signal using a velocity to frequency converter to create a tacho signal which it uses to regulate the motor speed by varying analogue signal to the drive. The frequency to velocity converters that Kitamura has are taking the place of the Fanuc circuits on the motherboard.

The converter is sending a tacho feed to the drive as these drives can be configured to run in speed mode from a tacho on a motor...and an encoder signal back to the galil.

John.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on November 03, 2013, 02:26:08 AM
John, you are absolutely correct.

Sorry for not updating the thread, we have been slowly chipping away at some of the issues. We wired the machine up as suggested, with the AMPENx in series with the opto-22, so MO will kill the motors etc. We also set up the off on error. We have purchased an oscilloscope, and have found a few interesting things;

 - We have traced the cause of the machine running away back to the F to V converters. When you start the machine for the first time (and the motors are stationary), they are outputting a signal of 10v. If the drives are then turned on, the motors run away.

 - Switching the drive power off and on will return the output voltage to 0v when the motor is stopped, and the machine is completely controllable until you switch both the cabinet and the computer off.

 - Alternatively, the F to V converters have some sort of shoddy switchable circut, which introduces 5v to various places on the board when activated (see photo linked below, the yellow and black wires going into the front of the boards). This is connected to a relay on the opto-22 board, and flicking this on and off a couple of times will set the voltage to 0v when the motor is stationary. You can then turn the drives on and again the machine is completely controllable until you switch both the cabinet and the computer off.
Photo (sorry for the poor quality and large size) http://img199.imageshack.us/img199/4765/gw06.jpg

 - Once the machine is controllable, the voltage out of the f to v converters seems to be pretty stable and consistant with relation to motor speed.

 - The encoders seem to be only recieving around 4v. They are using the standard galil 5v output, however there appear to be alot of things attached, and the 5v is being pulled down to around 4v. The F to V converters have their own individual precision 5v output, we are unsure if using this would be better or if it does not matter?

It appears that once we have this sorted out, the axies should be functional. Thank you everyone for your help so far.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: cnc-it on November 03, 2013, 05:28:16 AM
Hi I know that western digital do some neat pluggable frequency to velocity converters that might work better. On the Heidenhain system I have the encoder voltage has to be smack on or the control will alarm out..not sure with the galil card but keeping to a true 5v is always best.

John.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on November 05, 2013, 02:41:57 AM
Thanks for the reply John,

Who makes the converters? Is it western digital the hardrive manufacturer?

Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: cnc-it on November 05, 2013, 03:47:59 AM
Hi Jack sorry my typo! It"s actually us digital ..just been on there sight and I can't find the converters  now but I'm sure if you contacted them they would find the product for you.

John.
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: cnc-it on November 05, 2013, 04:06:29 AM
Jack,

I found it under discontinued products..

It's the ETACH2 www.usdigital.com

I'm sure another company will make something similar...

John
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on November 05, 2013, 04:09:45 AM
No worries John!

I found the converter your thinking of by us digital its call the etach2 (http://www.usdigital.com/products/interfaces/encoder/converters/ETACH2). It looks ideal though they say the part is obsolete and no longer available. At this stage it looks like I have 2 options, Either attempt to run the machine as is or possible look to retrofitting some new drives in? Gecko 320x or Rutex or something similar? Whats your thoughts?

Thanks
Jack
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: cnc-it on November 05, 2013, 05:20:14 AM
I personally would keep the original drives and try and find a converter  as your  drives are industrial quality much better than Rutex or Geko types...the only other option I would look at would be fitting ac drives and motors such as Yaskawa or Mitsubishi but this would be an  expensive option as you may also have to start with new motor plates and all the cables for the new motors would have to be bought and fitted on the machine.

John
Title: Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
Post by: Kitamura on May 12, 2015, 01:11:19 AM
Wow doesn't time fly......

To update the situation we battled with the drives as time allowed and while we technically got the machine to function we have decided to install new servo drives.

The machine could be made to function and was reasonably well behaved however would arbitrarily run away which we are not interested in at all.

We have selected AMC servo drives to run the machine and have purchased one B30A40ACG to use as a proof of concept on all the axis and once we are sure it will work for us we will order three more.

The main question at this stage is what VDC does the drive put out? Is it just a function of the voltage input on the AC side of the power supply? How is the bus voltage set as it is unclear on the datasheet supplied by AMC. The simplest option for us is to run it on 200VAC as we have a transformer for this voltage here (line voltage in New Zealand is 230v/440v 50hz).
http://www.a-m-c.com/download/datasheet/b30a40ac.pdf

Also I have no idea what the 'G' modification represents in the part number which I hope won't hinder us....

Hopefully this time it should all be much simpler as the hardware is all modern etc (less hours with the oscilloscope hopefully :) )

Looking forward to some info,

Thanks
Jack W