DAQ

Ace your homework & exams now with Quizwiz!

Analog input (AI)

Signal that varies continuously

Icon and connector pane- standards

top terminals are reserved for references, bottom terminals are reserved for error clusters.

Using subvis- handling errors

use a case structure to handle errors passed into the subVI -avoid using error handles VIs inside subVIs

Variables- using between VI's

use a global variable or a single process shared variable to share data between multiple vis

Input/Output (I/O) process 1) determinism 2) field programmable gate array (FPGA)

!) deterministic system is system in which no randomness is involved in development of future states 2) integrated circuit that can be programmed to deterministically perform a task

Do the DIO channels output signals or measure input signals?

Both

Response time

sensors do not change output state immediately - time required for a sensor output to change from its previous state to a final settled value within a tolerance band of the correct new value

digital signal conditioning

shoudl not connect digital signals directly into daq board without isolation because of possibility of large voltage spikes - can use solid state relays to sense high-voltage field signals and covert them to digital signals

Sensitivity

slope of output characteristic curve the minimum input of physical parameter that will create a detectable output change

Resolution

smallest detectable incremental change of input parameter that can be detected in output signal - can be expressed either as proportion of reading

Variables can be the following types

*Local- stores data in front panel controls and indicators *Global- stores data in special repositories that can be accessed from multiple VIs *Functional global- stores data in while loop shift registers *shared- transfers data between various distributed targets connected together over a network

SubVI-

- a VI within another VI - they correspond to subroutines in text-based programming languages - the upper right corner of front pannel and block diagram displays icon for vi

race conditions- critical code

- a crit section of code is code that may behave inconsistently if some shared resource is altered while its running - if one loop interrupts another loop while its executing crit code than race condition can occur -eliminate race conditions by identifying and protecting crit code with functional global variables

Analog I/O definition -device -sample -channels -scan -waveform

- device is number that NI-DAQ assigns to I/O board - sample is one data point - channel specify physical source of data - scan is a sample taken from each channel, represents data versus channel number - waveform is a set of samples from one channel collected over period of time.

SUMMARY

- in labview you cannot pass data between parallel loops with wire, use variable - 4types of variable; local, global, functional global and shared - always initialise variables before VI runs - race condition is situation where timing of events or scheduling of tasks may unintentionally affect output or data value -avoid race conditions by; controlling sharing resources, properly sequencing instructions, identifying and protecting crit sections within code, reducing use variables -modularity; degree to which program composed of discrete modules (sub vis) such that change to one module has minimal impact on other modules -subvis; improve ability to understand code, efficient, enable quicker code debugging

race conditions- shared resources

- race conditions are most common when two tasks have both read and write access to a resource - a resource is any entity that is shared between the processes; most common resources are shared data storage such as variables. - minimise shared resources and limit number of writers to remaining shared resources - most race conditions only occur when a resource has multiple writers.

2D array

- stores elements in grid - requires column index and row index to locate element, which both are zero-based -uninitialised arrays have dimension but no elements

What range of voltages can you measure with the AI channels?

-10V to +10V

Attenuation

-Attenuation is the opposite of amplication -necessary when voltages to be digitized beyond the input range -this form of signal conditioning diminishes the amplitude of the input signal so that the conditioned signal is within range of ADC

Digital I/O

-Electrical signals that transfer digital data using wire - used to control or measure digital or finite state devices - use digital signals as clocks or trigges to control other measurements

Hardware

-Hardware available is a limiting factor for real time storage of large amounts of data - hardrive access time and fragmentation can reduce max rate at which data can be acquired and streamed - for systems that must acquire high-frequency signals, high speed hard drive with large memory space needed - overall communication speed is directly proportional to clock freq of processor chip and bit length of bus inversely proportional to bit length of processor

Race condition

-a situation where the timing of events or rescheduling of tasks may unintentionally affect an output or data value -race conditions are a common problem for programs that execute multiple tasks in parallel and share data between the tasks -difficult to identify or debug =often the code with a race condition can return the same result thousands of times in testing, but still be capable of returning different result

Variables

-cannot pass data between parallel loops with a wire -variables allow you to circumvent normal dataflow by passing data from one place to another without connecting the two places with a wire.

Clusters- array vs cluster

-clusters differ from arrays in that they are fixed size -clusters contain mixed data types, arrays contain only one data type -like an array, a cluster is either a control or an indicator but cant contain a mixture

state machines

-commonly used to create user interfaces, where different user actions send the user interface into different states - commonly used to process tests where state represents each segment of process

state machines- infrastructure

-consists of set of states and transition function that maps to next state -each state can lead to one or multiple states or end the process flow

Couters

