Hello Guest it is March 28, 2024, 11:04:01 AM

Author Topic: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup  (Read 27934 times)

0 Members and 1 Guest are viewing this topic.

Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #10 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.



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
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #11 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
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #12 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
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #13 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.
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #14 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.
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #15 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.
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #16 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.
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #17 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
We never have the time or money to do it right the first time, but we somehow manage to do it twice and then spend the money to get it right.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #18 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

Offline cnc-it

*
  •  153 153
    • View Profile
Re: Kitamura T-12 with Galil DMC-1840 and Contec I/O Setup
« Reply #19 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.