DORDT COLLEGE ENGINEERING DEPARTMENT
ENGINEERING PROGRAMMING
FOR INSTRUMENTATION AND AUTOMATION
EGR 170-02
Spring 2019

PROBLEM SETS

(Last update: 5/09/2019 10:42 pm)
PS
#  
Assigned Due Returned Assignment
--

--- --- ---   Note:
  PS#9 is the last problem set for the semester.
  No further regular homework assignments will be
  made. Use the time to finish your project.
9

4/05 4/18 sol'n   Topics: DAQ Hardware, Analog, digital signals
  Read in: Essick 3rd, Chapters 5, 8, 9
  Or read: Essick 4th, Chapters 5, 6, 9, 10
  All students should notice extended material
  contained on classroom slides for 4/04, 4/11
 
  Do homework in Essick, 3rd ed.
  5.A, 8.1, 8.A, 9.1, 9.8

  Or do homework in Essick, 4th ed.
  5.A, 9.1, 8.A, 10.1, 10.6

 
  A partial VI for problem 8.A is avalable here.
  You will need to unzip the folder you download.
  To make it work, you need to edit the file
  paths in the block diagram to match the place
  where you put the files.
 
  Some hints are Problem 8.A are available here.
 
  (Click this link to view homework problem 5.A.)
  (Click this link to view homework problem 8.A.)
 
  (No further problems will be added to this set.)
  (On 4/16 at about Noon Prof dDB changed Problem 10.8
  to Problem 10.6 on the list of problems for the 4th
  edition of the textbook. This corrected a typogaphic
  error. The 4th edition has no Problem 10.8.)
8

3/28 4/11 sol'n     Topics: NI LabVIEW MathScript, XY Plots, File/IO
  Read in: Essick 3rd, Chapters 4, 6
  Or read: Essick 4th, Chapters 4, 7
 
  Do homework in Essick, 3rd ed.
  4.2, 4.6, 6.3

 
  Or do homework in Essick, 4th ed.
  4.2, 4.6, 7.3

 
  Hints:
  4.2 Create x, y, in Mathscript, bundle, XY Graph
  x.3 For loop iterates from 0 to 3. Iteration
        can be used to make filenames unique.
        Each iteration opens, writes, closes a file.
        Text Section 6.8 or 7.8 is helpful.
        The Build Path function is helpful.
7

3/21 4/04 sol'n     Topics: NI LabVIEW introduction, loops, wave-
              forms, data types, owned vs. free labels
  Read: Essick, Chapters 1, 2, and 3.
 
  Do homework in Essick 3rd or 4th ed.
  1.1, 1.3 (optional: label the output "R1||R2"
  instead of "Equivalent Resistance."), 2.5, 2.7,
  3.3, 3.9

 
  Note: Turn in a word-processor document
  that has, for each assigned problem, the
  problem statement, one or more screen-shots
  of the front panel to illustrate interesting
  case(s), and a screen-shot of the block diagram.
  Each problem should start at the top of a
  page. Additionally, your document should
  abide by other course standards as usual.
 
  An example solution to illustrate the above
  requirements is available in MS Word format
  and PDF.
 
  Hint: Do you want to zoom in on your block
  diagram? View|Zoom is not available within
  LabVIEW, but the Windows Magnifier works.
  Note: The tip on the linked page about
  reducing screen resolution is far inferior
  for this particular need compared to
  learning to use Windows Magnifier.
 
  Additional hints can be found here.
 
  (On 3/27 at about 5:15 pm Prof dDB delayed the due
  date on this assignment by a week.)
---

2/28 3/20
at
5:00 pm
---   Finish Project #1, Robot Arm or Color Sorter
  Details are on the course's Canvas page.
  Links for turning in your deliverables are
  also on the course's Canvas page.
6

2/21 3/07 sol'n     Topics: Images, GUIs, built-in math functions
  Read: Attaway, Chapters 13, 14
 
  Do homework in Attaway 4th ed.
  13.3, 13.4, 13.12, 13.14, 13.19,
  14.14, 14.23, 14.24

 
  Note: Prof. dDB recommends MATLAB for problems
  in Chapter 13. GNU Octave starts showing incom-
  patibility with MATLAB when advanced features
  such as high-level I/O and GUI uicontrol are used.
  But. . . If you really try hard, GNU Octave can
  do these tasks. Keep these things in mind:
  • Octave does not support nested functions.
  • Octave does not fully support local functions.
     Put functions in their own files instead.
  • Octave does not fully support the dot method.
     Use get and set instead.
  • You may need to load packages.
  Yeh. . . It's easier just to follow the high-
  level methods in Attaway's text using MATLAB.
 
  Note: You have two weeks to do this assignment
  because it will take a while.   Suggestion:
  Get 13.3, 13.4, 13.12 and 13.14 done by 2/28.
