Internet PLC Forum

General => Technical support => Topic started by: can on September 21, 2010, 09:27:34 AM

Title: Motor control
Post by: can on September 21, 2010, 09:27:34 AM
Hi. I'm trying to use a MD888 to give a DAC signal to a motor driver in order to control the speed of the motor. After I've connected dac 1 and 0vdc from the analogue IO port to the motor driver, the motor start turning by itself even though the power to the 888 is not even switched on. The voltage across the 2 pin is 0vdc. Is it a problem with 888 or with the motor driver? How can I make the 2 work together? Thank you

Regards
Title: Re:Motor control
Post by: support on September 21, 2010, 10:53:51 AM
Is the motor suppose to turn with 0V signal?

If the PLC is not even powered on and the motor start turning it is a bit hard to say that the PLC is causing problem to the motor driver. The DAC output may have certain impedance and the motor driver doesn't like it? What happen when you turn on power to the PLC? Does the motor turn when the DAC output is set to 0? Note that since the DAC is shared with ADC you must use the SETDAC command to configure the pin to DAC and set the output to zero. Otherwise it will be an ADC and it can be pulled up by neighbouring pin and cause the motor to turn.

You can also use a relay to control the DAC output pin to the motor drive and the relay is under the PLC's control so that the PLC can SETDAC first when first powered up and then turn on the relay to control the motor.
Title: Re:Motor control
Post by: can on September 23, 2010, 06:18:53 AM
Hi. When I setdac 1,200, I'm getting 0.2 vdc. However, upon closing a jumper to start the controller, the voltage jumped to 0.6vdc. Any workaround for this problem?

Thank you
Title: Re:Motor control
Post by: support on September 23, 2010, 08:34:23 AM
Is the motor analog input pulling it up to higher voltage? Sound a bit strange for an analog input to do it this way. Did you check the spec for the analog input to the motor? Is it a high impedance input?

You can connect a 10K resistor in series to the DAC output from the PLC, thru the resistor and then to the motor driver's analog input. Then SETDAC and measure the voltage at the PLC's DAC pin. It should be around 0.24V. Then start your motor driver and check the voltage before and after the 10K resistor. If the voltage at the motor side is higher than the voltage at the PLC's DAC output then there is some problem with the motor driver's analog input. It is probably pulling the signal high. You will need to connect a buffer to the PLC output to make it a low impedance. A simple IC such as LM324 connected as voltage follower will work to amplify the current from the DAC output.
Title: Re:Motor control
Post by: can on September 23, 2010, 09:27:44 AM
Is there any diagram as to how to use the LM324? Sorry it may sound lIke spoon feeding but I'm not too good at electronics. Thank you
Title: Re:Motor control
Post by: support on September 23, 2010, 12:11:36 PM
Just have to google (or Bing):

http://terpconnect.umd.edu/~toh/ElectroSim/VoltageFollower.html

http://www.voltagecurrent.info/wp-content/uploads/2009/12/lm324-connection-diagram.jpg
Title: Re:Motor control
Post by: can on September 28, 2010, 07:36:11 PM
hi. The resistance of the analogue input of the motor controller is 30KW. Will the use of LM324 be useful to output the correct voltage from the PLC to the controller in this case? What should be connected to pin 4 and pin 11 of the LM324?

Thank you
Title: Re:Motor control
Post by: support on September 28, 2010, 09:51:54 PM
Yes, LM324 voltage follower has no problem supplying enough current for a 30 K ohm load.

You can connect +5V or higher (up to the limit specified in the data sheet) to pin 4 and 0V to pin 11.
Title: Re:Motor control
Post by: can on September 30, 2010, 03:03:10 AM
Had tried using LM324 but the output is still the same. When I activate the controller and setdac 1,0, there is still a voltage of 0.3vdc between the pin. When I setdac 1,200, the output is 0.5vdc. However, the output drops back to 0.2vdc when I deactivate the controller. Any idea? It is also this problem that is making the excel link to have problem. Will connecting the 0vdc of the controller with 0vdc of the analogue helps?
Title: Re:Motor control
Post by: support on September 30, 2010, 11:03:04 AM
Did you measure the DAC output voltage without connecting to the motor controller? I am wondering if you are connecting to the wrong pin. Note that DAC #1 is at Pin 2 of the DB9 connector and DAC #2 is at pin 1. Please refer to the T100MD888+ Installation guide for the location of the ADC and DAC pins.
Title: Re:Motor control
Post by: can on October 01, 2010, 05:25:27 AM
Hi. Thanks for the advice. Solved the problem. Turn out that the controller is not grounded. Thought connected to PE is same as grounding. But excel link is still not working due to noise I think. Will try out the diode and capacitor as mentioned in the manual
Title: Re:Motor control
Post by: support on October 01, 2010, 08:47:09 AM
The diode and capacitor at the power supply is meant to prevent switching of heavy load from causing a voltage DIP at the PLC power supply and could reset the PLC. But if the communication is affected by the AC motor switching noise, then it will not resolve the issue until you have addressed the switching noise that is coming from the motor controller/motor driver. Also very important to remember is never to bundle the communication cable with other high current wires that carries the motor current.