-digital timing device used for event counting, frequency measurement, period measurement, position measurement and pulse generation -has a fixed number it can count to as determined by resolution of counter eg 24 bit counter can count to : 2^(counter,resoltuion)-1=(2^24)-1=16,777,215

Arrays- auto-indexing input

-for loop executes number of times equal to number of elements in array -if iteration count terminal is wired and arrays of different sizes are wired to auto-indexed tunnels, the number of iterations becomes smallest of choices -auto indexed output arrays are equal in size to number of iterations

Functional global variables

-general form of functional global variable includes an unitialised shift register with single iteration For or While loop

Clusters

-group data elements of mixed types -bundling several data elements into cluster eliminates wire clutter and reduces inputs/outputs for subVIs -most clusters have pink wire -clusters of numeric values have brown wire and data type terminal -you can wire brown numeric clusters to numeric functions to perform same operation simultaneously on all elements of cluster.

Why use subVIs

-improve ability to quickly understand code functionality -efficient way of programming as can be reused -enable quicker code debugging as there modularity enables quick testing

Analogue to Digital Conversion (ADC) & Digital to Analogue Conversion (DAC)

-intergrated citcuits designed to translate data from continous time analog signals into discrete digital numbers 0101 LHS is most significant and RHS is least from lhs: 2^3*0=0, 2^2*1=4, 2^1*0=0, 2^0*1=1 =1+0+4+0=5

Two different ways to communicate digital signals. -seriel communication -parallel communication

-one bit at a time sequentially over a communication bus -passing multiple bits simultaneously

Aliasing

-phenomenon that arises when signal is under sampled (sampled too slowly). use filter to prevent this -when the nyquist criterion is violated, freq components above half the sampling freq appear as freq components below half the sampling freq resulting in an erroneous representation of the signal.

multiplexing

-typically the digitizer is most expensive part of a daq system -multiplexing involves routing a number of signals into single digitizer, cost effective and necessary for any high channel count application

DAQ four standard elements

1) Analog input (AI) 2) Analog output (AO) 3) Digital I/O (DIO) 4) Counters (CTR)

benefits of using a state machine instead of sequential structure

1) You can change the order of the sequence 2) You can repeat individual items in the sequence 3) You can set conditions to determine when an item in the sequence should execute 4) You can stop the program at any point in the sequence

Input/Output (I/O) process 1) buffer 2) programmed I/O 3) Memory mapping

1) an area of PC memory treserved for data, DMA allows data to be acquired directly into computer memory. Not using a buffer means you must handle each data point one at a time 2) data transfer mechanism in which a buffer is not used- instead the computer reads and writes directly to device 3) reads and writes to a device directly from the programme, this avoids the overhead of delegating the reads and writes to kernel-level software

Avoid race conditions by;

1) controlling shared resources 2) properly sequencing instructions 3) identifying and protecting critical section within your code 4) reducing use of variables

Input/Output (I/O) process 1) direct memory access (DMA) 2) Interrupt request (IRQ)

1) data trans between DAQ and computer memory without involvement of the CPU. Fastest available data transfer mechanism. Enables CPU to focus on complex processing tasks. 2) IRQ transfers reply on CPU to service data transfer requests. Device notifies CPU when it is ready to transfer data. Data transfer speed is tightly coupled to the rate which the CPU can service the interrupt requests.

Use 1) buffered 2) non buffered I/O when....

1) many samples acquire at a rate faster than is piratical to display, store or analyse in real time. Data is acquired continuously on the fly. Sampling period must be precise and uniform throughout the data samples. 2) Data set is small and short and reduced memory overhead is required

Choosing I/O card 1) How frequently must signals be sampled? 2) Type and precision of I/O channels

1) operate in 1-3KHz range, 1000-3000 samples per sec 2) Precision is dependant on accuracy and transient characteristics, depends on bit length, most converters are 12 bit.

when do you use 1) software triggering 2)hardware triggering

1) used needs to have explicit ontrol over DAQ operations -timing of event does not need to be precise 2) -timing a DAQ event needs to be precise - want to reduce software overhead - DAQ events need to be synchronised to external events

What two characteristics help classify the type of DAQ operation performed?

1) whether you use a buffer 2) whether you use an ext trigger to start, stop, or synchronise.

sensors categorization 1)active sensors 2)passive sensors 3)deflection sensor 4)null sensor

1)require external power source to operate 2)utilise the input to the sensor to power output 3)output of the sensor is proportional to measured quantity displayed 4)any deflection due to measured quantity is balanced by opposing calibrated force so imbalance detected

Hysteresis

A transducer should be capable of following changes of input parameter regardless of which direction the change is made - hysteresis is measure of this property

Which two terminals should you connect across to measure an analogue signal?

AGND& AI 0+ or AI 0- &AI 0+

