<< Chapter < Page Chapter >> Page >
This module provides an introduction to real-time control of the ECP Model 210 Rectilinear Plant using LabVIEW Real-Time. Students open and execute a simple control algorithm to become familiar with the software environment and lab hardware that will be used in future labs.

Introduction to lab hardware and labview implementation


  • Become familiar with how the lab hardware works
  • Understand how the LabVIEW control loop block diagram executes
  • Gain experience in interacting with the VI front panel


1. In your own words, describe how the implementation VI's block diagram executes. More specifically,explain the execution when the system is idle and when a reference trajectory is commanded.

Lab procedure

Using the model 210 rectilinear plant

  • Connect the drive motor and encoder feedback cables to the Model 210 plant.
  • Unclamp the first mass carriage and remove any springs that may be connected to it. Be sure to position the stop bumpers toallow maximum range of motion for the carriage. Load four 0:5kg brass weights onto the carriage. In this configuration the carriageacts as a rigid-body system.
  • Clamp the other two mass carriages by moving the stop bumpers inward so they constrain the motion of the carriage. You will needto use a 1/4 inch spacer nut between the mass carriage and stop bumpers so as to not engage the limit switches.
  • Power on the PXI by pressing the rectangular button located at the bottom left corner of its front face. Wait approximately 30seconds for the system to boot up.
  • Run LabVIEW on your host PC.
  • Target the PXI real-time embedded controller by selecting RT Target: 146.6.105.x
    (the IP address of your PXI system) from the Execution Target drop-down menu on the LabVIEW startup screen. Wait for LabVIEW to establish a connection.
  • Now click the Open button on the LabVIEW startup screen and locate the file named Lab 1 - Intro to Lab Hardware.vi. The VIfront panel should look like the one in Fig. 1.


