SlideShare a Scribd company logo
QNET-010: DCMCT
Quanser Engineering Trainer
for NI-ELVIS
QNET DC Motor Control Trainer
Demo Guide
QNET-DCMCT Demo Guide
Table of Contents
1. INTRODUCTION..........................................................................................................................................1
2. DEMO OUTLINE........................................................................................................................................1
3. PREREQUISITES.........................................................................................................................................2
4. SETTING UP A QNET...............................................................................................................................2
5. DEMOS.....................................................................................................................................................3
5.1. Read Tachometer..............................................................................................................................3
5.1.1. Create Simulation Loop.........................................................................................................................3
5.1.2. Configure Simulation Parameters...........................................................................................................4
5.1.3. Setup to Read DC Motor Speed.............................................................................................................5
5.1.4. Read DC Motor Speed...........................................................................................................................6
5.2. Running DC Motor in Open-Loop....................................................................................................8
5.2.1. Feeding Voltage to Motor......................................................................................................................8
5.2.2. Run Open-Loop......................................................................................................................................9
5.3. Proportional Speed Control............................................................................................................10
5.3.1. Build Proportional Controller...............................................................................................................10
5.3.2. Running Proportional Speed Control...................................................................................................12
5.4. Proportional-Integral Speed Control...............................................................................................13
5.4.1. Build PI Control...................................................................................................................................13
5.4.2. Running PI Speed Control....................................................................................................................14
5.5. Using DAQmx Drivers...................................................................................................................15
5.5.1. Convert Analog Input Express VIs to DAQmx....................................................................................15
5.5.2. Convert Analog Output Express VIs to DAQmx.................................................................................17
5.5.3. DAQmx Configuration.........................................................................................................................19
Revision 1.1 ♦ Page i
QNET-DCMCT Demo Guide
1. Introduction
This manual outlines some procedures to demo the QNET DC Motor Control Trainer, shown in Figure
1, using LabVIEW. The DC Motor Control Trainer is used to teach motion control concepts such as
modeling and PID control.
Figure 1: QNET-DCMCT
2. Demo Outline
There are four demos:
● Demo 1: Read tachometer by moving around inertial wheel on DC motor.
● Demo 2: Run DC motor in open-loop, i.e. output voltage to motor and read speed from
tachometer.
● Demo 3: Build simple proportional compensator to control the motor speed.
● Demo 4: Build a proportional-integral compensator to control the motor speed.
● Demo 5 (optional): Convert Express VIs to DAQmx.
They introduce the following to the audience:
● Adding Simulation Loop.
● Configuring the simulation parameters.
● Basic Simulation Module blocks: Simulation Time Waveform, Summation, and Gain blocks.
● Express VI: These are used to output voltage to the amplifier and read from the tachometer
sensor.
Revision 1.1 ♦ Page 1
QNET-DCMCT Demo Guide
● LabVIEW front panel objects, e.g. knobs.
● Introduces DAQmx.
3. Prerequisites
In order to successfully carry out the demo you need the following equipment and software installed:
✔ PC equipped with an NI-ELVIS II
✔ QNET DC Motor Control Trainer
✔ LabVIEW 8.2.1, or later, with the following add-ons:
✔ DAQmx
✔ Express
✔ Control Design and Simulation Module
✔ ELVISmx
4. Setting up a QNET
One of the benefits of the QNET boards is its modularity. As depicted in Figure 2, any of these boards
can easily be connected to the NI ELVIS II system and give the student a new type of plant to work
with in minutes.
Figure 2: Modularity of QNETs.
Revision 1.1 ♦ Page 2
QNET-DCMCT Demo Guide
Follow these instructions to setup a QNET on an ELVIS II:
1. Make sure the NI ELVIS II is powered OFF.
2. Place the small opening on the front of the QNET over the mounting bracket on the front of the
NI ELVIS II workstation.
3. Slide the PCI connector of the QNET module end into the female connector on the NI ELVIS II.
Make sure it is connected properly.
4. Connect the ELVIS II power cable.
5. Connect the supplied QNET transformer to the bulk power jack on the QNET module.
Note: Not required for the QNET mechatronic sensors trainer.
6. Power the NI ELVIS II by turning ON the System Switch on the rear panel.
7. Turn ON the Prototyping Board Power switch.
CAUTION: Turn OFF the Prototyping Board Power switch if
(1) On the QNET-DCMCT, QNET-ROTPENT, or QNET-VTOL Trainer the DC motor
begins to turn, or
(2) On the QNET-HVACT the halogen light turns on brightly.
Take extra care when powering the QNET module to avoid causing any damage!
8. The Power and Ready LEDs of the NI ELVIS II unit should be lit.
9. Verify that the +15V,-15V, +5V, and +B LEDs on the QNET module are lit. They indicate that
the board has been properly connected to the ELVIS II unit.
Note: On the QNET Mechatronic Sensors and Myoelectric trainers, ensure the +15V,-15V, and
+5V LEDs are lit (no +B).
5. Demos
5.1. Read Tachometer
Demonstrates how to read from the tachometer by manually moving the inertial disc load mounted on
the QNET DC Motor.
5.1.1. Create Simulation Loop
The Simulation loop makes it easy to design and run simulations as well as control external hardware,
e.g. DC motor.
1. Open blank VI in LabVIEW.
2. Create a Simulation Loop in the block diagram, as shown in Figure 3.
Revision 1.1 ♦ Page 3
QNET-DCMCT Demo Guide
Figure 3: Simulation loop in block diagram.
5.1.2. Configure Simulation Parameters
We want to setup a simulation to run continuously at 100 Hz.
1. Access dialog box shown in Figure 4 by double-clicking the Input Node or by right-clicking the
border and selecting the Configure Simulation Parameters item from the shortcut menu.
Revision 1.1 ♦ Page 4
QNET-DCMCT Demo Guide
Figure 4: Configure simulation parameters.
2. Setup the Simulation Parameters as follows:
Final Time (s): Inf
ODE Solver: Runge-Kutta 1 (Euler)
Step Size (s): 0.01
3. Click on OK.
5.1.3. Setup to Read DC Motor Speed
Use the DAQ Assistant Express VI to read the QNET DC Motor tachometer. The tachometer is
connected to Analog Input Channel #4. Since we’re eventually doing control, we want to be reading
one sample of data for each Simulation loop iteration (i.e. On Demand).
Revision 1.1 ♦ Page 5
QNET-DCMCT Demo Guide
Remark: The QNET DC Motor has a digital tachometer. Its a on-board circuit that computes the
velocity from the encoder signals.
1. Go to Express  Input category and add DAQ Assist to the block diagram.
2. Select Acquire Signal  Analog Input  Voltage.
3. Choose ELVIS II Device  ai4.
4. As shown in Figure 5, setup with the following settings:
Acquisition Mode: 1 Sample (On Demand)
Figure 5: Configuring analog input channel in DAQ Assistant.
5.1.4. Read DC Motor Speed
Read the speed of the DC Motor in a chart.
1. Go to Graph Utilities and add a Simulation Time Waveform to the block diagram.
2. Connect output of DAQ Assistant to SimTime Waveform buffer, as shown in Figure 6.
Revision 1.1 ♦ Page 6
QNET-DCMCT Demo Guide
Figure 6: Add Simulation Time Waveform to block diagram.
3. Go to the front panel and show the Waveform Chart.
4. Change the time scale to [0,2].
5. Run the VI.
6. Move the inertial load back and forth. You should obtain a reading similarly as show in Figure
7.
Figure 7: Tachometer response when moving DC motor load back and forth.
Remark: This is the raw voltage from the tachometer. The voltage signal is proportional to the
speed of the motor shaft. To get the actual speed, use the calibration gain 2987 RPM/V.
Revision 1.1 ♦ Page 7
QNET-DCMCT Demo Guide
5.2. Running DC Motor in Open-Loop
Shows how to drive the motor while reading the corresponding motor speed.
5.2.1. Feeding Voltage to Motor
Using the DAQ Assistant Express VI to drive the QNET DC Motor. The motor is connected to Analog
Output Channel #0.
Add DAQ Assistant Express VI and setup with following settings:
1. Go to Express  Input menu and add DAQ Assist to the block diagram.
2. Select Generate Signal  Analog Input  Voltage.
3. Choose ELVIS II Device  ao0
4. As shown in Figure 8, configure the channel with the following:
Generation Mode: 1 Sample (On Demand)
Figure 8: Configuring analog output channel in DAQ Assistant.
Revision 1.1 ♦ Page 8
QNET-DCMCT Demo Guide
5.2.2. Run Open-Loop
Apply a voltage to the motor and observe the resulting speed response.
1. Add a Vertical Pointer Slide control called Input Voltage to the front panel and adjust its scale
from 0 to 2.
2. Wire the slider control to the data terminal of the DAQ Assistant block, as illustrated in Figure
9.
Figure 9: Block diagram setup for running DC motor in open-loop.
CAUTION: If you are using QNET-DCMCT rev 1, then add a -ve between the Input Voltage
control and the DAQ Assistant block. This ensures you read a positive speed when giving a
positive voltage.
3. Set the y-axis in the Waveform Chart to a fixed range of 0 to 0.5. Right-click on the y-axis of
the chart and ensure AutoScale Y is not selected.
4. Run the VI.
5. Adjust the slider control between 0 and 2 to vary the amount of voltage fed to the DC motor and
observe how the measured speed changes. A typical response is shown Figure 10.
CAUTION: Do not exceed +/-2V. This voltage is amplified by 2.3 V/V by the linear amplifier.
Remark: You need at least 1.0 V for the rotor to begin turning due to the friction from the
brushes. This demonstrates a common nonlinear phenomenon, i.e. deadband, that is seen in real
devices.
Revision 1.1 ♦ Page 9
QNET-DCMCT Demo Guide
Figure 10: Front panel when running DCMCT in open-loop.
6. Set the slider to 0 and stop the VI.
Remark: Make sure the input voltage is set to 0 before stopping the VI. Otherwise the DC
motor will continue spinning. The Express VI does not automatically reset the motor voltage to
zero when the VI terminates.
5.3. Proportional Speed Control
Design a simple proportional controller to regulate the speed of the DC motor.
5.3.1. Build Proportional Controller
Build the block diagram shown in Figure 12, as summarized by the steps below:
1. Add a Summation block from the Control Design and Simulation  Simulation category.
2. Rename input voltage slider control to setpoint.
3. Connect the setpoint control to the +ve terminal of the Summation block.
4. Connect the tachometer signal to the –ve terminal of the Summation block. This is the
feedback signal.
5. Add a Gain block.
Hint: For faster access to the Gain block, right-click on the Summation block and go to the
Signal Arithmetic Palette item in the shortcut menu.
6. Double-click on the Gain block and set the Parameter source to Terminal, as pictured in Figure
11.
Revision 1.1 ♦ Page 10
QNET-DCMCT Demo Guide
Figure 11: Configure gain to be changed externally.
7. Right-click on the terminal input of Gain and create a Numeric Control called kp.
8. Wire output of Summation to Gain block.
9. Connect output of Gain block to DC motor output.
Figure 12: Block diagram to run DC motor proportional speed control.
Revision 1.1 ♦ Page 11
QNET-DCMCT Demo Guide
5.3.2. Running Proportional Speed Control
This shows basic speed control response. Since this is a Type 0 system, there is steady-state error.
Increasing the proportional gain improves the error but we need an integrator to solve the problem.
1. As shown in Figure 13, in the front panel add a digital display to the existing setpoint slider
control.
Hint: Right-click on the Vertical Pointer Slide control and select Digital Display under
Visible Items.
2. Set the scale of the setpoint pointer slide control from 0 to 4.
3. Change the y-scale of chart from 0 to 1.
4. Run VI.
5. Vary the setpoint control and examine how the speed changes.
6. Set the setpoint to 1 and slowly increase the proportional gain, kp, to 10. As illustrated in Figure
13, examine how the measured speed approaches 0.5 as the gain is increased. However, there is
still steady-state error.
Figure 13: DC motor speed control.
7. Set the setpoint control to 0 and stop the VI.
Revision 1.1 ♦ Page 12
QNET-DCMCT Demo Guide
5.4. Proportional-Integral Speed
Control
Design a proportional-integral (PI) compensator to remove the steady-state error.
5.4.1. Build PI Control
Build the block diagram shown in Figure 15, as summarized by the following steps:
1. Add another Gain block.
Hint: Click-and-drag the existing Gain block, hold the CTRL key, and drop the copied Gain
block.
2. Right-click on the terminal input of the new Gain and create a Numeric Control called ki. This
the integrator Gain block.
3. Connect the error to the input of the integrator Gain.
4. Add an Integrator block from the Control Design and Simulation  Simulation  Continuous
Linear Systems menu.
5. Wire the output of the integral Gain to the input of the Integrator block.
6. Add another Summation block.
Hint: Right-click on existing Summation block, hold the CTRL key, and drop the copied
Summation block.
7. Double-click on the Summation block that was just added and change the “-ve” sign to a “+ve”
sign, as shown in Figure 14.
Figure 14: Configure summation block.
8. Connect the output of both Gain blocks to the two +ve terminals of the Summation.
9. Wire output of Summation block to DC motor output.
Revision 1.1 ♦ Page 13
QNET-DCMCT Demo Guide
Figure 15: Block diagram to run the PI DC motor speed control.
5.4.2. Running PI Speed Control
See the effects of adding integral action to the control. This guarantees that the measure speed gets to
the desired setpoint, i.e. removes steady-state error that was observed when using the proportional
control.
1. Run VI.
2. Set the setpoint control to 0.5.
CAUTION: Make sure the setpoint does not surpass +/- 1.
3. Set the integral gain, ki, to 10. The measured speed should reach the setpoint of 0.5, as
illustrated in Figure 16.
Revision 1.1 ♦ Page 14
QNET-DCMCT Demo Guide
Figure 16: Running PI speed control.
4. Set the setpoint to 0.
5. When the motor stops spinning, stop the VI.
5.5. Using DAQmx Drivers
Introduce DAQmx by converting the Express VIs to DAQmx code.
5.5.1. Convert Analog Input Express VIs to DAQmx
Convert the Analog Input Express VI to an DAQmx based VIs.
1. Right-click on the analog input DAQ Assistant block and select Generate NI-DAQmx Code.
Revision 1.1 ♦ Page 15
QNET-DCMCT Demo Guide
Figure 17: Generating DAQmx code from an Express VI.
2. This will add a DAQmx Read VI and a sub-VI that configures the analog input channel, as
illustrated in Figure 18.
Figure 18: Generated analog input DAQmx code.
3. In the Simulation Loop, we only need to read a single point of data in each iteration. Set the
DAQmx Read VI to Analog  Single Channel  Single Sample  DBL.
4. Place the configuration VI outside the Simulation loop, as shown in Figure 19.
Revision 1.1 ♦ Page 16
QNET-DCMCT Demo Guide
Figure 19: Setup AI DAQmx code.
5. Connect the task out of the configuration VI to the task/channels in of the DAQmx Read, as
shown in Figure 19.
6. Remove the data indicator and connect the data output terminal on the Analog DBL output to
the Waveform Chart, as illustrated in Figure 19 above.
7. Run the VI and the response should be similarly as shown in Figure 16, above.
5.5.2. Convert Analog Output Express VIs to DAQmx
Convert the Analog Output Express VI to DAQmx drivers.
1. Right-click on the analog output block, DAQ Assistant3, and select Generate NI DAQmx Code.
2. We don't need to use the special waveform timing. Click on OK on the message shown in
Figure 20.
Figure 20: Waveform Timing
3. This will add a DAQmx Write VI and a sub-VI that configures the analog output channel.
Revision 1.1 ♦ Page 17
QNET-DCMCT Demo Guide
Figure 21: Generated analog write DAQmx code.
4. In the Simulation Loop, we are only writing a single point of data in each iteration. Set the
DAQmx Write VI to Analog  Single Channel  Single Sample  DBL.
5. Place the configuration VI outside the Simulation loop, as shown in Figure 22.
Figure 22: Block diagram of speed controller using DAQmx.
6. Remove the signal generator block (not needed because of Simulation loop).
Revision 1.1 ♦ Page 18
QNET-DCMCT Demo Guide
7. Clean up the excess wiring by pressing the CTRL-B.
8. Wire the output of the PI controller, i.e. the Summation block, to the data terminal on the
DAQmx Write VI.
9. Connect the task out terminal from the analog output configuration VI to the task/channels in
terminal of the DAQmx Write VI, as shown in Figure 22.
10. Run the VI and the response should be similarly as shown in Figure 16, above.
5.5.3. DAQmx Configuration
Introduce how to configure analog input and output channels using DAQmx.
1. The block diagram of the analog input sub-VI is pictured in Figure 23. It features all the settings
that were chosen when setting up the Express VI to read the tachometer.
Figure 23: Configuring QNET analog input channel.
2. Similarly for the analog output channel, shown in Figure 24.
Revision 1.1 ♦ Page 19
QNET-DCMCT Demo Guide
3. Figure 24: Configuring QNET analog output channel.
Revision 1.1 ♦ Page 20

