SlideShare a Scribd company logo
1 of 20
VI Programming
Arrays, Clusters
Strings
File IO
1
modern electronic instrumentation unit 4
ARRAYS
• An array consists of elements of similar data types
• Is either a control or an indicator -it cannot contain both
• Arrays are very helpful to store a history of repetitive
computations
• Array elements are ordered. Each element in an array
has a corresponding index value
• One-dimensional (1D) array contains n elements, the
index range is from 0 to n – 1
2
modern electronic instrumentation unit 4
•Controls palette >> Modern » Array, Matrix, & Cluster
and drag the Array shell
•Drag and drop a numeric indicator inside the Array shell
•Expand it and display multiple elements
3
modern electronic instrumentation unit 4
• A 2D array stores elements in a grid or matrix
• Each element in a 2D array has two corresponding index
values, a row index and a column index
• Right click on index display to add dimension
4
modern electronic instrumentation unit 4
• Elements of the arrays created have been dimmed zeros
• Dimmed array element indicates that the element is
uninitialized
• To initialize an element, click inside the element and
replace the dimmed 0 with any number
5
modern electronic instrumentation unit 4
• Change the numeric type to a 32-bit integer.
• Right-click on the array and select Representation»I32
6
modern electronic instrumentation unit 4
• If you wire an array as an input to a for loop, LabVIEW
provides the option to automatically set the count terminal
of the for loop to the size of the array using the Auto-
Indexing feature.
• You can enable or disable the Auto-Indexing option by
right-clicking the loop tunnel wired to the array and
selecting Enable Indexing (Disable Indexing).
• If you enable Auto-Indexing, each iteration of the for loop
is passed the corresponding element of the array.
• When you wire a value as the output of a for loop,
enabling Auto-Indexing outputs an array.
• The array is equal in size to the number of iterations
executed by the for loop and contains the output values of
the for loop.
Auto-Indexing
7
modern electronic instrumentation unit 4
Only initialized will be used for any operation
8
modern electronic instrumentation unit 4
CLUSTERS
• Clusters group data elements of mixed types.
• A cluster is similar to a record or a struct in text-based
programming languages.
• Similar to arrays, a cluster is either a control or an
indicator and cannot contain a mixture of controls and
indicators.
• The difference between clusters and arrays is that a
particular cluster has a fixed size, where a particular array
can vary in size.
• Also, a cluster can contain mixed data types, but an array
can contain only one data type.
9
modern electronic instrumentation unit 4
• Controls palette >> Modern » Array, Matrix, & Cluster
and drag the Cluster shell
• Add data types (numeric, string, boolean, etc)
10
modern electronic instrumentation unit 4
• To create cluster constant in block diagram
• Programming>>Cluster, Class, &variant, cluster constant.
• Drag and drop different data types into cluster constant
shell
11
modern electronic instrumentation unit 4
• If you already have a cluster control or indicator and want
to make a cluster constant that contains the same data
types,
• Make a copy of the cluster control or indicator on the
block diagram and then
• Right-click on the copy and select Change to Constant
from the shortcut menu
12
modern electronic instrumentation unit 4
Cluster functions often used to manipulate clusters are the
Bundle,
Unbundle,
Bundle By Name, and
Unbundle By Name functions
bundle
13
modern electronic instrumentation unit 4
LabVIEW Strings
• A string is a collection of ASCII characters.
• In instrument control, you may pass numeric
data as character strings then convert these
strings back to numeric to process the data.
14
modern electronic instrumentation unit 4
15
modern electronic instrumentation unit 4
16
modern electronic instrumentation unit 4
FILE I/O
• File I/O operations pass data to and from files.
• A typical file I/O operation involves three steps.
1- Create or open a file.
2- Read from or write to
3- Close the file
• Read or write on a file takes
only after opening a file
modern electronic instrumentation unit 4 17
• Reads or write data from an open file
specified by refnum
modern electronic instrumentation unit 4 18
Open/create/replace
Read
modern electronic instrumentation unit 4 19
Other File I/O Functions
• Read or Write to Waveform file
• Read or Write to Spreadsheet file
– Converts contents to array (read)
- uses array to write
modern electronic instrumentation unit 4 20

More Related Content

What's hot

Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the wallsHoang Nguyen
 
ArrayList in JAVA
ArrayList in JAVAArrayList in JAVA
ArrayList in JAVASAGARDAVE29
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)Tech_MX
 
R data-structures-3
R data-structures-3R data-structures-3
R data-structures-3Victor Ordu
 
R data structures-2
R data structures-2R data structures-2
R data structures-2Victor Ordu
 
R Data Structures (Part 1)
R Data Structures (Part 1)R Data Structures (Part 1)
R Data Structures (Part 1)Victor Ordu
 
Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2AzharIqbal710687
 
Data structures lectures no 1
Data structures lectures no 1Data structures lectures no 1
Data structures lectures no 1AzharIqbal710687
 
