Você está na página 1de 6

DESIGN ENGINEERING CORE LAB 2 (ME5911)

EXPERIMENT 3 Control of Stepper Motor through DAQ System

Bimal Purohit Milind Talele Yagnik Kalariya Mayur Kothari

(ME13M1005) (ME13M1008) (ME13M1009) (ME13M1011)

Samukham Surya (ME13M1012)

AIM : Study of Stepper Motor control with the help of DAQ System and LabVIEW software Objective : Control LEDs and Stepper motor using DAQ system APPARATUS : Computer system with LabVIEW software Stepper Motor Bread board LEDs Multiple power supply unit Connecting wires DAQ system SCB-68 connector

THEORY : Stepper Motor DC brush motors rotate continuously when voltage is applied to their terminals. Stepper motors, on the other hand, effectively have multiple "toothed" electromagnets arranged around a central gear-shaped piece of iron. The electromagnets are energized by an external control circuit, such as a microcontroller. To make the motor shaft turn, first, one electromagnet is given power, which magnetically attracts the gear's teeth. When the gear's teeth are aligned to the first electromagnet, they are slightly offset from the next electromagnet. So when the next electromagnet is turned on and the first is turned off, the gear rotates slightly to align with the next one, and from there the process is repeated. Each of those rotations is called a "step", with an integer number of steps making a full rotation. In that way, the motor can be turned by a precise angle.

LabVIEW Software : LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a graphical programming platform that helps to scale from design to test and from small to large systems. It offers unprecedented integration with existing legacy software, IP, and hardware while capitalizing on the latest computing technologies. It is a system-design platform and development environment for a visual programming language from National Instruments. The programming language used in LabVIEW, also referred to as G, is a dataflow programming language. Execution is determined by the structure of a graphical block diagram (the LabVIEW-source code) on which the programmer connects different function-nodes by drawing wires. These wires propagate variables and any node can execute as soon as all its input data become available. Since this might be the case for multiple nodes simultaneously, G is inherently capable of parallel execution. Multiprocessing and multi-threading hardware is automatically exploited by the built-in scheduler, which multiplexes multiple OS threads over the nodes ready for executions.

DAQ System :

Data acquisition (DAQ) is the process of measuring an electrical or physical phenomenon such as voltage, current, temperature, pressure, or sound with a computer. A DAQ system consists of sensors, DAQ measurement hardware, and a computer with programmable software. Compared to traditional measurement systems, PC-based DAQ systems exploit the processing power, productivity, display, and connectivity capabilities of industry-standard computers providing a more powerful, flexible, and cost-effective measurement solution.

Procedure : Open a new project in LabVIEW. Create an array in panel diagram window (Controls Classic Array, matrix and cluster Array) Put a toggle switch in this array then make array of four switches In similar manner make other three arrays of toggle switches Make an array of same size of round LED Make sure that all switches / LEDs are activated by switching on the last one in each array Create a while loop in block diagram window (Express Execution control While loop) Create a new case structure (Express Execution control Case structure) Create cases 0,1,2 and 3 by right clicking at the arrow of the case structure window and click on add case before or after Delete the true and false cases by right at the arrow of the case structure window and click on delete this case. Keep the case -0 drag the array1 into the case structure block. Keep the case -1 drag the array2 into the case structure block. Do the same for case-2 and case-3 In the while loop at the left corner a symbol i which indicates the iteration number is seen. Right click on the symbol and click on create indicator to display the iteration number in the front panel. If the iteration speed is very high then it can be slowed by wait function Create wait function (Block diagram Programming Timing Wait (ms) ) Right click on the left side of the Wait create constant and give the time in ms. We have to give logic so that LEDs glow alternatively Create quotient and remainder function (Block diagram Programming Numeric Quotient & remainder) Make the connections for the function as shown in the figure below Connect the output (LEDS) to each case.\ Make any case as default to prevent error. Make switch arrangement as shown in figures. Right click on the block diagram Input DAQ Assistant Double click on DAQ assistant Go to generate signal Digital output Line output Ni-PXI-6229 Select the number of ports needed (for stepper motor 4 ports needed). Choose port0/line0, port0/line1, port0/line2, port0/line3. Find the corresponding number for P00,P01,P02,P03 on the DAQ board by Windows open NI-MAX devices and interfaces PXI-1042 chassis Ni-PXI6229 right click and click on Device Pinouts

Port P00 P01 P02 P03 Digital Ground

Port Number 52 17 49 47 50

Connect the corresponding terminals of DAQ board (here 52, 17, 49 and 47 in the same order) to the corresponding lights on the bread board through resisters. Now click finish on the window where ports were chosen. The DAQ Assistant window will appear and see the digital output s from 0 to 3. Click on them to check whether the lights were connected properly to the DAQ board or not.

First click run on DAQ assistant and then clicking on the first output, first light in the series of lights should glow and similarly for other outputs. Then close DAQ assistant Go to LabVIEW and click connect the output of the lights to DAQ and click run. For stepper motor, connect it to

Você também pode gostar