More Related Content

What's hot

Embedded system introduction - Arduino Course
Embedded system introduction - Arduino CourseEmbedded system introduction - Arduino Course
Embedded system introduction - Arduino Course
Elaf A.Saeed
 
Tutorial básico logix pro
Tutorial básico   logix proTutorial básico   logix pro
Tutorial básico logix pro
Angel Santos Santos
 
report of power electronics
report of power electronicsreport of power electronics
report of power electronics
Mohamad Nur Afham Shamsudin
 
Advanced techniques of PULSE WIDTH MODULATION.
Advanced techniques of PULSE WIDTH MODULATION.Advanced techniques of PULSE WIDTH MODULATION.
Advanced techniques of PULSE WIDTH MODULATION.
Subashini Puchalapalli
 
Sinamics g120 treinamento (en)
Sinamics g120 treinamento (en)Sinamics g120 treinamento (en)
Sinamics g120 treinamento (en)
Rodrigo de Castro Sarto
 
three phase pure sine wave inverter
three phase pure sine wave inverterthree phase pure sine wave inverter
three phase pure sine wave inverter
ASAD ULLAH ABBAS
 
Arduino
ArduinoArduino
Arduino
Jerin John
 
Generator capability curve
Generator capability curveGenerator capability curve
Generator capability curveAmit Pathak
 