5

2/14 2/21 sol'n     Topics: High- and low-level I/O. object-
              oriented programming, version control.
  Read: Attaway, Chapters 9, 11, classroom slides
 
  Do homework in Attaway 4th ed.
  9.3, 9.9, 9.23, 11.2 set only, 11.3,

  Help on Problem 11.2 available here.
 
  No need to spend time making files.
  Spreadsheet for 9.3 can be downloaded here
  File for 9.23 can be downloaded here
  In most browsers, after clicking the links above
  choose "Save File". In some browsers,
  right-click the link, then choose "Save link as".
  Still other browsers offer other choices that
  work such as, "Save target".
4

2/07 2/14 2/28   Topics: Text manipulation: character arrays and
              strings; Data structures
  Read: Attaway, Chapters 7, 8
 
  Do homework in Attaway 4th ed.
  7.26, 7.29, 7.35, 8.5, 8.13, 8.25

 
  Help on Problem 7.35 avalable here.
  A helpful script for Problem 8.25 is here.
3

1/31 2/07 sol'n   Topics: Program flow control (for, while, etc.)
              allocating memory, checking inputs,
              vectorizing code, types of functions,
              passing parameters to and from functions
              scope of variables, persistence, debugging
  Read: Attaway, Chapters 5, 6
 
  Do homework in Attaway 4th ed.
  5.16, 5.25, 5.37, 5.41, 6.29,

 
  or do Attawy 5th ed.
  5.15, 5.27, 5.41, 5.44, 6.30,

 
  Hints:
  In Problem 5.16 or 5.15 use nested for loops.
  In Problem 5.25 or 5.27 use a while loop.
2

1/24 2/02 2/07   Topics: Input, output, scope, if, switch
  Read: Attaway, Chapters 3, 4
 
  Do homework in Attaway 4th ed.
  3.8, 3.10, 3.13, 3.15, 3.25, 3.30
  4.7, 4.21, 4.24, 4.30

 
  or do Attawy 5th ed.
  3.8, 3.13, 3.14, 3.18, 3.26, 3.33,
  4.8, 4.22, 4.24, 4.31

 
  In your solution set, when scripts and/or functions
  are requested, also cut-and-paste some examples
  from the command window to show that your
  code works. You will have to use some judgement
  to decide just what and how much to include.
 
  Examples of MATLAB scripts and functions here.
  Browsing this code may give you hints, style tips,
  and other help. You may use the functions in your
  own work too, or you find any of them useful.
  To see the functions, save the Zip file on your
  local media, then open them in MATLAB or
  GNU Octave or if you are just looking, you may
  open them in Windows Notepad or Notepad++.
  You may run any of the scripts to see what
  they do. To run them you must decompress the
  Zip file.
 
  (On the due date was originally 1/31, but due to
  school closure for bad weather it was changed to
  Saturday, 2/01 at 11:59 pm.)
1

1/17 1/24 1/31

  Topics: Course intro, Matlab intro, variables,
  operators, expressions, vectors, matrices
  Read: Attway, Chapters 1, 2
 
  Do homework in Attaway 4th ed.
  1.25, 1.12, 1.30, 2.8, 2.13, 2.25, 2.31, 2.41

 
  or do option #1 (preferred) in Attawy 5th ed.
  1.29, 1.15, 1.34, 2.8, 2.15 2.28, 2.34, 2.44

 
  or do option #2 (harder?) in Attawy 5th ed.
  1.25, 1.12, 1.30, 2.8, 2.13 2.25, 2.31, 2.41

Note 1) Turn your homework in electronically. Homework is due at 10:50 AM on the date shown. Click the due-date and follow on-screen directions to turn your homework in. Usually you will upload exactly one word-processor file. Be sure your file meets the course standards, including appropriate page headers, problem statements, etc.

Note 2) Homework solutions are usually available one or two class periods after the due date. Click the "returned date" on this page to access the solutions. If the "Returned" date is not a link (is black, not gold) then the solution is not yet posted. Check back later. If you click the link and get a login screen instead of the solutions, log in using your usual courses@dordt username and password. Then use the back icon (or alt-left-arrow on the keyboard) twice to get back to the link on this page and click the link again. The link only works when you are logged in to courses@dordt.

Note 3) Problems sets shown above with no "assigned" date are tentative. More problems might be added, expected due dates might change, but problems shown will eventually be assigned.

Note 4) If you are having difficulty reading the latest version of this page it may have to do with your browser's cached memory. Read this note on cached pages to solve the problem.