Title: Re:Motor control
Post by: can on October 01, 2010, 09:40:06 AM
Hi. What are the things I need to do to take care of the noise from the controller? Basically, when I take away everything and only connect the earth of the controller and earth of power supply together, excel link still fails when I activate the controller. Why?
Title: Re:Motor control
Post by: support on October 01, 2010, 12:50:36 PM
1) what kind of power supply are you using? Is it good quality industrial switching or linear power supply?

2) Are you able to perform online monitoring with the PLC when the power supply and controller is connected to the PLC? If you have no problem doing online monitoring and get smooth data updates (look at the RTC and see if it updates every second), then it could be what you set in the ExcelLink that is giving trouble. E.g. don't specify too big a range of DM to read in a single action.



Title: Re:Motor control
Post by: can on October 02, 2010, 08:33:01 AM
Seems like Online monitoring is also not working when the controller is activated. Will putting a noise filter at the incoming ac to the power supply helps?

Happy Weekend
Title: Re:Motor control
Post by: can on October 03, 2010, 10:29:02 PM
Hi. After much trial and error over the weekend, seems like the communication between laptop and 888 is having problem whenever I activate the motor controller even though the both of them are not connected in any ways. Any idea why is that so? I'm using USB to RS232 cable. Is the cable having problem?
Title: Re:Motor control
Post by: support on October 04, 2010, 04:10:00 AM
Is your program writing out of the same COMM port that you use for communication? i.e. DId you execute any statement such as PRINT, OUTCOMM, READMODBUS, WRITEMODBUS etc?
Title: Re:Motor control
Post by: can on October 04, 2010, 07:57:01 AM
Hi. It's just a simple program to try out setdac. There's only a custom function for setdac. Everytime I activate the controller without any connection to 888, the TL server just fails to connect to 888. It's a servo motor controller btw. Will posting the manual help?
Title: Re:Motor control
Post by: support on October 04, 2010, 05:15:10 PM
Is the motor running? Can you run the motor controller but do not connect the motor and what is the result? If only when motor is running then communication is affected, it is quite clear the the motor controller high current PWM signal is affecting communication between the PLC and the PC.

You need to consult your motor manual on proper wiring and installation of transient snubber to absorb the PWM noise. Make sure that you do not bundle the communication cable with the cables that current the motor current. This is very important.
Title: Re:Motor control
Post by: can on October 04, 2010, 06:51:29 PM
Hi. Will check it out. Will using 485 to communicate be better?
Title: Re:Motor control
Post by: can on October 09, 2010, 05:37:23 AM
Hi. Is there noise filter built into the 888? Or can I just add any off the shelf noise filter between the power supply and the plc? Any specifications that I can use? Any CE certification? Any EMI filter?

Or should I just change a usb to rs232 cable to try again? Will RS485 work better than rs232?

Regards
Ken
Title: Re:Motor control
Post by: support on October 09, 2010, 06:53:51 AM
You said that the motor controller is not connected to the PLC (i.e. isolated) and they use different power supply, but when the motor runs the PLC's communication is affected. That appears to be electrical noise generated by the motor and coupled to the PLC by air. Did you implement any kind of electrical transient absorber recommended by the motor manufacturer? Transient absorption  is very important because without it your motor life can be severely shortened and your equipment will be an interference source that will fail all telecom authority requirements such as those stipulated by FCC. Also the noise could lead to false triggering of sensor etc so it must be addressed.

You can add AC noise filter at the AC side of the power supply for the PLC. But if the interference is coupled through the air it is not going to help. The root of the problem is that the motor is producing such high level of electrical noise it is affecting serial communication.

P/S - Did you try RS485 as per your previous post? You need shielded (connect shield to ground) twisted pair two wire cable between the PC and PLC to reduce common mode noise but it does not mean it is immune to electrical noise. Even if it works better you should not considered the problem-solved as the root of your problem is still not addressed.

Title: Re:Motor control
Post by: can on October 15, 2010, 02:13:33 AM
Hi. I've yet to try using rs485. I've installed a 100amp noise filter between the power inlet and the motor controller. At 0 rpm with holding torque, the time on monitor screen is not updated per second. However, when the servo motor is running, the time on the monitor screen is updated every second. Any idea what is happening and how to solve the problem? Thanks.  
Title: Re:Motor control
Post by: can on October 18, 2010, 08:05:14 AM
Hi. After many trial and errors, I've finally found the source of the problem. It seems that the USB to 232 converter is the problem. The problem disappears as soon as I operate my laptop on battery or use a desktop with a RS232 port for communication.

