Jump to content

Restart stepper motor controlled via PWM output. Visilogic.


kratmel

Recommended Posts

I had to upgrade the control system of the plastic extruder. V700 + V200-18-E46B used in application.

The system has been operating successfully for over 2 years.

However, a separate installed dosing system that determines the color of the plastic has failed. It has a stepper motor, a driver and a failed control board.

I quickly connected the input of the motor driver to the output of the O0 npn PWM and programmed the change of the PWM frequency depending on the speed of the screw of the extruder. Everything worked, but there was one problem.

Sometimes  the stepper motor must be stopped for a few seconds without stopping the extruder (for cleaning).

Accordingly, the stepper motor that started smoothly with the extruder to a certain speed must stop and then accelerate again.

And here I find a problem - the output of the PWM which perfectly controls the stepper motor when starting from 0 speed does not want to start smoothly from another source.

That is, the variable recorded as the PWM frequency changes smoothly to the setpoint - but the PWM output signal to the stepper motor occurs only after 2-3 seconds and with a frequency that has already reached the required value - respectively, the motor does not start because the frequency is too high.

This part of net is controlled by START STOP STEPPER MOTOR BIT.

I try to use it for accelerate stepper motor after stop and  if it is slower then calculated frequency setpoint ML6.

ML11 - PWM frequency,  MI61 - frequency change step.

PWM1.JPG.409e692239be3ccff2fc545ede160c2f.JPG

I do not know why PWM signal output is paused for a few seconds (i try to disable all other net for test).

If MI61=1 - pause is approx 5sec after ML11 reached setpoint,   if MI61 = 50 - pause is shorter 1-2sec. If i use MI=200 - pause is short but stepper motor do not start sometimes.

I try to see PWM frequency in Info Mode - it is changed correctly but PWM output do not start after PWM frequency variable start to increment.

 

Any ideas for stepper motor start stop controlled via V200-18-E46B PWM output frequency?

 

 

 

Link to comment
Share on other sites

In similar project I had some time ago I used HSO in Step Control mode (not PWM), and frequencies for acceleration and deceleration are calculated in linearization block and copied to register for frequency, effectively the same thing you did. I remember having those issues that output would start with high frequency and motor couldn't speed up but can't say for sure what the solution was. When stopping are you ramping the frequency down or just set it to 0? Maybe put a delay after setting run bit if this is allowed.

17 hours ago, kratmel said:

And here I find a problem - the output of the PWM which perfectly controls the stepper motor when starting from 0 speed does not want to start smoothly from another source.

I'm not sure what you mean by another source.

Link to comment
Share on other sites

4 hours ago, Isakovic said:

I'm not sure what you mean by another source.

PWM frequency ML11 is copy of ML6  - and ML6 is linearisation result  depended of ANALOG OUTPUT to extruder.

Extruder rump make stepper motor rump  from 0  to  FmaxPWM.

Than this process is slow and maybe i do not find any delay.

 

If i stop stepper (F=0) and restart by increment F --- Stepper motor not follow to fast increment - no signal from PWM output (tested by frequency meter) . 

After some delay signal start  but F is to fast for stepper and it do not start - only rump sound.

Than quastion is - how many times per second PWM frequency variable can be updated?

Link to comment
Share on other sites

Kratmel, for your update frequency question I don't know the answer, but it would surely not be the length of time involved here.

I doubt that the following suggestion will do anything, but it is perhaps worth trying.  What happens if you reconfigure your project to only have ONE reference to ML11, not a few that "over-ride" amounts derived previously in the scan.  Do all your calculations on other MLs and then at the end of the project store that result in ML11.  What you are observing is perhaps not what the plc is using.

Also try quick ramping up and down when you need to stop/start the stepper.

cheers, Aus

Link to comment
Share on other sites

3 hours ago, Ausman said:

ONE reference to ML11

To check where is the problem i test separated solution (no other net present in program) :

1 - extruder-stepper ramping with linearisation (works fine);

2 - time controlled ramp with increment  and (or) scan time comtrolled ramp - pause in signal flow start present on PWM output.

I need ramp stepper in approx 1-2s from 0  to FpwmMax.  I see this ramp in PLC PWMfrequency ML - but no output pause is strange.

 

I dig into Visilogic  help and find this:

"If values out of range enter the Duty Cycle and Frequency operands, the output turns OFF and remains OFF until the values re-enter the range."

I think that V700 +  V200-18-E46B is  Enhanced Vision, V5xx/V1xxx 0.1Hz to 100kHz

But maybe V700 have different frequency range and if Frequency ML is out of range output turns OFF.

 

Then itry to check the same program on V1040...

 

 

Link to comment
Share on other sites

Kratmel, I guess the blank post was deliberate? 

It is curious what is going on, at this stage I would be doing manual entry of controlling numbers and bits.

I also found this piece of info which might be very relevant and needs to be assessed in relation to your control sequencing.  Perhaps you need to force a change to a quicker cycle on restart, which will then be over-ridden by the next change derived from your ramping.  I know this is saying MIs and you are using MLs, but I would guess the rules are the same.   Or perhaps a simple MB controlling bit change will also work. 

Cheers, Aus

PWM.jpg.a2d593e45a07fc7f80332ff6f2a39292.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...