Data structures Lecture no.3
Data structures Lecture no.3Data structures Lecture no.3
Data structures Lecture no.3AzharIqbal710687
 
Arrays declartion and initialization
Arrays declartion and initializationArrays declartion and initialization
Arrays declartion and initializationsangrampatil81
 
Collection framework
Collection frameworkCollection framework
Collection frameworkJainul Musani
 
Practice on Practical SQL
Practice on Practical SQLPractice on Practical SQL
Practice on Practical SQLHideshi Ogoshi
 
Arrays accessing using for loops
Arrays accessing using for loopsArrays accessing using for loops
Arrays accessing using for loopssangrampatil81
 
4 chapter3 list_stackqueuepart1
4 chapter3 list_stackqueuepart14 chapter3 list_stackqueuepart1
4 chapter3 list_stackqueuepart1SSE_AndyLi
 

What's hot (20)

Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the walls
 
ArrayList in JAVA
ArrayList in JAVAArrayList in JAVA
ArrayList in JAVA
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
 
R data-structures-3
R data-structures-3R data-structures-3
R data-structures-3
 
R data structures-2
R data structures-2R data structures-2
R data structures-2
 
R Data Structures (Part 1)
R Data Structures (Part 1)R Data Structures (Part 1)
R Data Structures (Part 1)
 
Presentation of array
Presentation of arrayPresentation of array
Presentation of array
 
Data structures Lecture no. 2
Data structures Lecture no. 2Data structures Lecture no. 2
Data structures Lecture no. 2
 
Data Structures 01
Data Structures 01Data Structures 01
Data Structures 01
 
Data structures lectures no 1
Data structures lectures no 1Data structures lectures no 1
Data structures lectures no 1
 
Data structures Lecture no.3
Data structures Lecture no.3Data structures Lecture no.3
Data structures Lecture no.3
 
Arrays declartion and initialization
Arrays declartion and initializationArrays declartion and initialization
Arrays declartion and initialization
 
Arrays in C
Arrays in CArrays in C
Arrays in C
 
Collection framework
Collection frameworkCollection framework
Collection framework
 
Sorting
SortingSorting
Sorting
 
Practice on Practical SQL
Practice on Practical SQLPractice on Practical SQL
Practice on Practical SQL
 
Arrays accessing using for loops
Arrays accessing using for loopsArrays accessing using for loops
Arrays accessing using for loops
 
Ppt lesson 12
Ppt lesson 12Ppt lesson 12
Ppt lesson 12
 
4 chapter3 list_stackqueuepart1
4 chapter3 list_stackqueuepart14 chapter3 list_stackqueuepart1
4 chapter3 list_stackqueuepart1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

Similar to Ei u4

DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptxAnuJoseph95
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxsabithabanu83
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structuresSenthil Murugan
 
Data Structure & Algorithms - Operations
Data Structure & Algorithms - OperationsData Structure & Algorithms - Operations
Data Structure & Algorithms - Operationsbabuk110
 
Standard template library
Standard template libraryStandard template library
Standard template librarySukriti Singh
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxkalai75
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm. Abdul salam
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptxMumtaz
 
1.Introduction to Data Structures and Algorithms.pptx
1.Introduction to Data Structures and Algorithms.pptx1.Introduction to Data Structures and Algorithms.pptx
1.Introduction to Data Structures and Algorithms.pptxBlueSwede
 
0-Slot18-19-20-ContiguousStorage.pdf
0-Slot18-19-20-ContiguousStorage.pdf0-Slot18-19-20-ContiguousStorage.pdf
0-Slot18-19-20-ContiguousStorage.pdfssusere19c741
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementationLavanyaJ28
 

Similar to Ei u4 (20)

lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
DS Module1 (1).pptx
DS Module1 (1).pptxDS Module1 (1).pptx
DS Module1 (1).pptx
 
stack.pptx
stack.pptxstack.pptx
stack.pptx
 
II B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptxII B.Sc IT DATA STRUCTURES.pptx
II B.Sc IT DATA STRUCTURES.pptx
 
Unit 1.ppt
Unit 1.pptUnit 1.ppt
Unit 1.ppt
 
ds bridge.pptx
ds bridge.pptxds bridge.pptx
ds bridge.pptx
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
Unit 2 linear data structures
Unit 2   linear data structuresUnit 2   linear data structures
Unit 2 linear data structures
 
Data structure
Data structureData structure
Data structure
 
Data structures
Data structuresData structures
Data structures
 
Data Structure & Algorithms - Operations
Data Structure & Algorithms - OperationsData Structure & Algorithms - Operations
Data Structure & Algorithms - Operations
 
Standard template library
Standard template libraryStandard template library
Standard template library
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
 
Data structure and algorithm.
Data structure and algorithm. Data structure and algorithm.
Data structure and algorithm.
 
Arrays
ArraysArrays
Arrays
 