Thank you for all the help.
Title: Re:Motor control
Post by: support on October 18, 2010, 08:10:23 AM
Good to know. Thank you for your update. Did you try a different USB-to-RS232 converter or the U-485 adapter (which is USB to RS485 directly)? It appears that the electronics inside your USB to RS232 converter is spooked by the noise from the motor, or it could just be a slightly faulty converter that is near the limit of not operating and any slight disturbance from the electrical noise cause the comm to break down immediately.
Title: Re:Motor control GND Issues
Post by: garysdickinson on October 18, 2010, 11:50:40 AM
Good to hear that you are making progress on your noise problems.

Another thing you should consider is electrical grounding.  

If your system operates "correctly" when you laptop is running off batteries but "fails" when plugged into an AC outlet, then it sounds like you have an grounding issue.

When your laptop is connected to a grounded AC outlet, I suspect that you may be getting excessive current flowing through the RS-232 Signal GND.  This current then flows through the PC's AC cord. When you computer is disconnected from the AC outlet, this breaks the current path.

Plug your laptop into the AC outlet and disconnect the RS-232 cable at the PLC .  Use a DVM and measure the voltage  difference between the RS-232 Signal GND (pin #5 on the DB-9 connector) on the cable and and at the PLC socket.  

If you measure more than a few millivollts AC or DC then you have a grounding problem.  This grounding problem can result in communication issues with RS-232 signaling.  I have personally seen RS-232 cables melt as a result of AC grounding problems.

If you have an issue, you need to fix it.  Ensure that your PLC, power supplies and servo controller grounds are bonded together at a single point.  Use big fat wires to minimize voltage drops.

The AC protective ground (3rd pin on the plug) should be connected to this single point.  Any exposed metal in your system should also be tied to the protective ground (electrical safety issue).

Ensure that the everything that plugs into AC power is at the same ground potential. You may want to plug everything into a single plug strip.

Good Luck,

Gary D.



 

Title: Re:Motor control
Post by: can on January 07, 2011, 07:48:39 AM
Hi. I've connected big fat wire to a single point from all drivers and power putlet but I'm still getting the problem. Any place to ground the PLC? I've only grounded the power supply. There's only +v and -v from power supply to PLC. I'm currently using power from a generator to test. Any help?
Title: Re:Motor control
Post by: can on January 10, 2011, 06:44:47 AM
Hi. In case there's some lost soul out there who are like me looking for answers, you can try grounding the 9 pin port of the plc connector. I did that and problem solved. I was making my own wire or 2,3,4,5 but no grounding of the 9pin port. Though pin 5 is supposed to be ground, it's not working somehow. Thanks for all the kind soul who have helped one way or another.

Good luck.
Title: Re:Motor control
Post by: support on January 10, 2011, 08:07:56 AM
While it is good hear that have resolved the problem, we are a bit puzzled to learn about that, since pin 9 of the RS232 connector on the T100MD PLC is a NC (no connection).  So whether you ground pin 9 on the PLC side should not have any effect.

However, on the PC side pin 9 may be connected to the casing of the RS232 port, which is in turn connected to the shield of the RS232 cable.  By connecting pin 9 to ground you are grounding the shield on one-end which can provide an effective shield against EMI.  I don't know if that make sense but your previous post seems to suggest that the motor noise is what causes the RS232 communication to fail and if so then perhaps it is the shielding that is helping with the communication.
Title: Re:Motor control
Post by: can on January 10, 2011, 10:18:50 AM
Hi. Sorry I did not make myself clear. I did not start off with a standard off the shelf wire. I made the wire by just soldering wire to pin 2,3,4,5 of the RS232. It works fine for communication for past projects until the recent one that involves inverters and servos. After grounding the plug today, all is well so far.
Title: Re:Motor control
Post by: can on May 17, 2011, 10:01:00 AM
Hi. After playing around with the PLC and motors for a while with no problem, I encountered the same problem when I try to communicate with 4 MD888 using RS485. Trilogi can load using 9 pin to 485 while the motor is off but the same problem came back to haunt me when the motor is on. However, when I try to communicate with individual 888 using 9 pin cable, all works fine. Tried grounding the 9 pin port of the Auto 485 but the same problem still occurs. Any way to solve the problem?
Title: Re:Motor control
Post by: support on May 17, 2011, 05:30:59 PM
If motor is affecting your communication, check that you have installed the noise absorbing components to the motor brushes (if it is DC motor).

Also biasing the RS485 line will help it to reduce effect of switching noise from affecting the communication.