143428387 modul-pelatihan-plc-doc
143428387 modul-pelatihan-plc-doc143428387 modul-pelatihan-plc-doc
143428387 modul-pelatihan-plc-doc
hendra firdaus
 
Smooth start of a single phase induction motor
Smooth start of a single phase induction motorSmooth start of a single phase induction motor
Smooth start of a single phase induction motor
Edgefxkits & Solutions
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
Vishnu
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
Makers of India
 
Electrical Classic Control (Basics)
Electrical Classic Control (Basics)Electrical Classic Control (Basics)
Electrical Classic Control (Basics)
AHMED MOHAMED HEGAB
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLC
Mehvish Mushtaq
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
Betsy Eng
 
EPLAN - Siemens
EPLAN - SiemensEPLAN - Siemens
EPLAN - Siemens
EPLAN Belgium
 
Control Fan AC With LM-35 Sensor Based Arduino
Control Fan AC With LM-35 Sensor Based Arduino Control Fan AC With LM-35 Sensor Based Arduino
Control Fan AC With LM-35 Sensor Based Arduino
Anjar setiawan
 

What's hot (20)

Embedded system introduction - Arduino Course
Embedded system introduction - Arduino CourseEmbedded system introduction - Arduino Course
Embedded system introduction - Arduino Course
 