Which of the following can be an input data type for case structure? e) Boolean. f) String. g) Numeric. h) Enum.

ALL

Boolean controls with variables

Boolean control with associated local variables must use switch mechanical action -boolean latch action is incompatible with local variables -the first local variable to read a boolean control with latch action would reset its value to default which is undesirable

If two loops; a) Data will be transferred between the For loops when they execute. b) The top For loop will execute after the bottom For loop has finished. c) Data cannot be transferred between the For loops as they execute. d) The output of 'Numeric' will be 2.

C and D Data will only pass out of a for loop when it has finished executing

Array

Consists of elements:data that makes up array dimension: the height length or depth An array can have one or more dimensions and as many as (2^31)- 1 element per dimension, memory permitting

What are the units of potentiometer gain

Degrees per volt

Why use digital signals?

Digital signals are basis for computers as analogue have to be converted through ADC before they are interpreted by computer. We can utilise digital signals to control motors through pulse width modulation. PMW involves control power supplied ot motor by switching a signal on and off at a high frequency. The average voltage supplied to motor is dependant on ratio of how long the signal is on/off

Parallelism

Finds the location in memory where the stop button data is stored and reads the memory location directly. This is how variables, notifiers and queues work

Wiring

If you wire a 10 element array to the x input of the add function and a 5 element array to the y input the output is a 5 element array. The for loop runs 5 times and the iterations are 0 based. Therefore the value of iteration indicators is 4.

clusters-error clusters

LABVIEW uses error clusters to pass error information error cluster contains following elements: 1)status: boolean value that reports true if error occurs 2) code: 32-bit signed integer that identifies error 3) source: string that identifies where the error occured

Filter with -lowpass -highpass -bandpass -bandreject may be passive or active in continuous or discrete time

Lowpass- removes noise, blocks unwanted frequencies ( if asks how much attenuation provided add the two dB values) Bandpass- remove/reject ynwanted noise within certain freq range, prevents noise caused by aliasing from higher freq

Sequential programming

Many of the VIS written accomplish sequential tasks. -use error cluster to force order of execution -you cannot stop execution part way through a sequence

Accuracy

Measure of how close the result is to 'true value'

When could you use a potentiometer as a sensor?

Measuring the position of an aircraft control surface

Triggering

Method which initiates, terminates or synchronises DAQ event - usually an analogue or digital signal whose condition is analysed to determine course of action - software triggering is easiest and most intuitive and hardware triggering lets the circuitry board take control adding more precision and control

Should you use variables in your VI whenever possible?

No, you should only use variables when necessary. Use wires to transfer data whenever possible.

state

Part of program that satisfies a condition, performs an action or waits for event

Analog output (AO)

Process of generating analog signals from computer. -available analog output types are voltage and current, to perform that output a compatible device must be installed

Noise

Random fluctuation in the value of input that causes random fluctuation in output value

Why does LED not flash?

The LED does not flash as the voltage applied is lower than the threshold voltage

What is the function of the while loop of the block diagram?

To repeat the code within it until the stop button wired to the while loop condition terminal is a true value.

What is a potentiometer? -single turn poterntiometer

Used to measure angular position. -can turn less than one full rev it outputs an absolute signal, its a three terminal resistor with a rotary sliding contact that creates an adjustable voltage divider. It will therefore output a voltage proportional to its angular position

Filtering

Used to reject unwanted noise within a certain frequency range

How do you disable automaic error handling?

Wire the error out cluster of SUbVI to the error in cluster of another sub VI

What do error clusters contain?

a boolean value, a numeric value and a string

Which of the following answers a)-d) are correct statements in relation to data types? (More than one answer may be correct) a) DBL precision data type represents non-integer values. b) Error clusters contain string data type. c) DBL precision data type represents integer values

a) CORRECT b) CORRECT c) No an integer data type represents integer values. d)They contain a Boolean value a numeric value and a string.

Which of the statements a)-d) are correct regarding the concept of Hysteresis. a) Hysteresis means that the change in a parameter is dependent on its previous state. b) Hysteresis means that the change in a parameter is independent of its previous state. c) A DAQ system with a low level of Hysteresis is desirable. d) A DAQ system with a high level of Hysteresis is desirable.

a) Correct the current state is not influenced by the previous states of the system. b) no c) Correct the current state is not influenced by the previous states of the system. d) no

Which of the following statements about Analogue to Digital Convertors (ADC's) and Digital to Analogue Convertors (DAC's) are correct? a) DAC's are optimised for resolution and sampling rate. b) ADC's are needed for DAQ systems that utilise Personal Computers. c) An analogue signal which is passed to an ADC and then to a DAC will be unaltered in comparison to the original signal. d) ADC's are optimised for either resolution or sampling rate

