Internet PLC Forum

General => Technical support => Topic started by: Mark P. on March 08, 2019, 09:16:38 PM

Title: Jog Moves with Step / Dir
Post by: Mark P. on March 08, 2019, 09:16:38 PM
Hello

I have an application that uses Step and Direction on the FX processor.

All works great, but I need something a bit different than the standard commands ?

Let say my stepper motor is running a fan.    It really has no distance

I just want to run it and adjust the speed while in motion.

Basically a jog command with speed change.

My concern is all the move Commands seem to have a distance associated with them.

I don't want the fan to stop eventually when it reaches the upper limit of move commands, just turn.

Is there a way to directly control the pulse train out ?

Thank you for any thoughts

Mark
Title: Re:Jog Moves with Step / Dir
Post by: garysdickinson on March 09, 2019, 03:36:19 AM
Mark,

The PLC supports some number of PWM (pulse width modulation) channels. You could use one of these channels as the source of pulses for your stepper driven fan.  You can control the pulse (step rate) via the SetPWM statement in TBASIC.

SetPWM allows you to control the pulse rate and the duty cycle. For your application you need only 2 duty cycles, 50% and 0%.  The 0% value stops the pulses.

I have used the PWM mechanism to control fan speed.  My customer used a DC fan that accepted a PWM signal to control fan RPM.

Stepper motors are not, typically, used for fans for a lot of good reasons.

Fans used to cool CPU chips and mother boards are variable speed.  The fans with 4 wires use a 0..5 VDC PWM signal to control fab speed. These fans are cheap and plentiful.  

The PLC's PWM system will work with the 4 wire fans if you limit the signal to 0..5 V.

Best regards,

Gary D*ckinson
Title: Re:Jog Moves with Step / Dir
Post by: garysdickinson on March 12, 2019, 01:51:29 AM
Mark the number of steps before the stepper quits moving is about 2 billion.

If the step rate was 800 pulse/sec with the maximum step count your fan would run for about 31 days before it stops.

What is the expected max time that the fan needs to run? 1 day, 1 week or one month?  2 billion steps will handle it.

If your max run time is measured in minutes or hours, just program it for the max step count of &h7ffffff every time you run the fan.

If you are looking for variable speed to meet your air flow requirements, then the use of steppers system is not ideal.  I think that you will have to abort the current stepmove command and physically stop the stepper before changing the speed. This may be audibly annoying.

Gary D
Title: Re:Jog Moves with Step / Dir
Post by: support on March 12, 2019, 04:55:22 PM
Gary's suggestion is what we would normally advise users too.

The good news is that since firmware version r70 (on FMD and Nano-10) and on all the Fx series since firware version F90.0 we have implemented stepjog function which is to STEPMOVE with either &H7fffffff or &H80000001 for infinite rotation in positve or negative directions, respectively.

Hopefully this answers to your question. This should have been included in the manual. Will bring this up with the staff who maintain the manuals to include in future editions.