Jump to content

M90-TA2-CAN stepper motor control


Recommended Posts

Hi all

Just starting a fight with a M90-TA2-CAN PLC. 

I need to control a stepper motor driver with this.

I see there is no PWM output available on this model, so I will try the approach of using a timer to flip the port status and create the pulse stream.

I only find a 10ms timer as best, and I´m worried that is not fast enough to drive at the speed required.

Most likely I´m not using the right approach here.

Any other ideas?

Link to comment
Share on other sites

  • MVP 2023

Any reason why you're using an M90 in a new application?  This is an ancient model, and it's not suited for what you're trying to do.  You could improve your speed with an Interrupt routine, but only to 2.5 ms per operation.

There are several V130s that have hardware level stepper control.  I would HIGHLY recommend switching platforms.  What other I/O requirements do you have?

Joe T.

 

Link to comment
Share on other sites

On 08/10/2016 at 11:58 PM, Joe Tauser said:

Any reason why you're using an M90 in a new application?  This is an ancient model, and it's not suited for what you're trying to do.  You could improve your speed with an Interrupt routine, but only to 2.5 ms per operation.

There are several V130s that have hardware level stepper control.  I would HIGHLY recommend switching platforms.  What other I/O requirements do you have?

Joe T.

 

Hi Joe

Thanks for your quick reply.

I,m just retrofitting an old dough lamination machine. The stepper motor just controls the lamination roller height, so precision or speed is not paramount.

I had this M90 stuck on a shelf for years, and when the machine controller broke down last week, it was the most suitable thing at hand for a quick fix. I,m about to finish the program. Worst case scenario I will use the analog out linked to an arduino to provide the pwm, and read the pulses with the high speed input. As I told precision is not key here, so some missing steps up or down during the program doesn't make a difference. I will send the roller to the home position after every complete cycle to reset the position.

If it goes OK, with more time I will implement into a  SM70-J-T20 , so I can retrofit all the three machines on site.

Other I/Os are just some sensors and relays, no rocket science here.

What about that interrupt routine? Do you have any example?

Thanks in advance for your help.

Is something like this: 

 

 

 

 

Link to comment
Share on other sites

  • MVP 2023

I don't have an example handy, but if you get a program started I can help.  You'll be using one of the Special Functions to get it.  Open the U90 Help and type "interrupt" under the Search tab.

Something to consider is the interrupt is rather slow - 2.5 ms.  Check your scan time online (SI 0) and see if you even need it, especially if you're not worried about response time.  If creating steps with a couple of timers set to 0.01 seconds will do then that is much easier.

Joe T.

Link to comment
Share on other sites

On 14/10/2016 at 1:08 AM, Joe Tauser said:

I don't have an example handy, but if you get a program started I can help.  You'll be using one of the Special Functions to get it.  Open the U90 Help and type "interrupt" under the Search tab.

Something to consider is the interrupt is rather slow - 2.5 ms.  Check your scan time online (SI 0) and see if you even need it, especially if you're not worried about response time.  If creating steps with a couple of timers set to 0.01 seconds will do then that is much easier.

Joe T.

Thanks a lot for your reply. 

You were pretty right on your first reply about using this such model...

Now I just found that the backup battery does not retain the variable data after a power cycle.... and I only realised at the very end of the project. Obviously is my complete fault as I only did a quick check on the online help and lost the detail about the database not being backed up.

Now that I'm really screwed, does the Samba models do retain all the variable and database parameters?

Which model will be the Samba alternative with a proper PWM output?

Thanks again for your help.

Link to comment
Share on other sites

  • MVP 2023

Yes, the Visions remember variable values.  Except the actual high speed counter value which always resets to zero, but you can program around that with a last value buffer.

The M90 fits in a 1/4 DIN hole, so I'd stick with something the same size.  You haven't specified what output speed you need, though.

If you've got your heart set on a Samba, use an SM35-J-T20.  It technically has stepper driving built in but is limited to 1 KHz on a sourcing output.  I know the specs say .5 KHz, but I've run it faster.

If you want a real stepper drive, you'll need one with the NPN high speed sinking outputs.  Entry level with this functionality is a V130-x-TR20, and the outputs are rated to 200 kHz.  You can also get this I/O board in the V350.

 

Joe T.   

Link to comment
Share on other sites

  • 3 weeks later...
On 17/10/2016 at 0:10 AM, Joe Tauser said:

Yes, the Visions remember variable values.  Except the actual high speed counter value which always resets to zero, but you can program around that with a last value buffer.

The M90 fits in a 1/4 DIN hole, so I'd stick with something the same size.  You haven't specified what output speed you need, though.

If you've got your heart set on a Samba, use an SM35-J-T20.  It technically has stepper driving built in but is limited to 1 KHz on a sourcing output.  I know the specs say .5 KHz, but I've run it faster.

If you want a real stepper drive, you'll need one with the NPN high speed sinking outputs.  Entry level with this functionality is a V130-x-TR20, and the outputs are rated to 200 kHz.  You can also get this I/O board in the V350.

 

Joe T.   

Joe.

Thanks a lot for your help and advice into this. Sorry I didn't replied before, but after finishing the M90 coding I had a loads---t of due tasks to complete.

The M90 is doing OK now, had to install an encoder to feedback the position and install a separate 24v line with a backup battery to keep the programs alive. At least the machine is up and running now.

I'm ordering next week a SM70-J-T20 to have a definitive solution.

400hz is the most I need to drive the motor at the desired speed.

I'm very pleased I found unitronics PLCs time ago. By far they have the most intuitive coding platform. Developing applications with them is very swift. 

Again thanks a lot for your help.

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...