VI Front Panel
  • Enter a loop time of 0.005 seconds then run the VI by clicking on the arrow button at the top-left corner of the frontpanel (because of the way that the VI's block diagram is written, you must enter the loop time before running the VI. If you wish tochange the loop time, you must stop the VI, enter the new loop time, and then run the VI again). At this time, the VI code will bedownloaded from the host PC to the PXI. When downloading is complete, the VI will automatically begin executing on the RTsystem. At this time, the control loop is being run solely on the PXI's real-time embedded controller, not your host PC. However, acommunications loop is running between the two systems to allow the user to interact with front panel activities.
    The communications loop is part of the LabVIEW Real-Time Development system. You do not see its code anywhere in the VI
  • Manually displace the first mass carriage and observe the position measure- ment being shown by the Encoder 1 indicator onthe front panel. Notice that even when the amplifier box is powered off, the encoders still make measurements. The Encoder 2 andEncoder 3 indicators correspond to the second and third mass carriages, respectively. The Encoder 4 indicator is for thependulum accessory and will be used later in the course.
  • Whenever you wish to set the encoder readings to zero, simply press the Reset Encoders control located on the front panel. Trythis now.
  • Now manually displace the first mass carriage until you engage one of the limit switches. Notice how the System Errorindicator lights up. At this point, if any voltage were being output to the drive motor, it would be set to zero and remain thereuntil you press the Clear Error control on the front panel. Press this control now and observe how the System Error indicator lightturns off.
  • You are now going to send a commanded trajectory to the plant. First, power on the amplifier box by pressing the blackbutton. Also, center the first mass carriage between the two stop bumpers and then reset the encoders.
  • Now press the Command Trajectory control on the front panel. The front panel for the Test Signals.vi subVI will pop open. Clickthrough the different types of test signals you can command the system with, and notice the different parameters that you canchange for each signal. Choose one of the signals and enter values for its parameters. Then click on the Preview Trajectory controland observe the signal on the graph indicator. Notice the effect of selecting the Bidirectional Inputs control on signals for which youspecify more than one repetition.
  • Choose a sinusoidal signal with an amplitude of 1640 counts. This amplitude corresponds to an input of 0.5 Volts to the drivemotor and 2.6 Newtons to the mass carriage, nominally. You will learn how to calculate these exact values in the next lab. Set thefrequency to 2Hz, and repeat the signal 8 times. Preview the trajectory to check that it is what you expected (it is always goodpractice to preview the test signal before you execute it to make sure you know exactly what will be commanded).
  • Once you have confirmed that the commanded trajectory is correct, press the Execute Trajectory control. The Test Signals.vifront panel will close and the Executing Trajectory indicator on the main VI's front panel will light up. During this time you willsee the plant responding to the command. When the trajectory is complete, the plot data will be computed, as shown by the ComputingPlot Data indicator. Once complete, you may choose which trajectories you wish to view by selecting the corresponding checkbox. If necessary, use the zoom features for the graph indicator to get a better view of the data. Also, select the cursor tool anddrag the cursor over the response plot.
  • Notice that time and amplitude data is shown in the cursor legend. This feature will become useful for performing calculationsin later labs. Take a look at the response of the first mass carriage which you just commanded. Since no control algorithm wasimplemented, you are looking at the open-loop response of the system.
  • If you wish to save the data to a spreadsheet file, enter a filename in the file path box and press the Save Raw Data control.Note that this only saves the time, reference trajectory, control effort, and encoder data, not the velocity or acceleration. Thefile will be saved to the hard drive on the PXI. You can use an FTP client to download the file to your host PC. The file can beimported by any application that can handle spreadsheets such as Excel or Matlab.
  • Also, you can save the response plot for later viewing or inserting into a report. The easiest way to do this is to simplyright click on the plot and choose the Copy Data option (this option will be under the Data Operations menu if the VI is notrunning). Then just paste the figure into an image editing program (such as Paint) or a word processing application that can handleembedded images. Unchecking the Autoscale Y Axis option will help ensure that the pasted image will look the same as it does on theVI front panel. Save the plot of the reference trajectory and response of the first mass carriage that you just commanded andhand it in with the rest of your work.
  • You are now finished with the introduction to using LabVIEW with the Model 210 plant. Press the Abort Control button on thefront panel and turn off the amplifier. At this time take a few minutes to connect the springs and dashpot to the mass carriages soyou will be familiar with this process in future labs. The springs are available in three stiffnesses that you will determine in thenext lab. The damping provided by the dashpot can be varied by turning the knob located at the end. Turning it counterclockwisedecreases the damping while turning it clockwise increases the damping. For a given dashpot setting, you can determine the dampingcoefficient experimentally, as you will see in the next lab.
  • When you are finished turn off the amplifier box. 4.3.2 Using the Model 205 Torsional Plant
  • Connect the drive motor and encoder feedback cables to the Model 205 plant.
  • Mount disks to all three locations. When mounting a disk at the uppermost location, always be sure that you mount the disk onthe underside of the center mounting hub. The bottom and middle disks should be mounted on top of the mounting hub. You shouldmount the disks so that the side with the concentric circles is facing up.
  • Load two 0:5kg brass weights onto the second disk so they both lie on the diameter line of the disk (i.e. 180o apart). Placethe center of each weight 9:0cm from the center of the disk. You can determine this by looking at the concentric circles that havebeen cut into the disks. The inner most circle is 2:0cm from the center, and each successive circle occurs at 1:0cm intervals.
    Whenever mounting weights onto the disks, the threaded locking nut needs to be positioned so that it falls into the groove on the underside of the disk. This helps prevent the weights from jittering around on the disk. The same should be done when clamping the disks as well.
  • Now clamp the upper disk so that it cannot rotate.
  • Take a look at the VI's block diagram. At the far left you will notice that the FPGA code we are referencing is that of theModel 210 (the reference is being established by the pink icon that says ECP 210 on it). However, the FPGA codes of the Model 210 andModel 205 are slightly different, so we wish to change this reference to that of the Model 205. Right click on the icon andchoose Select Target VI. Then locate and select the ECP Timed (FPGA) sync 205.vi file. Once LabVIEW has established thereference, you will see the text on the icon change from ECP 210 to ECP 205. As a final step, right click the icon again and chooseRefresh.
  • Now save the VI by using the File drop-down menu (or alternately by pressing Ctrl + S on your keyboard). Then run theVI.
  • Manually displace the first and second disks and observe the encoder measurements on the front panel. Notice that the encodersmake positive measurements in the counterclockwise direction (with respect to a top view reference position). You will need toremember this for the future when you derive the torsional plant's equations of motion. When you are finished, reset theencoders.
  • Now turn on the amplifier box.
  • Suppose we wish to acquire and view the natural response of the system for a particular set of initial conditions. You canaccomplish this by executing a step with zero amplitude (hence zero control effort is being input to the plant). Select a dwell time of4000ms. This will cause the system to acquire 8 seconds of data. To see why this is true, preview a step input with a nonzero amplitudeand observe how the dwell time is defined for this type of input.
  • Now execute the zero amplitude step and manually displace the first disk by approximately 45o, then release it. Wait for the VIto finish acquiring the data, and then plot the measurements from encoder 1 and 2. Try a different set of initial conditions (e.g.displace the two disks in opposing directions) and observe the response.
  • Reset the encoders and execute a sine sweep with a 500 count amplitude (again, you will learn how to compute the drive motorvoltage and torque corresponding to this amplitude in the next lab). Enter 0:1Hz and 10Hz as your start and end frequencies,respectively. Input a sweep time of 30 seconds and set the sweep method to logarithmic. When the sweep is complete, select to viewthe frequency response from the control on the front panel. This is a 2DOF spring, mass, damper system. Does the response lookfamiliar? Save the plot of the disk 1 and 2 frequency responses and hand it in with the rest of your work.
  • You are now finished with you introduction to the Model 205 plant. Stop the VI by hitting the Abort Control button and turn offthe amplifier box.
  • Close all VI windows and exit LabVIEW. Then turn off the PXI.
  • Return all plant materials to the instructor.


  • Consider a controller Gc(s) in series with a plant G(s) with unity negative feedback. Denote the reference input, trackingerror, control effort, and output by R(s), E(s), U(s), and Y (s), respectively. Draw the block diagram for this system making sure tolabel all the signals.
  • Now consider the hardware we have in the lab. Instead of having just Gc(s), G(s), etc, draw a diagram that shows each pieceof lab hardware and which signal(s) it sends and/or receives. Your diagram should include at least the following:
    • mass carriages or torsion disks (choose either one)
    • amplifier box
    • PXI Reconfigurable I/O module
    • Encoders
    • drive motor
    • PXI embedded controller
  • Be sure to label all forces/torques, displacements, and signals that occur in the system.

Questions & Answers

find the 15th term of the geometric sequince whose first is 18 and last term of 387
Jerwin Reply
I know this work
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
virgelyn Reply
hmm well what is the answer
how do they get the third part x = (32)5/4
kinnecy Reply
can someone help me with some logarithmic and exponential equations.
Jeffrey Reply
sure. what is your question?
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
I'm not sure why it wrote it the other way
I got X =-6
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
is it a question of log
I rally confuse this number And equations too I need exactly help
But this is not salma it's Faiza live in lousvile Ky I garbage this so I am going collage with JCTC that the of the collage thank you my friends
Commplementary angles
Idrissa Reply
im all ears I need to learn
right! what he said ⤴⤴⤴
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
Kevin Reply
a perfect square v²+2v+_
Dearan Reply
kkk nice
Abdirahman Reply
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
Kim Reply
or infinite solutions?
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Embra Reply
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
Nancy Reply
rolling four fair dice and getting an even number an all four dice
ramon Reply
Kristine 2*2*2=8
Bridget Reply
Differences Between Laspeyres and Paasche Indices
Emedobi Reply
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
Mary Reply
how do you translate this in Algebraic Expressions
linda Reply
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
many many of nanotubes
what is the k.e before it land
what is the function of carbon nanotubes?
I'm interested in nanotube
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
good afternoon madam
what is system testing
what is the application of nanotechnology?
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
anybody can imagine what will be happen after 100 years from now in nano tech world
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
silver nanoparticles could handle the job?
not now but maybe in future only AgNP maybe any other nanomaterials
I'm interested in Nanotube
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
can nanotechnology change the direction of the face of the world
Prasenjit Reply
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
Ali Reply
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
bamidele Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Control systems laboratory. OpenStax CNX. Oct 20, 2005 Download for free at http://cnx.org/content/col10302/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Control systems laboratory' conversation and receive update notifications?