a) DAC's are usually optimised for one or the other b) CORRECT c) The conversion of an analogue signal to a digital one involves quantisation and as such the conversion back into an analogue signal will always lead to a difference. D) CORRECT

Which of the following statements are correct regarding the functionality of a Waveform Graph. a) A waveform graph used in a loop can display historical data. b) A waveform graph can plot x and y values. c) A waveform graph used in a loop cannot display historical data. d) A property node (history data) for the waveform graph can be utilised to clear the graph every time the .vi is executed.

a) No the graph will only display the current loop value. b) No you would need an XY graph. c) CORRECT d) CORRECT

Which of the following statements is correct about the concept of Sensitivity? a) The Sensitivity of a DAQ system is dependent on the Rise Time. b) The Sensitivity of a DAQ system is dependent on the frequency that data is acquired. c) Sensitivity for a DAQ system is measured in Volts. d) The Sensitivity of a system is defined as the slope of the output characteristic curve.

a) Sensitivity is independent of rise time. b) Sensitivity is independent of sampling frequency. c) it also depends on the parameter being measured, d) CORRECT

Which of the following cannot be used to pass data between multiple VIs? a) local variable b) global variable c) fuctional global variable d) single- process shared variable

a) local variable

On a subVI, which terminal setting causes an error if terminal not wired? a) required b) recommended c) optional

a) required

Which of the following are contents of the error cluster? a) status: boolean b) error: string c) code: 32 bit integer d) source: string

a) status: boolean c) code: 32 bit integer d) source: string

amplification G=Vo/Vi

amplifiers boost the level of the input signal to better match the range of the analog to digital converter, increasing the resolution and sensitivity -the range of frequencies with close to constant gain is knows as the bandwidth -the upper and lower frequencies define the bandwidth, called the corner or cuttoff frequencies

You must create a custom icon to use a VI as a subVI a) true b) false

b) false you do not need to create a custom icon to use a VI as a subVI, but is highly recommended to increase readability of code

sensors and transducers

both refer t componenets which convert energy into different forms. - main difference is a transducer is a device that can convert energy from one form to another - a sensor is a device that can detect a physical quantity and convert the data into an electrical signal

Calibration

comparison between measurements one measurement of known magnitude is set with one device and second measurement made in a similar a way as possible device with known correctness is standard

transition

condition, action, or event that causes the program to move to the next state

Signal conditioning

manipulation of a signal in such a way it meets requirements of next stage of processing

Which of the following must be used within a project a) local varibale b) global variable c) functional global variable d) single-process shared variable

d) single process shared variable

precision

degree of reproducibility of measurement

butterworth filters

filter designed to have as flat a frequency response as possible characteristics -smooth response at all frequencies -monotonic decrease from specified cut off freq -max flatness, with ideal response of unity in pass band and zero in stop band -half power freq

Filter classification

filters can be -linear/nonlinear -time invariant/variant -analog or digital -discrete/continous time -passive/active -infine/finite impulse response

Isolation

improper grounding of the system is one of the most common causes for measurement problems, including noise and damaged measurement devices -signal conditioners with isolation can prevent most of these problems, such devices pass the signal from its source to the measurement device without a physical connection by using a transformer optical or capacitive coupling techniques.

random error

indefiniteness of result due to finite precision of experiment

what is an icon?

it is a graphical representation of a vi

If its an array output []

it will only output 0,1

linerity 1) static nonlinearity nonlinearity(%)=(Din(max)/INf(s))*100 Din(max)= max input deviation IN(f.s.) max full scale input

linearity of transducer is expression of the extent to which the actual measured curve of sensor departs from ideal curve 1) often subject to environmental factors including temp, vibration, acoustic noise level and humidty

Can you create an array of arrays

no: you cannot drag an array data type into an array shell. However you can create 2-D arrays

what do dbl precision data types represent

non- integer values

offset

offset error of transducer is the output that will exist when it should be 0 or the diff between actual output value and specified

Bias error

reproducible inacuracy introduced by calibration or technique. this error can be corrected

Nyquist thereom

states when you sample an analog signal, any signal components at frequencies greater than one half the sampling frequency appear in the sampled data at lower freq signal -can avoid this signal distortion only by removing any signal components above one half the sampling freq with lowpass filters before the signal is sampled.

Modularity

the degree to which a program is composed of discrete modubles such that a change to one module has minimal impact on other modules IN LABVIEW THEY ARE CALLED subVIs


Related study sets

MATE REMEDIAL (GEOMETRIA, TRIGONOMETRIA Y FUNCIONES)

View Set

Chapters 28 and 30 Study Questions

View Set

Chapter 8 - Portable Fire Extinguishers

View Set