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 »
I need to do an assignment in Labview. All the instructions are there in the word document(ICE- using arrays functions)


Electronic Engineering Technology
Electronic Engineering Technician
Automated Test Equipment - EETD 5109
Nova Scotia Community College
Instructor: Craig Cameron, Telephone: 491-4558, [email protected]
ICE – Using Array 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 array 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 array functions are located in the Functions>>Programming>>Array palette.
5. The functions covered include:
a. Array Size
i. Create the 1-D Array with 10 elements as shown in the Front Panel Below. Place an Array Size function on the Block Diagram.
ii. Wire the 10 Element array to the Array Size function and wire an indicator to the function output.
iii. Fill in the array with values
iv. Run the code and observe the indicator output. It should show a value of 10 indicating the array size.
b. Initialize Array - For this demo, you will create and initialize a 2-D Array. As shown in the front panel example supplied.
i. Place an Initialize Array function on the Block Diagram.
ii. To the element terminal, wire a numeric value to which the array will be initialized.
iii. To the first dimension terminal wire a constant specifying the number of rows the array 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 array will contain.
vi. Wire an indicator to the output of the function. The indicator should appear as an array.
vii. Run the code and verify that a 2-D array with the dimension specified was created on the Front Panel, as shown in the example below.
c. Build Array - In this example, we will use the Build Array function to append a scalar value to the top of an existing array.
i. On the Front Panel, create a small 1-D Array. Load the array with scalar values.
ii. As in the example at the back of the document, place a Build Array function on the Block Diagram.
iii. Wire a constant value to terminal one.
iv. Expand the build array function to include two terminals.
v. Wire the array you created to the second terminal of the Build Array function.
vi. Wire an indicator to the Build Array function output. The indicator should appear as an array.
vii. Run the code. Verify the presence of a new array on the Front Panel containing the array you created with the constant appended to the top.
viii. Place a second Build Array 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 array with two elements was created.
d. Array Subset
i. Place an Array Subset function on the Block Diagram (as shown in the diagram).
ii. Wire the 1-D Array created for the Array Size Function to the Array Subset function array input terminal. Wire a constant to the index terminal. This specifies the index in the array 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 array.
v. Run the code. Verify the presence of a smaller array on the Front Panel containing the data elements specified by the constant you wired to the Array Subset function. (note the index specified is ‘0’ based).
e. Index Array
i. On the Block Diagram, place an Index Array function.
ii. Wire the 1D Array from the Array subset function to the n-dimension Array terminal.
iii. Wire a control to the index terminal. This control will be used to select the array element of interest.
iv. Wire an indicator to the output of the Index Array function. The indicator should appear as a scalar indicator.
v. Run the code and verify that the number displayed corresponds to the row index you specified.
f. Modifying arrays in loops using initialize and index array functions.
i. Place an Initialize Array 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 array 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 Array. Place a multiplication and add function inside the loop and wire as shown on the provided example.
iv. Wire the output of the Initialize Array function to the For-Loop to create a tunnel. Disable Indexing so the entire array will be passed into the loop on the first iteration.
v. Using the For-Loop iterator terminal, index through the array. As the loop runs, the iterator terminal will enable the Index Array function to select each element of the array, 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 array.
vi. Run the code and verify that the output array contains data that is a product of the array elements and iterator.
g. Search 1-D Array
i. Place a Search 1D Array function on the Block Diagram (as shown in the diagram).
ii. Wire the 1-D Array created for the Array Size Function to the Search 1D Array function array input terminal. Wire a constant to the index terminal.
iii. Create an indicator on the output of the search 1D Array 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 array from which to start searching.
vi. Run the code and verify that the index returned correspond to the index in the array where the value resides
h. Replace Array Subset
i. Using the Initialize Array Function create a 2 x 2 Array with a value of 7 in each cell.
ii. Place a Replace Array Subset function on the block diagram as shown. Wire the 2D Array created for the Initialize Array Function exercise (para b) to the Array input on the Replace Array Subset function. (note that the creation of an additional index terminal on the function when you attached a 2D array)
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 Array with values of 7 to the new element/subarray terminal on the Replace Array Subset function.
vi. Create an indicator on the output of the Replace Array Subset function. The indicator should appear as a 2D array.
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
Arrays and Clusters
Goals:
Understand Arrays
Creating and initializing Arrays
Using arrays
2
Introduction to ATE
Arrays
Variable-sized data types
Contain multiple instances of specific data type
Cannot contain multiple data types
If array is defined for integers, only integers can be assigned to the array
Arrays are useful for collecting repetitive data
Arrays 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
Arrays
The individual elements can be any datatype (i.e. integers, floats, strings, etc)
Exceptions
Cannot have arrays of arrays
Cannot have arrays of charts
Cannot have arrays of graphs
Accessing arrays
Accessed via it’s index number
Index is zero based
And array of 5 would contain elements 0 through 4.
4
Introduction to ATE
Array Dimensions
1-D arrays
The first element of an array is index 0
The last element is n-1 where n is the array size
5
Introduction to ATE
Creating Arrays
Two steps are required to create an array
Select an empty array shell from the Controls>>Modern>>Array,Matrix,and Clusters
Drag a valid data object (i.e. numeric, Boolean, String, etc..) into the array shell.
To increase the size of the array use the positioning tool and select the array resize handle and drag it to increase the size/number of elements
The block diagram terminal of an array 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 array
6
Introduction to ATE
Creating Arrays 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 number
Demonstrate with auto Indexing enabled
Demonstrate with auto indexing disabled
7
Introduction to ATE
Passing Arrays into loops
It is also possible to pass arrays into loops one element at a time
If an array is supplied as an input to a loop and auto-indexing is selected, the array will enter the loop one element at a time for each iteration
If indexing is disabled, the entire array is passed into the loop on the first iteration
Demonstration – passing array data into a loop with auto-indexing enabled
8
Introduction to ATE
Array Dimensions
2-D Array
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 array and selecting add dimension or by dragging the index resize handle
9
Introduction to ATE
Creating 2-D Arrays with loops
Just like 1-D Arrays, 2-D
Answered 1 days AfterMar 15, 2022

Answer To: Electronic Engineering Technology Electronic Engineering Technician Automated Test Equipment - EETD...

Nidhi answered on Mar 17 2022
52 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