Tutorial básico logix pro
Tutorial básico   logix proTutorial básico   logix pro
Tutorial básico logix pro
 
report of power electronics
report of power electronicsreport of power electronics
report of power electronics
 
Advanced techniques of PULSE WIDTH MODULATION.
Advanced techniques of PULSE WIDTH MODULATION.Advanced techniques of PULSE WIDTH MODULATION.
Advanced techniques of PULSE WIDTH MODULATION.
 
Catalogue mitsubishi thiet bi dien acb
Catalogue mitsubishi thiet bi dien acbCatalogue mitsubishi thiet bi dien acb
Catalogue mitsubishi thiet bi dien acb
 
Sinamics g120 treinamento (en)
Sinamics g120 treinamento (en)Sinamics g120 treinamento (en)
Sinamics g120 treinamento (en)
 
three phase pure sine wave inverter
three phase pure sine wave inverterthree phase pure sine wave inverter
three phase pure sine wave inverter
 
Arduino
ArduinoArduino
Arduino
 
Generator capability curve
Generator capability curveGenerator capability curve
Generator capability curve
 
Smart Steps Presentation
Smart Steps Presentation Smart Steps Presentation
Smart Steps Presentation
 
143428387 modul-pelatihan-plc-doc
143428387 modul-pelatihan-plc-doc143428387 modul-pelatihan-plc-doc
143428387 modul-pelatihan-plc-doc
 
Smooth start of a single phase induction motor
Smooth start of a single phase induction motorSmooth start of a single phase induction motor
Smooth start of a single phase induction motor
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
 
Electrical Classic Control (Basics)
Electrical Classic Control (Basics)Electrical Classic Control (Basics)
Electrical Classic Control (Basics)
 
INDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLCINDUSTRIAL AUTOMATION USING PLC
INDUSTRIAL AUTOMATION USING PLC
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
 
EPLAN - Siemens
EPLAN - SiemensEPLAN - Siemens
EPLAN - Siemens
 
Control Fan AC With LM-35 Sensor Based Arduino
Control Fan AC With LM-35 Sensor Based Arduino Control Fan AC With LM-35 Sensor Based Arduino
Control Fan AC With LM-35 Sensor Based Arduino
 
Group 4
Group 4Group 4
Group 4
 

Similar to Qnet dc motor control demo guide

Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
Sambasiva62
 
Applied motion products txm24 c brochure
Applied motion products txm24 c brochureApplied motion products txm24 c brochure
Applied motion products txm24 c brochure
Electromate
 
En mtac 01_um_b
En mtac 01_um_bEn mtac 01_um_b
En mtac 01_um_b
Raziel Negro
 
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
Edward Setec
 
