Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Electronic Engineering Technology Electronic Engineering Technician Automated Test Equipment - EETD 5109 Nova Scotia Community College Instructor: Craig Cameron, Telephone: XXXXXXXXXX, XXXXXXXXXX ICE...

1 answer below »

Electronic Engineering Technology
Electronic Engineering Technician
Automated Test Equipment - EETD 5109
Nova Scotia Community College
Instructor: Craig Cameron, Telephone: XXXXXXXXXX, XXXXXXXXXX
ICE – Using A
ay Functions
Due Date: TBA
Instructions:
· This activity is to be completed as an individual effort.
· Follow all instructions.
1. Open LabVIEW and Create a Blank VI. For this exercise you will create the VI shown at the back of the document. This VI uses the a
ay functions discussed earlier. The Front Panel and VI are labeled such that the Controls and Indicator can be easily matched to the Block Diagram.
2. Enable the context help. This will provide you with information on the VI(s) and the terminal labels and locations.
3. After the code for each function is created. Run it to observe how it works. Once an understanding is gained, move on to the next function shown in the sample VI.
4. All the a
ay functions are located in the Functions
Programming
A
ay palette.
5. The functions covered include:
a. A
ay Size
i. Create the 1-D A
ay with 10 elements as shown in the Front Panel Below. Place an A
ay Size function on the Block Diagram.
ii. Wire the 10 Element a
ay to the A
ay Size function and wire an indicator to the function output.
iii. Fill in the a
ay with values
iv. Run the code and observe the indicator output. It should show a value of 10 indicating the a
ay size.
. Initialize A
ay - For this demo, you will create and initialize a 2-D A
ay. As shown in the front panel example supplied.
i. Place an Initialize A
ay function on the Block Diagram.
ii. To the element terminal, wire a numeric value to which the a
ay will be initialized.
iii. To the first dimension terminal wire a constant specifying the number of rows the a
ay will contain.
iv. Mouse over the function to show the resize handle. Using the resize handles expand the function to obtain a second dimension terminal.
v. Wire a constant to the second dimension terminal. This number specifies the number of columns the a
ay will contain.
vi. Wire an indicator to the output of the function. The indicator should appear as an a
ay.
vii. Run the code and verify that a 2-D a
ay with the dimension specified was created on the Front Panel, as shown in the example below.
c. Build A
ay - In this example, we will use the Build A
ay function to append a scalar value to the top of an existing a
ay.
i. On the Front Panel, create a small 1-D A
ay. Load the a
ay with scalar values.
ii. As in the example at the back of the document, place a Build A
ay function on the Block Diagram.
iii. Wire a constant value to terminal one.
iv. Expand the build a
ay function to include two terminals.
v. Wire the a
ay you created to the second terminal of the Build A
ay function.
vi. Wire an indicator to the Build A
ay function output. The indicator should appear as an a
ay.
vii. Run the code. Verify the presence of a new a
ay on the Front Panel containing the a
ay you created with the constant appended to the top.
viii. Place a second Build A
ay function on the Block Diagram and expand it to contain two terminals. Wire constants to the terminals and wire and indicator to the output.
ix. Run the code. Verify that a 1-D a
ay with two elements was created.
d. A
ay Subset
i. Place an A
ay Subset function on the Block Diagram (as shown in the diagram).
ii. Wire the 1-D A
ay created for the A
ay Size Function to the A
ay Subset function a
ay input terminal. Wire a constant to the index terminal. This specifies the index in the a
ay at which you want to start.
iii. To the length terminal wire another constant. This will specify the number of elements to copy from the index specified on the previous terminal.
iv. Wire an indicator to the output of the function. The indicator should appear as an a
ay.
v. Run the code. Verify the presence of a smaller a
ay on the Front Panel containing the data elements specified by the constant you wired to the A
ay Subset function. (note the index specified is ‘0’ based).
e. Index A
ay
i. On the Block Diagram, place an Index A
ay function.
ii. Wire the 1D A
ay from the A
ay subset function to the n-dimension A
ay terminal.
iii. Wire a control to the index terminal. This control will be used to select the a
ay element of interest.
iv. Wire an indicator to the output of the Index A
ay function. The indicator should appear as a scalar indicator.
v. Run the code and verify that the number displayed co
esponds to the row index you specified.
f. Modifying a
ays in loops using initialize and index a
ay functions.
i. Place an Initialize A
ay function on the block diagram and wire constants with values 3 and 10 to the element and dimension terminals respectively. This will create a 10 element a
ay with a ‘3’ in each location.
ii. Place a For-Loop on the Block Diagram. Set the For Loop to execute 10 times.
iii. Inside the For-Loop place an Index A
ay. Place a multiplication and add function inside the loop and wire as shown on the provided example.
iv. Wire the output of the Initialize A
ay function to the For-Loop to create a tunnel. Disable Indexing so the entire a
ay will be passed into the loop on the first iteration.
v. Using the For-Loop iterator terminal, index through the a
ay. As the loop runs, the iterator terminal will enable the Index A
ay function to select each element of the a
ay, one at a time, to be added to a random number between 1 and 2. Wire an indicator to the output of the addition. Enable indexing on the For-Loop tunnel. The indicator should appear as an a
ay.
vi. Run the code and verify that the output a
ay contains data that is a product of the a
ay elements and iterator.
g. Search 1-D A
ay
i. Place a Search 1D A
ay function on the Block Diagram (as shown in the diagram).
ii. Wire the 1-D A
ay created for the A
ay Size Function to the Search 1D A
ay function a
ay input terminal. Wire a constant to the index terminal.
iii. Create an indicator on the output of the search 1D A
ay function. The indicator should appear as a standard scalar indicator.
iv. Wire a constant to the element terminal specifying the value for which you are searching.
v. To the index terminal, wire a constant. This specified the point in the a
ay from which to start searching.
vi. Run the code and verify that the index returned co
espond to the index in the a
ay where the value resides
h. Replace A
ay Subset
i. Using the Initialize A
ay Function create a 2 x 2 A
ay with a value of 7 in each cell.
ii. Place a Replace A
ay Subset function on the block diagram as shown. Wire the 2D A
ay created for the Initialize A
ay Function exercise (para b) to the A
ay input on the Replace A
ay Subset function. (note that the creation of an additional index terminal on the function when you attached a 2D a
ay)
iii. Wire a constant with a value of 1 to the row index terminal.
iv. Wire a constant with a value of 3 to the column index terminal.
v. Wire the 2 x 2 A
ay with values of 7 to the new element/suba
ay terminal on the Replace A
ay Subset function.
vi. Create an indicator on the output of the Replace A
ay Subset function. The indicator should appear as a 2D a
ay.
vii. Run the code and verify the new valued you specified are located in the location specified by the index constants.