Data Structure & Algorithm.pptx
Data Structure & Algorithm.pptxData Structure & Algorithm.pptx
Data Structure & Algorithm.pptx
 
1.Introduction to Data Structures and Algorithms.pptx
1.Introduction to Data Structures and Algorithms.pptx1.Introduction to Data Structures and Algorithms.pptx
1.Introduction to Data Structures and Algorithms.pptx
 
0-Slot18-19-20-ContiguousStorage.pdf
0-Slot18-19-20-ContiguousStorage.pdf0-Slot18-19-20-ContiguousStorage.pdf
0-Slot18-19-20-ContiguousStorage.pdf
 
ARRAYS.pptx
ARRAYS.pptxARRAYS.pptx
ARRAYS.pptx
 
Unit 1 array based implementation
Unit 1  array based implementationUnit 1  array based implementation
Unit 1 array based implementation
 

Recently uploaded

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 

Recently uploaded (20)

(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 

Ei u4

  • 1. VI Programming Arrays, Clusters Strings File IO 1 modern electronic instrumentation unit 4
  • 2. ARRAYS • An array consists of elements of similar data types • Is either a control or an indicator -it cannot contain both • Arrays are very helpful to store a history of repetitive computations • Array elements are ordered. Each element in an array has a corresponding index value • One-dimensional (1D) array contains n elements, the index range is from 0 to n – 1 2 modern electronic instrumentation unit 4
  • 3. •Controls palette >> Modern » Array, Matrix, & Cluster and drag the Array shell •Drag and drop a numeric indicator inside the Array shell •Expand it and display multiple elements 3 modern electronic instrumentation unit 4
  • 4. • A 2D array stores elements in a grid or matrix • Each element in a 2D array has two corresponding index values, a row index and a column index • Right click on index display to add dimension 4 modern electronic instrumentation unit 4
  • 5. • Elements of the arrays created have been dimmed zeros • Dimmed array element indicates that the element is uninitialized • To initialize an element, click inside the element and replace the dimmed 0 with any number 5 modern electronic instrumentation unit 4
  • 6. • Change the numeric type to a 32-bit integer. • Right-click on the array and select Representation»I32 6 modern electronic instrumentation unit 4
  • 7. • If you wire an array as an input to a for loop, LabVIEW provides the option to automatically set the count terminal of the for loop to the size of the array using the Auto- Indexing feature. • You can enable or disable the Auto-Indexing option by right-clicking the loop tunnel wired to the array and selecting Enable Indexing (Disable Indexing). • If you enable Auto-Indexing, each iteration of the for loop is passed the corresponding element of the array. • When you wire a value as the output of a for loop, enabling Auto-Indexing outputs an array. • The array is equal in size to the number of iterations executed by the for loop and contains the output values of the for loop. Auto-Indexing 7 modern electronic instrumentation unit 4
  • 8. Only initialized will be used for any operation 8 modern electronic instrumentation unit 4
  • 9. CLUSTERS • Clusters group data elements of mixed types. • A cluster is similar to a record or a struct in text-based programming languages. • Similar to arrays, a cluster is either a control or an indicator and cannot contain a mixture of controls and indicators. • The difference between clusters and arrays is that a particular cluster has a fixed size, where a particular array can vary in size. • Also, a cluster can contain mixed data types, but an array can contain only one data type. 9 modern electronic instrumentation unit 4
  • 10. • Controls palette >> Modern » Array, Matrix, & Cluster and drag the Cluster shell • Add data types (numeric, string, boolean, etc) 10 modern electronic instrumentation unit 4
  • 11. • To create cluster constant in block diagram • Programming>>Cluster, Class, &variant, cluster constant. • Drag and drop different data types into cluster constant shell 11 modern electronic instrumentation unit 4
  • 12. • If you already have a cluster control or indicator and want to make a cluster constant that contains the same data types, • Make a copy of the cluster control or indicator on the block diagram and then • Right-click on the copy and select Change to Constant from the shortcut menu 12 modern electronic instrumentation unit 4
  • 13. Cluster functions often used to manipulate clusters are the Bundle, Unbundle, Bundle By Name, and Unbundle By Name functions bundle 13 modern electronic instrumentation unit 4
  • 14. LabVIEW Strings • A string is a collection of ASCII characters. • In instrument control, you may pass numeric data as character strings then convert these strings back to numeric to process the data. 14 modern electronic instrumentation unit 4
  • 17. FILE I/O • File I/O operations pass data to and from files. • A typical file I/O operation involves three steps. 1- Create or open a file. 2- Read from or write to 3- Close the file • Read or write on a file takes only after opening a file modern electronic instrumentation unit 4 17
  • 18. • Reads or write data from an open file specified by refnum modern electronic instrumentation unit 4 18 Open/create/replace Read
  • 20. Other File I/O Functions • Read or Write to Waveform file • Read or Write to Spreadsheet file – Converts contents to array (read) - uses array to write modern electronic instrumentation unit 4 20