Unit 3
Virtual Instrumentation
Virtual instrumentation combines mainstream commercial technologies. such as C, with flexible software and a wide variety of measurement and control hardware, so engineers and scientists can create user-defined systems that meet their exact application needs. With virtual instrumentation, engineers and scientists reduce development time, design higher quality products, and lower their design costs.
Graphical Programming techniques:
LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to text-based programming languages, where instructions determine program execution, LabVIEW uses dataflow programming, where the flow of data determines execution order.
LabVIEW programs are called virtual instruments (VIs). Controls are inputs and indicators are outputs.
Each VI contains three main parts:
•Front Panel – How the user interacts with the VI.
•Block Diagram – The code that controls the program.
•Icon/Connector – Means of connecting a VI to other VIs.
In LabVIEW, you build a user interface by using a set of tools and objects. The user interface is known as the front panel. You then add code using graphical representations of functions to control the front panel objects. The block diagram contains this code. In some ways, the block diagram resembles a flowchart
Users interact with the Front Panel when the program is running. Users can control the program, change inputs, and see data updated in real-time.
Controls are used for inputs such as adjusting a slide control to set an alarm value, turning a switch on or off, or to stop a program. Indicators are used as outputs. Thermometers, lights, and other indicators display output values from the program. These may include data, program states, and other information. Every front panel control or indicator has a corresponding terminal on the block diagram. When a VI is run, values from controls flow through the block diagram, where they are used in the functions on the diagram, and the results are passed into other functions or indicators through wires.
Figure 1. LABVIEW
If you see the diagram
Front Panel
Controls = Inputs
Indicators = Outputs
Block Diagram
Accompanying “program” for the front panel
Components “wired” together
Key Take-Aways:
Virtual instrumentation is necessary because it is flexible. It delivers instrumentation with the rapid adaptability required for today's concept, product, and process design, development, and delivery.
Data Types
Boolean:
Boolean data types consist of only two values i.e. true and false. It is a logical data type providing the output in the form of 0 or 1 specifying false and true respectively. The Boolean data type is indicated by green data wires. LabView stores the Boolean data as 8-bit values.
Numeric:
Numeric data types are represented as floating-point numbers, complex numbers, signed-unsigned integers, and fixed-point numbers. All the Integers either signed or Unsigned are indicated by blue data wires.
Strings:
Any sequence of displayable and non-displayable ASCII characters data is known as Strings data type.
Array:
Arrays can be distinguished as a group of specific data types. They are determined by thicker data wires. In an array, we can store numeric, string, double, or even Boolean data types.
Figure 2. Array
You can create an array of any data type in two simple steps:
Figure 3. Numeric array data type .
Figure 4. Increase in number of array
This will increase the size of an array according to the number of elements. Moreover, to store values in the array enter the values in the respective blocks.
Cluster:
Clusters are the data type which consists of different type of data in a single unit that combines Boolean, numeric, and string in a single value. This data type is indicated by thicker brown color data wire.
Figure 5. Cluster
Creating a cluster is similar to creating an array. You can add the cluster shell on the front panel. Furthermore, you can add the data objects by simply dragging the elements which can be numeric, Boolean, or any other data types.
Figure 6. Adding data to cluster
In the above figure, we can see the cluster containing three data types: a string, a Boolean switch, and a numeric.
Error cluster:
Error clusters are a special type of cluster, which is used to provide warnings and error messages. Error clusters are denoted by a dark yellow data wire pattern.
Error clusters are constructed from Boolean status, a string source, and a numeric error code.
The error cluster has two functions i.e. Error In the function which is used to detect the error in the function and Error out Function which is used to return the error information to the users and stop the execution of the program.
Waveform:
The waveform data type that is used to store and display periodic signal measurements is the waveform creates a graph and charts of the particular data. It provides you with the exact and precise information about your data in charts and graphs form. The waveform data type is also a kind of cluster that consists of the following components:
Component | Description |
T0 | This represents the time at which the function starts |
Dt | Double data type indicating the difference in time between each function |
Y | This is a 1D array containing the value of the particular function |
Figure 7. Enum data type
Enums:
Enums are the combination of data types mainly consisting of a pair of data values i.e. a string and a numeric value. For example, we create an Enum named ‘Month’. The value pairs in the fields can be placed as January – 1, or February – 10, and so on. The below mention figure shows an Enum data type with month:
Figure 8. Enum Properties
Advantages of virtual instrumentation
While loop:
A while loop is a structure to execute a block of code repeatedly until a given condition is met. When the VI runs, the code inside the While Loop executes, and then the terminal condition is evaluated.
Figure 9. While loop
Unlike a For Loop, While Loop execution does not depend on iteration count; thus, a While Loop executes indefinitely if the condition never occurs.
A for loop is a structure you use to execute a block of code a set number of times. When the VI runs, the iteration count is evaluated, and then the code is executed.
Figure 10. For loop
A For Loop can be configured to conditionally stop code execution in addition to its iteration-based exit. In these cases, the code will execute until the count terminal setting is reached or the condition is met.
Clusters and graphs:
Clusters group data elements of mixed types, such as a bundle of wires, as in a telephone cable, where each wire in the cable represents a different element of the cluster. A cluster is similar to a record or a struct in text-based programming languages. Bundling several data elements into clusters eliminates wire clutter on the block diagram and reduces the number of connector pane terminals that subVIs need. T Clusters of numerics sometimes referred to as points, have a brown wire pattern and data type icon. Numeric clusters can be wired to Numeric functions, such as Add or Square Root, to perform the same operation simultaneously on all elements of the cluster.
Figure 11. Block diagram clusters.
Graphs display only the most recent array of values written to them and do not have a history of data. Graphs and charts differ in the way they display and update data. VIs with graphs usually collect the data in an array and then plot the data to the graph, which is like a spreadsheet that first stores the data then generates a plot of it. In contrast, a chart appends new data points to those already in the display. On a chart, the current reading or measurement in context with data previously acquired can be viewed.
Contains one or more subdiagrams, or cases, exactly one of which executes when the structure executes. The value wired to the case selector determines which case to execute.
Components of a Case Structure
Figure12. Components of the case structure
Selector label—Displays the value(s) for which the associated case executes. You can specify a single value or a range of values. The selector label to specify the default case.
Sub-diagram(case)—Contains the code that executes when the value wired to the case selector matches the value that appears in the selector label
Case selector—Selects which case to execute based on the value of the input data. The input data can be a Boolean, string, integer, enumerated type, or error cluster
Formula Nodes:
It is a software that is a convenient, text-based node you can use to perform complicated mathematical operations on a block diagram using the C- syntax structure. It is most useful for equations that have many variables
The text-based code simplifies the block diagram and increases its readability.
Figure13. Formula Nodes
Industry 4.0 is a structured system, that uses the concept of a Smart Factory and uses the cybernetic solution and digital communication in industrial products and services. It is a transversal process, irrespective of the business area, that makes industrial production entirely automated and interconnected.
Smart manufacturing to establish remote and monitoring assistance system, a solution that actively contributes to improving the performance in industrial plant. Companies can supervise, check, and set the variables of the machine or the entire production process.
Key Take-Aways:
The foundation of Industry 4.0 is the Industrial Internet of Things (IIoT). The basis of this connectivity is the sensors that transmit data to a control computer. Without sensors collecting information, the IIoT doesn’t exist.
References:
Unit 3
Virtual Instrumentation
Virtual instrumentation combines mainstream commercial technologies. such as C, with flexible software and a wide variety of measurement and control hardware, so engineers and scientists can create user-defined systems that meet their exact application needs. With virtual instrumentation, engineers and scientists reduce development time, design higher quality products, and lower their design costs.
Graphical Programming techniques:
LabVIEW is a graphical programming language that uses icons instead of lines of text to create applications. In contrast to text-based programming languages, where instructions determine program execution, LabVIEW uses dataflow programming, where the flow of data determines execution order.
LabVIEW programs are called virtual instruments (VIs). Controls are inputs and indicators are outputs.
Each VI contains three main parts:
•Front Panel – How the user interacts with the VI.
•Block Diagram – The code that controls the program.
•Icon/Connector – Means of connecting a VI to other VIs.
In LabVIEW, you build a user interface by using a set of tools and objects. The user interface is known as the front panel. You then add code using graphical representations of functions to control the front panel objects. The block diagram contains this code. In some ways, the block diagram resembles a flowchart
Users interact with the Front Panel when the program is running. Users can control the program, change inputs, and see data updated in real-time.
Controls are used for inputs such as adjusting a slide control to set an alarm value, turning a switch on or off, or to stop a program. Indicators are used as outputs. Thermometers, lights, and other indicators display output values from the program. These may include data, program states, and other information. Every front panel control or indicator has a corresponding terminal on the block diagram. When a VI is run, values from controls flow through the block diagram, where they are used in the functions on the diagram, and the results are passed into other functions or indicators through wires.
Figure 1. LABVIEW
If you see the diagram
Front Panel
Controls = Inputs
Indicators = Outputs
Block Diagram
Accompanying “program” for the front panel
Components “wired” together
Key Take-Aways:
Virtual instrumentation is necessary because it is flexible. It delivers instrumentation with the rapid adaptability required for today's concept, product, and process design, development, and delivery.
Data Types
Boolean:
Boolean data types consist of only two values i.e. true and false. It is a logical data type providing the output in the form of 0 or 1 specifying false and true respectively. The Boolean data type is indicated by green data wires. LabView stores the Boolean data as 8-bit values.
Numeric:
Numeric data types are represented as floating-point numbers, complex numbers, signed-unsigned integers, and fixed-point numbers. All the Integers either signed or Unsigned are indicated by blue data wires.
Strings:
Any sequence of displayable and non-displayable ASCII characters data is known as Strings data type.
Array:
Arrays can be distinguished as a group of specific data types. They are determined by thicker data wires. In an array, we can store numeric, string, double, or even Boolean data types.
Figure 2. Array
You can create an array of any data type in two simple steps:
Figure 3. Numeric array data type .
Figure 4. Increase in number of array
This will increase the size of an array according to the number of elements. Moreover, to store values in the array enter the values in the respective blocks.
Cluster:
Clusters are the data type which consists of different type of data in a single unit that combines Boolean, numeric, and string in a single value. This data type is indicated by thicker brown color data wire.
Figure 5. Cluster
Creating a cluster is similar to creating an array. You can add the cluster shell on the front panel. Furthermore, you can add the data objects by simply dragging the elements which can be numeric, Boolean, or any other data types.
Figure 6. Adding data to cluster
In the above figure, we can see the cluster containing three data types: a string, a Boolean switch, and a numeric.
Error cluster:
Error clusters are a special type of cluster, which is used to provide warnings and error messages. Error clusters are denoted by a dark yellow data wire pattern.
Error clusters are constructed from Boolean status, a string source, and a numeric error code.
The error cluster has two functions i.e. Error In the function which is used to detect the error in the function and Error out Function which is used to return the error information to the users and stop the execution of the program.
Waveform:
The waveform data type that is used to store and display periodic signal measurements is the waveform creates a graph and charts of the particular data. It provides you with the exact and precise information about your data in charts and graphs form. The waveform data type is also a kind of cluster that consists of the following components:
Component | Description |
T0 | This represents the time at which the function starts |
Dt | Double data type indicating the difference in time between each function |
Y | This is a 1D array containing the value of the particular function |
Figure 7. Enum data type
Enums:
Enums are the combination of data types mainly consisting of a pair of data values i.e. a string and a numeric value. For example, we create an Enum named ‘Month’. The value pairs in the fields can be placed as January – 1, or February – 10, and so on. The below mention figure shows an Enum data type with month:
Figure 8. Enum Properties
Advantages of virtual instrumentation
While loop:
A while loop is a structure to execute a block of code repeatedly until a given condition is met. When the VI runs, the code inside the While Loop executes, and then the terminal condition is evaluated.
Figure 9. While loop
Unlike a For Loop, While Loop execution does not depend on iteration count; thus, a While Loop executes indefinitely if the condition never occurs.
A for loop is a structure you use to execute a block of code a set number of times. When the VI runs, the iteration count is evaluated, and then the code is executed.
Figure 10. For loop
A For Loop can be configured to conditionally stop code execution in addition to its iteration-based exit. In these cases, the code will execute until the count terminal setting is reached or the condition is met.
Clusters and graphs:
Clusters group data elements of mixed types, such as a bundle of wires, as in a telephone cable, where each wire in the cable represents a different element of the cluster. A cluster is similar to a record or a struct in text-based programming languages. Bundling several data elements into clusters eliminates wire clutter on the block diagram and reduces the number of connector pane terminals that subVIs need. T Clusters of numerics sometimes referred to as points, have a brown wire pattern and data type icon. Numeric clusters can be wired to Numeric functions, such as Add or Square Root, to perform the same operation simultaneously on all elements of the cluster.
Figure 11. Block diagram clusters.
Graphs display only the most recent array of values written to them and do not have a history of data. Graphs and charts differ in the way they display and update data. VIs with graphs usually collect the data in an array and then plot the data to the graph, which is like a spreadsheet that first stores the data then generates a plot of it. In contrast, a chart appends new data points to those already in the display. On a chart, the current reading or measurement in context with data previously acquired can be viewed.
Contains one or more subdiagrams, or cases, exactly one of which executes when the structure executes. The value wired to the case selector determines which case to execute.
Components of a Case Structure
Figure12. Components of the case structure
Selector label—Displays the value(s) for which the associated case executes. You can specify a single value or a range of values. The selector label to specify the default case.
Sub-diagram(case)—Contains the code that executes when the value wired to the case selector matches the value that appears in the selector label
Case selector—Selects which case to execute based on the value of the input data. The input data can be a Boolean, string, integer, enumerated type, or error cluster
Formula Nodes:
It is a software that is a convenient, text-based node you can use to perform complicated mathematical operations on a block diagram using the C- syntax structure. It is most useful for equations that have many variables
The text-based code simplifies the block diagram and increases its readability.
Figure13. Formula Nodes
Industry 4.0 is a structured system, that uses the concept of a Smart Factory and uses the cybernetic solution and digital communication in industrial products and services. It is a transversal process, irrespective of the business area, that makes industrial production entirely automated and interconnected.
Smart manufacturing to establish remote and monitoring assistance system, a solution that actively contributes to improving the performance in industrial plant. Companies can supervise, check, and set the variables of the machine or the entire production process.
Key Take-Aways:
The foundation of Industry 4.0 is the Industrial Internet of Things (IIoT). The basis of this connectivity is the sensors that transmit data to a control computer. Without sensors collecting information, the IIoT doesn’t exist.
References: