Author Topic: dc motor wont stop running in setpwm  (Read 19560 times)

george1

  • Newbie
  • Posts: 14
  • I love YaBB 1G - SP1!
    • View Profile
dc motor wont stop running in setpwm
« on: July 22, 2003, 04:34:32 PM »
Hi,
  I used the pwm modulation channel to run a dc motor. Turn on the switch and the motor goes on.  I turn off the switch the motor keeps on going.  It is acting as if it is latching.  There was no way of me turning the motor off without turning off the PLC or hit the reset button on the online monitoring system.

Also another scenario, since this motor does not consume much current I was able to turn it on and off using just an ordinary I/O.  But, when I tried to turn it on and off through the online monitoring system it would not turn on but you would hear a little thump as if not enough current.  If you do it manually it works  
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: dc motor wont stop running in setpwm
« Reply #1 on: July 23, 2003, 06:50:02 AM »
What do you mean by "turning OFF" the PWM channel. Do you mean you set PWM to zero period or do you mean using a physical switch to cut the supply current to the motor?

Note that you can change the speed of the motor by changing the duty cycle provide the frequency of the PWM matches that of the motor time constant. Try a different frequency e.g. 2KHz or 8KHz. The highest frequency (32 KHz) may not always work with all the motors. Some motors require you to add a bypass capacitor in order to be driven by high frequency PWM signal.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

george1

  • Newbie
  • Posts: 14
  • I love YaBB 1G - SP1!
    • View Profile
Re: dc motor wont stop running in setpwm
« Reply #2 on: July 23, 2003, 01:09:13 PM »
Hi,
  Yes, I mean I turn on a switch which I have on a board which is connected to a wire going into input 1.  Also, I have a wire between output 8 of the plc and the motor.  As I turn on the switch , the motor is running. As I turn off the switch the motor keeps on running.  I had set the output 8 for pwm to offer higher current.  
Also, I was trying to do a feedback loop.  But the frequencies dont show up even though I set A = pulsefrequency (1).  It shows zero.  The pulswidth and pulseperiod showup something like 327,564 and 654,594.  Some high figures like that.  I was trying to do a close loop to show my customers how to DC motor control.
than you so much
john
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: dc motor wont stop running in setpwm
« Reply #3 on: July 23, 2003, 10:36:40 PM »
Can you explain how you program to turn ON output #8? You mentioned PWM and yet you said you want it to turn ON when the INPUT is ON and turn OFF when the switch to the input is OFF? If you are using it as an ON/OFF only output, then you can just treat it like a regular output and not use its PWM feature. e.g.

    IN1                                            OUT1
|--||--------(OUT)

You only use the SETPWM output if you want to use the duty cycle to control speed to the motor. In that case, when the switch is OFF, you should trigger a [DIFD] funciton such that another custom function is executed to SETPWM to 0 duty cycle and the motor will be shut off.

    IN1                                                                RLY1
|---||----------[DIFD]
|
|    RLY1                                                  Fn_#2
|---||---------{dCusF}  ' Fn_#2 SETPWM to 0%
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

george1

  • Newbie
  • Posts: 14
  • I love YaBB 1G - SP1!
    • View Profile
Re: dc motor wont stop running in setpwm
« Reply #4 on: July 24, 2003, 07:28:12 AM »
Hi,
  Thank you for the clarification :)  
Also, I am getting a zero reading on the frequency.  I am a getting a reading on the pulsewidth and pulseperiod. I am getting large astronomical numbers on those two readings like 3276800 and 6553600.   I want to incorporate it in my close loop.  I think I would need the frequency to do that.
thank you so much
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re: dc motor wont stop running in setpwm
« Reply #5 on: July 24, 2003, 08:03:59 AM »
Remember, pulse monitoring (PMON) channel #1 is digital input #3 and PMON channel #2 is input #4.

Most likely you have connected to the wrong input. Please read page 1-2 on your User's Manual to see the mapping of the special I/Os to the PLC's regular digital I/Os.

When there is no pulses arriving on a PMON input, it will saturates at maximum timing value and the frequency is reported to be zero.
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

george1

  • Newbie
  • Posts: 14
  • I love YaBB 1G - SP1!
    • View Profile
Re: dc motor wont stop running in setpwm
« Reply #6 on: July 25, 2003, 11:11:04 AM »
Hi
  thank you so much for the clarification.  
« Last Edit: December 31, 1969, 04:00:00 PM by 1076562000 »