Electric_Drives_FinalProj
Electric_Drives_FinalProjElectric_Drives_FinalProj
Electric_Drives_FinalProjSpencer Minder
 
EEP301: Ca06 sample
EEP301: Ca06 sampleEEP301: Ca06 sample
EEP301: Ca06 sample
Umang Gupta
 
IRJET- PLC based Washing Machine
IRJET- PLC based Washing MachineIRJET- PLC based Washing Machine
IRJET- PLC based Washing Machine
IRJET Journal
 
Plc & Scada report 3
Plc & Scada report 3Plc & Scada report 3
Plc & Scada report 3
Lakshminarayan Solanki
 
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLERFOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
Journal For Research
 
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
Basic PLC Programming program The Fundamental Knowledge of PLC.pdfBasic PLC Programming program The Fundamental Knowledge of PLC.pdf
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
LuisDavidCajavilcaCu1
 
Stepper Motor Control System
Stepper Motor Control SystemStepper Motor Control System
Stepper Motor Control System
Wanita Long
 
DigSILENT PF - 06 irena additional exercises
DigSILENT PF - 06 irena  additional exercisesDigSILENT PF - 06 irena  additional exercises
DigSILENT PF - 06 irena additional exercises
Himmelstern
 
Dc40 d mk3
Dc40 d mk3Dc40 d mk3
Dc40 d mk3
ELVISCULMAGALLEGO
 
Design and Implementation of an Electrical Lift Controlled using PLC
Design and Implementation of an Electrical Lift Controlled using PLC Design and Implementation of an Electrical Lift Controlled using PLC
Design and Implementation of an Electrical Lift Controlled using PLC
IJECEIAES
 
Time Controlled DC Power Supply Using 555 Timer
Time Controlled DC Power Supply Using 555 TimerTime Controlled DC Power Supply Using 555 Timer
Time Controlled DC Power Supply Using 555 Timer
IRJET Journal
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_ReportVansh Kumar
 
Abb technical guide book en rev_g
Abb technical guide book en rev_gAbb technical guide book en rev_g
Abb technical guide book en rev_g
Cesar Enrique Gutierrez Candia
 
Basic plc-programming-e book_Reliance High Tech Ltd
Basic plc-programming-e book_Reliance High Tech LtdBasic plc-programming-e book_Reliance High Tech Ltd
Basic plc-programming-e book_Reliance High Tech Ltd
Marsus Marsus
 
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docxExercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
nealwaters20034
 

Similar to Qnet dc motor control demo guide (20)

Unit-III.pptx
Unit-III.pptxUnit-III.pptx
Unit-III.pptx
 
Applied motion products txm24 c brochure
Applied motion products txm24 c brochureApplied motion products txm24 c brochure
Applied motion products txm24 c brochure
 
En mtac 01_um_b
En mtac 01_um_bEn mtac 01_um_b
En mtac 01_um_b
 
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
Set48 220 1 klc user manual, High frequency DC 48v to AC 220v inverter for Te...
 
Electric_Drives_FinalProj
Electric_Drives_FinalProjElectric_Drives_FinalProj
Electric_Drives_FinalProj
 
EEP301: Ca06 sample
EEP301: Ca06 sampleEEP301: Ca06 sample
EEP301: Ca06 sample
 
IRJET- PLC based Washing Machine
IRJET- PLC based Washing MachineIRJET- PLC based Washing Machine
IRJET- PLC based Washing Machine
 
Plc & Scada report 3
Plc & Scada report 3Plc & Scada report 3
Plc & Scada report 3
 
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLERFOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
FOUR QUADRANT SPEED CONTROL OF DC MOTOR USING AT89S52 MICROCONTROLLER
 
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
Basic PLC Programming program The Fundamental Knowledge of PLC.pdfBasic PLC Programming program The Fundamental Knowledge of PLC.pdf
Basic PLC Programming program The Fundamental Knowledge of PLC.pdf
 
Stepper Motor Control System
Stepper Motor Control SystemStepper Motor Control System
Stepper Motor Control System
 
DigSILENT PF - 06 irena additional exercises
DigSILENT PF - 06 irena  additional exercisesDigSILENT PF - 06 irena  additional exercises
DigSILENT PF - 06 irena additional exercises
 
Dc40 d mk3
Dc40 d mk3Dc40 d mk3
Dc40 d mk3
 
Design and Implementation of an Electrical Lift Controlled using PLC
Design and Implementation of an Electrical Lift Controlled using PLC Design and Implementation of an Electrical Lift Controlled using PLC
Design and Implementation of an Electrical Lift Controlled using PLC
 
Time Controlled DC Power Supply Using 555 Timer
Time Controlled DC Power Supply Using 555 TimerTime Controlled DC Power Supply Using 555 Timer
Time Controlled DC Power Supply Using 555 Timer
 
Minor_Project_Report
Minor_Project_ReportMinor_Project_Report
Minor_Project_Report
 
Abb technical guide book en rev_g
Abb technical guide book en rev_gAbb technical guide book en rev_g
Abb technical guide book en rev_g
 
Basic plc-programming-e book_Reliance High Tech Ltd
Basic plc-programming-e book_Reliance High Tech LtdBasic plc-programming-e book_Reliance High Tech Ltd
Basic plc-programming-e book_Reliance High Tech Ltd
 
Basic plc-programming
Basic plc-programmingBasic plc-programming
Basic plc-programming
 
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docxExercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
Exercise 1 – DOL Starters and Soft Starters  Procedure Outlin.docx
 

Recently uploaded

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 