PORTD
Introduction to Automated Test Equipment (ATE)
Using
LabVIEW
(Instrument Control)
1
Introduction to ATE
A
ays and Clusters
Goals:
Understand A
ays
Creating and initializing A
ays
Using a
ays
2
Introduction to ATE
A
ays
Variable-sized data types
Contain multiple instances of specific data type
Cannot contain multiple data types
If a
ay is defined for integers, only integers can be assigned to the a
ay
A
ays are useful for collecting repetitive data
A
ays can have one or more dimensions up to 231-1 elements per dimension
Maximum number of elements depends on available memory
3
Introduction to ATE
A
ays
The individual elements can be any datatype (i.e. integers, floats, strings, etc)
Exceptions    
Cannot have a
ays of a
ays
Cannot have a
ays of charts
Cannot have a
ays of graphs
Accessing a
ays
Accessed via it’s index numbe
Index is zero based
And a
ay of 5 would contain elements 0 through 4.
4
Introduction to ATE
A
ay Dimensions
1-D a
ays
The first element of an a
ay is index 0
The last element is n-1 where n is the a
ay size
5
Introduction to ATE
Creating A
ays
Two steps are required to create an a
ay
Select an empty a
ay shell from the Controls
Modern
A
ay,Matrix,and Clusters
Drag a valid data object (i.e. numeric, Boolean, String, etc..) into the a
ay shell.
To increase the size of the a
ay use the positioning tool and select the a
ay resize handle and drag it to increase the size/number of elements
The block diagram terminal of an a
ay is black when initially placed on the front panel
Indicates type is not yet defined
Block diagram will take on colour of the datatype assigned
Demonstrate creating an a
ay
6
Introduction to ATE
Creating A
ays with loops
Using For-Loops and the While-Loop
Auto-indexing (output)
Data passed out an element at a time
Indexing disabled (output)
Only last value execute
Class Demonstration
Create a for-loop that outputs a random numbe
Demonstrate with auto Indexing enabled
Demonstrate with auto indexing disabled
7
Introduction to ATE
Passing A
ays into loops
It is also possible to pass a
ays into loops one element at a time
If an a
ay is supplied as an input to a loop and auto-indexing is selected, the a
ay will enter the loop one element at a time for each iteration
If indexing is disabled, the entire a
ay is passed into the loop on the first iteration
Demonstration – passing a
ay data into a loop with auto-indexing enabled
8
Introduction to ATE
A
ay Dimensions
2-D A
ay
Elements are accessed via two indexes i.e. the element in the bottom right would be access through indexes 4, 3.
You can also create 3-D, 4-D, n-D, etc
Dimensions are added by right clicking on the a
ay and selecting add dimension or by dragging the index resize handle
9
Introduction to ATE
Creating 2-D A
ays with loops
Just like 1-D A
ays, 2-D
Answered 1 days After Mar 15, 2022

Solution

Nidhi answered on Mar 17 2022
101 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here