{"id":7470,"date":"2018-05-31T10:22:33","date_gmt":"2018-05-31T08:22:33","guid":{"rendered":"https:\/\/aceautomation.eu\/stepper-motor-control-how-to-move-a-stepper-motor-to-several-locations-using-the-motion-out-function\/"},"modified":"2018-07-27T13:46:02","modified_gmt":"2018-07-27T11:46:02","slug":"stepper-motor-control-how-to-move-a-stepper-motor-to-several-locations-using-the-motion-out-function","status":"publish","type":"page","link":"https:\/\/aceautomation.eu\/it\/stepper-motor-control-how-to-move-a-stepper-motor-to-several-locations-using-the-motion-out-function\/","title":{"rendered":"Stepper Motor Control <\/br>How to move a stepper motor to several locations using the Motion Out function"},"content":{"rendered":"<p>Stepper Motors are continuous rotation motors. These motors have a defined number of steps per rotation. You control position and speed by telling the motor when to step and in which direction .<\/p>\n<p>The number of wires differ, but control done by sending step and direction signals.<\/p>\n<p>If you use stepper motors within their limits, they can be very accurate. They do not, however have any feedback to tell you they are at the location you specified. If your application needs this feedback you can add it with an encoder.<\/p>\n<p>Using Velocio\u2019s Motion Output functions, you can control up to 3 Stepper Motors per PLC.<\/p>\n<p>PLC Stepper Motor Example:<\/p>\n<p><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/eMRERpmzSfE?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 14pt;\">Wiring PLC to Stepper Motor<\/span><\/p>\n<p>Your PLC will provide the step and direction pulses, and take care of any needed ramping up\/down of speed.\u00a0 You will need a Stepper Driver to interface between the PLC\u2019s step and direction signals and the Stepper Motor.\u00a0 Often the inputs to Stepper Drivers include differential pairs for Step and Direction, consisting of Step+, Step-, Dir+ and Dir-.\u00a0 All Velocio digital outputs are sinking transistor type, so they can make the \u2013 connections (Step- and Dir-) in this arrangement and you\u2019ll connect the positive connections (Step+ and Dir+) to the + voltage you\u2019re using to power your PLC.\u00a0 Below is an example showing this wiring.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3446\" src=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-motor-wiring11.png\" alt=\"\" width=\"680\" height=\"331\" srcset=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-motor-wiring11.png 680w, https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-motor-wiring11-300x146.png 300w, https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-motor-wiring11-600x292.png 600w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>The Stepper Driver may include other options like Enable.\u00a0 These are often optional and can be controlled using an additional digital output.<\/p>\n<p><span style=\"font-size: 14pt; font-family: arial,helvetica,sans-serif;\">PLC Programming for Stepper Motors<\/span><\/p>\n<table style=\"height: 100%; width: 100%;\">\n<tbody>\n<tr style=\"height: 38px;\">\n<td style=\"width: 526.017px; height: 38px;\">SetupHardware-button<\/p>\n<p>Start out by pressing the \u201cSetup Hardware button\u201d (shown right).<\/td>\n<td style=\"width: 110.983px; height: 54.2833px;\" rowspan=\"2\"><img decoding=\"async\" class=\"wp-image-2459 aligncenter\" src=\"http:\/\/aceautomation.eu\/wp-content\/uploads\/SetupHardware-button.png\" alt=\"SetupHardware-button\" width=\"89\" height=\"91\" \/><\/p>\n<p>&nbsp;<\/td>\n<\/tr>\n<tr style=\"height: 16.2833px;\">\n<td style=\"width: 526.017px; height: 16.2833px;\">After selecting your hardware, you\u2019ll make it to the Motion Setup page (shown below).\u00a0 You will assign digital outputs to up to 3 stepper motors.\u00a0 Each Motor requires a Step and Direction Pin.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3451\" src=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-hardware-setup1.png\" alt=\"\" width=\"767\" height=\"303\" srcset=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-hardware-setup1.png 767w, https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-hardware-setup1-300x119.png 300w, https:\/\/aceautomation.eu\/wp-content\/uploads\/stepper-hardware-setup1-600x237.png 600w\" sizes=\"(max-width: 767px) 100vw, 767px\" \/><\/p>\n<table style=\"height: 100%;\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"width: 319.5px;\">Once you\u2019ve configured your project for at least 1 Stepper Output, you\u2019ll be able to use the Motion Out function. \u00a0In it you assign which motor to use, then tell it to Stop or Move. \u00a0You\u2019ll tell it:<\/p>\n<ul>\n<li>where to move to,<\/li>\n<li>what rate to move at and<\/li>\n<li>what Tag to store the current location at<\/li>\n<li>Optionally, you can also assign a soft start\/stop length, telling it how long to take to reach the speed you specified in \u201crate\u201d field or to stop.<\/li>\n<\/ul>\n<p>To control you\u2019re motion, you\u2019ll need 1 more tool: a compare decision block (shown below)<\/td>\n<td style=\"width: 319.5px;\"><img decoding=\"async\" class=\"size-full wp-image-17688 aligncenter\" src=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/motion-out-function1.png\" alt=\"\" width=\"515\" height=\"390\" srcset=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/motion-out-function1.png 515w, https:\/\/aceautomation.eu\/wp-content\/uploads\/motion-out-function1-300x227.png 300w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"height: 100%;\" width=\"100%\">\n<tbody>\n<tr>\n<td style=\"width: 326px;\"><img decoding=\"async\" class=\"alignnone size-full wp-image-17693 aligncenter\" src=\"https:\/\/aceautomation.eu\/wp-content\/uploads\/motion-compare1.png\" alt=\"\" width=\"159\" height=\"96\" \/><\/td>\n<td style=\"width: 326px;\">You\u2019ll compare your \u201cstore current location\u201d Tag to your \u201cMove motor to\u201d value (or Tag). \u00a0When they are equal, you\u2019ll know that your motion is complete.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-family: arial,helvetica,sans-serif; font-size: 14pt;\">Stepper Motor Programming Example<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/BXY5XYftFpQ?feature=oembed\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<p>Here are the files used in this example : <a href=\"http:\/\/velocio.net\/wp-content\/uploads\/2016\/01\/stepper_example.zip\">stepper_example.zip<\/a>\u00a0 To use, save file. \u00a0Unzip files keeping them \u00a0in a folder together. \u00a0Open the .vio file inside of vBuilder.<\/p>\n<p>This example is setup like a state machine. \u00a0If this is a new concept to you, please check out our State machine and other tutorials on our Support page<\/p>\n<p>In this example, we tell the Stepper Motor to move a motor. \u00a0The program waits for a digital input to turn ON, then starts a sequence of movements. \u00a0The Motor will move:<\/p>\n<ul>\n<li>to location 200<\/li>\n<li>to location 0<\/li>\n<li>to location 400<\/li>\n<li>to location 0<\/li>\n<li>to location 600<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Stepper Motors are continuous rotation motors. These motors have a defined number of steps per rotation. You control position and speed by telling the motor when to step and in which direction . The number of wires differ, but control done by sending step and direction signals. If you use stepper motors within their limits, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-7470","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/pages\/7470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/comments?post=7470"}],"version-history":[{"count":2,"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/pages\/7470\/revisions"}],"predecessor-version":[{"id":17704,"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/pages\/7470\/revisions\/17704"}],"wp:attachment":[{"href":"https:\/\/aceautomation.eu\/it\/wp-json\/wp\/v2\/media?parent=7470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}