Qnet dc motor control demo guide

  • 1. QNET-010: DCMCT Quanser Engineering Trainer for NI-ELVIS QNET DC Motor Control Trainer Demo Guide
  • 2. QNET-DCMCT Demo Guide Table of Contents 1. INTRODUCTION..........................................................................................................................................1 2. DEMO OUTLINE........................................................................................................................................1 3. PREREQUISITES.........................................................................................................................................2 4. SETTING UP A QNET...............................................................................................................................2 5. DEMOS.....................................................................................................................................................3 5.1. Read Tachometer..............................................................................................................................3 5.1.1. Create Simulation Loop.........................................................................................................................3 5.1.2. Configure Simulation Parameters...........................................................................................................4 5.1.3. Setup to Read DC Motor Speed.............................................................................................................5 5.1.4. Read DC Motor Speed...........................................................................................................................6 5.2. Running DC Motor in Open-Loop....................................................................................................8 5.2.1. Feeding Voltage to Motor......................................................................................................................8 5.2.2. Run Open-Loop......................................................................................................................................9 5.3. Proportional Speed Control............................................................................................................10 5.3.1. Build Proportional Controller...............................................................................................................10 5.3.2. Running Proportional Speed Control...................................................................................................12 5.4. Proportional-Integral Speed Control...............................................................................................13 5.4.1. Build PI Control...................................................................................................................................13 5.4.2. Running PI Speed Control....................................................................................................................14 5.5. Using DAQmx Drivers...................................................................................................................15 5.5.1. Convert Analog Input Express VIs to DAQmx....................................................................................15 5.5.2. Convert Analog Output Express VIs to DAQmx.................................................................................17 5.5.3. DAQmx Configuration.........................................................................................................................19 Revision 1.1 ♦ Page i
  • 3. QNET-DCMCT Demo Guide 1. Introduction This manual outlines some procedures to demo the QNET DC Motor Control Trainer, shown in Figure 1, using LabVIEW. The DC Motor Control Trainer is used to teach motion control concepts such as modeling and PID control. Figure 1: QNET-DCMCT 2. Demo Outline There are four demos: ● Demo 1: Read tachometer by moving around inertial wheel on DC motor. ● Demo 2: Run DC motor in open-loop, i.e. output voltage to motor and read speed from tachometer. ● Demo 3: Build simple proportional compensator to control the motor speed. ● Demo 4: Build a proportional-integral compensator to control the motor speed. ● Demo 5 (optional): Convert Express VIs to DAQmx. They introduce the following to the audience: ● Adding Simulation Loop. ● Configuring the simulation parameters. ● Basic Simulation Module blocks: Simulation Time Waveform, Summation, and Gain blocks. ● Express VI: These are used to output voltage to the amplifier and read from the tachometer sensor. Revision 1.1 ♦ Page 1
  • 4. QNET-DCMCT Demo Guide ● LabVIEW front panel objects, e.g. knobs. ● Introduces DAQmx. 3. Prerequisites In order to successfully carry out the demo you need the following equipment and software installed: ✔ PC equipped with an NI-ELVIS II ✔ QNET DC Motor Control Trainer ✔ LabVIEW 8.2.1, or later, with the following add-ons: ✔ DAQmx ✔ Express ✔ Control Design and Simulation Module ✔ ELVISmx 4. Setting up a QNET One of the benefits of the QNET boards is its modularity. As depicted in Figure 2, any of these boards can easily be connected to the NI ELVIS II system and give the student a new type of plant to work with in minutes. Figure 2: Modularity of QNETs. Revision 1.1 ♦ Page 2
  • 5. QNET-DCMCT Demo Guide Follow these instructions to setup a QNET on an ELVIS II: 1. Make sure the NI ELVIS II is powered OFF. 2. Place the small opening on the front of the QNET over the mounting bracket on the front of the NI ELVIS II workstation. 3. Slide the PCI connector of the QNET module end into the female connector on the NI ELVIS II. Make sure it is connected properly. 4. Connect the ELVIS II power cable. 5. Connect the supplied QNET transformer to the bulk power jack on the QNET module. Note: Not required for the QNET mechatronic sensors trainer. 6. Power the NI ELVIS II by turning ON the System Switch on the rear panel. 7. Turn ON the Prototyping Board Power switch. CAUTION: Turn OFF the Prototyping Board Power switch if (1) On the QNET-DCMCT, QNET-ROTPENT, or QNET-VTOL Trainer the DC motor begins to turn, or (2) On the QNET-HVACT the halogen light turns on brightly. Take extra care when powering the QNET module to avoid causing any damage! 8. The Power and Ready LEDs of the NI ELVIS II unit should be lit. 9. Verify that the +15V,-15V, +5V, and +B LEDs on the QNET module are lit. They indicate that the board has been properly connected to the ELVIS II unit. Note: On the QNET Mechatronic Sensors and Myoelectric trainers, ensure the +15V,-15V, and +5V LEDs are lit (no +B). 5. Demos 5.1. Read Tachometer Demonstrates how to read from the tachometer by manually moving the inertial disc load mounted on the QNET DC Motor. 5.1.1. Create Simulation Loop The Simulation loop makes it easy to design and run simulations as well as control external hardware, e.g. DC motor. 1. Open blank VI in LabVIEW. 2. Create a Simulation Loop in the block diagram, as shown in Figure 3. Revision 1.1 ♦ Page 3
  • 6. QNET-DCMCT Demo Guide Figure 3: Simulation loop in block diagram. 5.1.2. Configure Simulation Parameters We want to setup a simulation to run continuously at 100 Hz. 1. Access dialog box shown in Figure 4 by double-clicking the Input Node or by right-clicking the border and selecting the Configure Simulation Parameters item from the shortcut menu. Revision 1.1 ♦ Page 4
  • 7. QNET-DCMCT Demo Guide Figure 4: Configure simulation parameters. 2. Setup the Simulation Parameters as follows: Final Time (s): Inf ODE Solver: Runge-Kutta 1 (Euler) Step Size (s): 0.01 3. Click on OK. 5.1.3. Setup to Read DC Motor Speed Use the DAQ Assistant Express VI to read the QNET DC Motor tachometer. The tachometer is connected to Analog Input Channel #4. Since we’re eventually doing control, we want to be reading one sample of data for each Simulation loop iteration (i.e. On Demand). Revision 1.1 ♦ Page 5
  • 8. QNET-DCMCT Demo Guide Remark: The QNET DC Motor has a digital tachometer. Its a on-board circuit that computes the velocity from the encoder signals. 1. Go to Express Input category and add DAQ Assist to the block diagram. 2. Select Acquire Signal Analog Input Voltage. 3. Choose ELVIS II Device ai4. 4. As shown in Figure 5, setup with the following settings: Acquisition Mode: 1 Sample (On Demand) Figure 5: Configuring analog input channel in DAQ Assistant. 5.1.4. Read DC Motor Speed Read the speed of the DC Motor in a chart. 1. Go to Graph Utilities and add a Simulation Time Waveform to the block diagram. 2. Connect output of DAQ Assistant to SimTime Waveform buffer, as shown in Figure 6. Revision 1.1 ♦ Page 6
  • 9. QNET-DCMCT Demo Guide Figure 6: Add Simulation Time Waveform to block diagram. 3. Go to the front panel and show the Waveform Chart. 4. Change the time scale to [0,2]. 5. Run the VI. 6. Move the inertial load back and forth. You should obtain a reading similarly as show in Figure 7. Figure 7: Tachometer response when moving DC motor load back and forth. Remark: This is the raw voltage from the tachometer. The voltage signal is proportional to the speed of the motor shaft. To get the actual speed, use the calibration gain 2987 RPM/V. Revision 1.1 ♦ Page 7
  • 10. QNET-DCMCT Demo Guide 5.2. Running DC Motor in Open-Loop Shows how to drive the motor while reading the corresponding motor speed. 5.2.1. Feeding Voltage to Motor Using the DAQ Assistant Express VI to drive the QNET DC Motor. The motor is connected to Analog Output Channel #0. Add DAQ Assistant Express VI and setup with following settings: 1. Go to Express Input menu and add DAQ Assist to the block diagram. 2. Select Generate Signal Analog Input Voltage. 3. Choose ELVIS II Device ao0 4. As shown in Figure 8, configure the channel with the following: Generation Mode: 1 Sample (On Demand) Figure 8: Configuring analog output channel in DAQ Assistant. Revision 1.1 ♦ Page 8
  • 11. QNET-DCMCT Demo Guide 5.2.2. Run Open-Loop Apply a voltage to the motor and observe the resulting speed response. 1. Add a Vertical Pointer Slide control called Input Voltage to the front panel and adjust its scale from 0 to 2. 2. Wire the slider control to the data terminal of the DAQ Assistant block, as illustrated in Figure 9. Figure 9: Block diagram setup for running DC motor in open-loop. CAUTION: If you are using QNET-DCMCT rev 1, then add a -ve between the Input Voltage control and the DAQ Assistant block. This ensures you read a positive speed when giving a positive voltage. 3. Set the y-axis in the Waveform Chart to a fixed range of 0 to 0.5. Right-click on the y-axis of the chart and ensure AutoScale Y is not selected. 4. Run the VI. 5. Adjust the slider control between 0 and 2 to vary the amount of voltage fed to the DC motor and observe how the measured speed changes. A typical response is shown Figure 10. CAUTION: Do not exceed +/-2V. This voltage is amplified by 2.3 V/V by the linear amplifier. Remark: You need at least 1.0 V for the rotor to begin turning due to the friction from the brushes. This demonstrates a common nonlinear phenomenon, i.e. deadband, that is seen in real devices. Revision 1.1 ♦ Page 9
  • 12. QNET-DCMCT Demo Guide Figure 10: Front panel when running DCMCT in open-loop. 6. Set the slider to 0 and stop the VI. Remark: Make sure the input voltage is set to 0 before stopping the VI. Otherwise the DC motor will continue spinning. The Express VI does not automatically reset the motor voltage to zero when the VI terminates. 5.3. Proportional Speed Control Design a simple proportional controller to regulate the speed of the DC motor. 5.3.1. Build Proportional Controller Build the block diagram shown in Figure 12, as summarized by the steps below: 1. Add a Summation block from the Control Design and Simulation Simulation category. 2. Rename input voltage slider control to setpoint. 3. Connect the setpoint control to the +ve terminal of the Summation block. 4. Connect the tachometer signal to the –ve terminal of the Summation block. This is the feedback signal. 5. Add a Gain block. Hint: For faster access to the Gain block, right-click on the Summation block and go to the Signal Arithmetic Palette item in the shortcut menu. 6. Double-click on the Gain block and set the Parameter source to Terminal, as pictured in Figure 11. Revision 1.1 ♦ Page 10
  • 13. QNET-DCMCT Demo Guide Figure 11: Configure gain to be changed externally. 7. Right-click on the terminal input of Gain and create a Numeric Control called kp. 8. Wire output of Summation to Gain block. 9. Connect output of Gain block to DC motor output. Figure 12: Block diagram to run DC motor proportional speed control. Revision 1.1 ♦ Page 11
  • 14. QNET-DCMCT Demo Guide 5.3.2. Running Proportional Speed Control This shows basic speed control response. Since this is a Type 0 system, there is steady-state error. Increasing the proportional gain improves the error but we need an integrator to solve the problem. 1. As shown in Figure 13, in the front panel add a digital display to the existing setpoint slider control. Hint: Right-click on the Vertical Pointer Slide control and select Digital Display under Visible Items. 2. Set the scale of the setpoint pointer slide control from 0 to 4. 3. Change the y-scale of chart from 0 to 1. 4. Run VI. 5. Vary the setpoint control and examine how the speed changes. 6. Set the setpoint to 1 and slowly increase the proportional gain, kp, to 10. As illustrated in Figure 13, examine how the measured speed approaches 0.5 as the gain is increased. However, there is still steady-state error. Figure 13: DC motor speed control. 7. Set the setpoint control to 0 and stop the VI. Revision 1.1 ♦ Page 12
  • 15. QNET-DCMCT Demo Guide 5.4. Proportional-Integral Speed Control Design a proportional-integral (PI) compensator to remove the steady-state error. 5.4.1. Build PI Control Build the block diagram shown in Figure 15, as summarized by the following steps: 1. Add another Gain block. Hint: Click-and-drag the existing Gain block, hold the CTRL key, and drop the copied Gain block. 2. Right-click on the terminal input of the new Gain and create a Numeric Control called ki. This the integrator Gain block. 3. Connect the error to the input of the integrator Gain. 4. Add an Integrator block from the Control Design and Simulation Simulation Continuous Linear Systems menu. 5. Wire the output of the integral Gain to the input of the Integrator block. 6. Add another Summation block. Hint: Right-click on existing Summation block, hold the CTRL key, and drop the copied Summation block. 7. Double-click on the Summation block that was just added and change the “-ve” sign to a “+ve” sign, as shown in Figure 14. Figure 14: Configure summation block. 8. Connect the output of both Gain blocks to the two +ve terminals of the Summation. 9. Wire output of Summation block to DC motor output. Revision 1.1 ♦ Page 13
  • 16. QNET-DCMCT Demo Guide Figure 15: Block diagram to run the PI DC motor speed control. 5.4.2. Running PI Speed Control See the effects of adding integral action to the control. This guarantees that the measure speed gets to the desired setpoint, i.e. removes steady-state error that was observed when using the proportional control. 1. Run VI. 2. Set the setpoint control to 0.5. CAUTION: Make sure the setpoint does not surpass +/- 1. 3. Set the integral gain, ki, to 10. The measured speed should reach the setpoint of 0.5, as illustrated in Figure 16. Revision 1.1 ♦ Page 14
  • 17. QNET-DCMCT Demo Guide Figure 16: Running PI speed control. 4. Set the setpoint to 0. 5. When the motor stops spinning, stop the VI. 5.5. Using DAQmx Drivers Introduce DAQmx by converting the Express VIs to DAQmx code. 5.5.1. Convert Analog Input Express VIs to DAQmx Convert the Analog Input Express VI to an DAQmx based VIs. 1. Right-click on the analog input DAQ Assistant block and select Generate NI-DAQmx Code. Revision 1.1 ♦ Page 15
  • 18. QNET-DCMCT Demo Guide Figure 17: Generating DAQmx code from an Express VI. 2. This will add a DAQmx Read VI and a sub-VI that configures the analog input channel, as illustrated in Figure 18. Figure 18: Generated analog input DAQmx code. 3. In the Simulation Loop, we only need to read a single point of data in each iteration. Set the DAQmx Read VI to Analog Single Channel Single Sample DBL. 4. Place the configuration VI outside the Simulation loop, as shown in Figure 19. Revision 1.1 ♦ Page 16
  • 19. QNET-DCMCT Demo Guide Figure 19: Setup AI DAQmx code. 5. Connect the task out of the configuration VI to the task/channels in of the DAQmx Read, as shown in Figure 19. 6. Remove the data indicator and connect the data output terminal on the Analog DBL output to the Waveform Chart, as illustrated in Figure 19 above. 7. Run the VI and the response should be similarly as shown in Figure 16, above. 5.5.2. Convert Analog Output Express VIs to DAQmx Convert the Analog Output Express VI to DAQmx drivers. 1. Right-click on the analog output block, DAQ Assistant3, and select Generate NI DAQmx Code. 2. We don't need to use the special waveform timing. Click on OK on the message shown in Figure 20. Figure 20: Waveform Timing 3. This will add a DAQmx Write VI and a sub-VI that configures the analog output channel. Revision 1.1 ♦ Page 17
  • 20. QNET-DCMCT Demo Guide Figure 21: Generated analog write DAQmx code. 4. In the Simulation Loop, we are only writing a single point of data in each iteration. Set the DAQmx Write VI to Analog Single Channel Single Sample DBL. 5. Place the configuration VI outside the Simulation loop, as shown in Figure 22. Figure 22: Block diagram of speed controller using DAQmx. 6. Remove the signal generator block (not needed because of Simulation loop). Revision 1.1 ♦ Page 18
  • 21. QNET-DCMCT Demo Guide 7. Clean up the excess wiring by pressing the CTRL-B. 8. Wire the output of the PI controller, i.e. the Summation block, to the data terminal on the DAQmx Write VI. 9. Connect the task out terminal from the analog output configuration VI to the task/channels in terminal of the DAQmx Write VI, as shown in Figure 22. 10. Run the VI and the response should be similarly as shown in Figure 16, above. 5.5.3. DAQmx Configuration Introduce how to configure analog input and output channels using DAQmx. 1. The block diagram of the analog input sub-VI is pictured in Figure 23. It features all the settings that were chosen when setting up the Express VI to read the tachometer. Figure 23: Configuring QNET analog input channel. 2. Similarly for the analog output channel, shown in Figure 24. Revision 1.1 ♦ Page 19
  • 22. QNET-DCMCT Demo Guide 3. Figure 24: Configuring QNET analog output channel. Revision 1.1 ♦ Page 20