Documente Academic
Documente Profesional
Documente Cultură
Diagrama Bloc
Diagrama Bloc (DB) reprezint programul
propriu-zis dezvoltat n mediul LabVIEW i
conine codul surs al instrumentului virtual.
O DB conine urmtoarele elemente:
- terminale
- noduri
- fire de legtur
- structuri
Figure 2.15. Example of a Block Diagram and Corresponding Front Panel
Terminalele sunt porturi de intrare-ieire ce fac
legtura dintre PF i DB.
Ele sunt corespondentele obiectelor de pe PF i
se reprezint pe DB printr-un simbol care este n
concordan cu tipul de dat vehiculat de
obiect.
Terminale
Controls, indicators, and constants behave as inputs and outputs of the block
diagram algorithm. Consider the implementation of the algorithm for the area
of a triangle:
Figure 2.16. Area of a Triangle Front Panel
Figure 2.17. Area of a Triangle Block Diagram with Icon Terminal View
Figure 2.18. Area of a Triangle Block Diagram without Icon Terminal
View
Noduri n DB
Nodurile sunt obiecte de pe DB care sunt
caracterizate de un numr de intrri/ieiri i
care execut diverse operaii i funcii n
timpul rulrii IV-ului.
Nodurile sunt analoage instruciunilor,
funciilor i subrutinelor din limbajele de
programare bazate pe text.
Nodurile pot fi funcii, subVI-uri sau
structuri.
Noduri
Noduri
13
Structurile sunt elemente pentru controlul
proceselor, cum ar fi structura Case, bucla
For i bucla While.
Structurile din LabView sunt echivalentul
grafic al instruciunilor de ciclare (for, while)
i de decizie (if,case) din limbajele de
programare clasice.
O structur este reprezentat printr-un
dreptunghi a crui dimensiune poate fi
modificat.
Noduri Funcie
Functions are:
Fundamental operating elements of LabVIEW.
Do not have front panels or block diagrams, but do have
connector panes.
Has a pale yellow background on its icon.
Double-clicking a function only selects the
function.
Functions do not open like VIs and subVIs.
SubVI Nodes
SubVIs :
Are VIs that you use on the block diagram of another VI.
Have front panels and block diagrams.
Use the icon from the upper-right corner of the front
panel as the icon that appears when you place the
subVI on a block diagram.
When you double-click a subVI, the front panel
and block diagram open.
Any VI has the potential to be used as a subVI.
Any VI has the potential to be used as a
subVI. When you double-click a subVI on the
block diagram, its front panel window appears.
The front panel includes controls and
indicators. The block diagram includes wires,
icons, functions, possibly subVIs, and other
LabVIEW objects.
The upper right corner of the front panel
window and block diagram window displays
the icon for the VI. This is the icon that
appears when you place the VI on a block
diagram as a subVI.
SubVIs also can be Express VIs. Express VIs
are nodes that require minimal wiring because
you configure them with dialog boxes. Use
Express VIs for common measurement tasks.
You can save the configuration of an Express VI
as a subVI.
LabVIEW uses colored icons to distinguish
between Express VIs and other VIs on the block
diagram. Icons for Express VIs appear on the
block diagram as icons surrounded by a blue
field whereas subVI icons have a yellow field.
Express VIs
Express VIs:
Are a special type of subVI.
Require minimal wiring because you
configure them with dialog boxes.
Save each configuration as a subVI.
Icons for Express VIs appear on the
block diagram as icons surrounded by
a blue field.
19
Expandable Nodes versus Icons
You can display VIs and Express VIs as icons or as
expandable nodes. Expandable nodes appear as icons
surrounded by a colored field. SubVIs appear with a
yellow field, and Express VIs appear with a blue field.
Use icons if you want to conserve space on the block
diagram. Use expandable nodes to make wiring easier
and to aid in documenting block diagrams. By default,
subVIs appear as icons on the block diagram, and
Express VIs appear as expandable nodes.
To display a subVI or Express VI as an expandable
node, right-click the subVI or Express VI and remove
the checkmark next to the View As Icon shortcut menu
item.
Figure 2.19. Icon vs. expandable node
Firele de legtur
Transfer datele ntre obiectele de pe DB.
Fiecare fir are o singur surs de date, dar orict
de muli receptori. Firele au diferite culori, stiluri
i grosimi ce depind de tipurile de date
vehiculate. Un fir rupt, ce nu poate transporta
date, se reprezint printr-o linie ntrerupt. Un fir
cu dou surse de date este un fir rupt.
In figura urmtoare sunt prezentate principalele
tipuri de fire ce vehiculeaz date ntr-un IV.
Informaia vehiculat n VI-urile construite n
LabVIEW se prezint sub forma unei largi
varieti de tipuri de date.
Cele mai importante sunt datele numerice, dar
i alte tipuri cum ar fi booleenele, irurile de
caractere sau clusterele sunt de asemenea
foarte utilizate.
Mai jos sunt date tipurile de date numerice
precum i celelalte tipuri de date care sunt n
mod obinuit utilizate n construcia VI-urilor.
Tipuri de date cu firele de legtur
corespunztoare, n LabVIEW
Definitii
Array (Tablou): Un Array grupeaz date de acelai
tip i este alctuit din elemente i dimensiune.
Elementele sunt reprezentate de datele ce
alctuiesc tabloul. Dimensiunile sunt repezentate
de lungimea, nlimea sau adncimea tabloului. Un
tablou se poate construi din date de tip numeric,
boolean, ci de fiiere, string, waveform i cluster.
Se poate selecta din subpaleta Array&Cluster.
Cluster (Grupuri): Un Cluster grupeaz elemente
de date de tipuri diferite, la fel ca un mnunchi de
fire dintr-un cablu telefonic, n care fiecare fir din
cablu reprezint un element diferit al grupului
(cluster-ului).
Paleta de funcii
Paleta de funcii este o fereastr ce se deschide
doar de pe DB. Aceasta conine operatori, funcii,
noduri, structuri i subIV-uri cu ajutorul crora se
construiete programul n LabVIEW. Accesarea
paletei de funcii se face n modurile urmtoare:
View Show Functions Palette
MD pe DL.
In cel de-al doilea mod, paleta poate fi fixat ca
fereastr pe ecran prin mouse stnga pe pioneza
din stnga sus a acestei ferestre. Altfel, paleta se
nchide dup realizarea unui mouse stnga
oriunde pe DB.
To view or hide categories,
click the Customize button
on the palette, and select or
deselect the Change Visible
Palettes option.
Analyze
Express VIs used for the Analyze task include the
followingAmplitude and Level Measurements,
Statistics, Tone Measurements, and so on.
Amplitude and Level Measurements
The Amplitude and Level Measurements
Express VI performs voltage measurements on
a signal. These include DC, rms, maximum
peak, minimum peak, peak to peak, e.t.c.
Statistics
The Statistics Express VI calculates statistical data from a
waveform.This includes mean, sum, standard deviation,
and extreme values.
Spectral Measurements
The Spectral Measurements Express VI performs spectral
measurement on a waveform, such as magnitude and
power spectral density.
Tone Measurements
The Tone Measurements Express VI searches for a single
tone with the highest frequency or highest amplitude. It
also finds the frequency and amplitude of a single tone.
Filter
The Filter Express VI processes a signal through filters
and windows. Filters used include the following:
Highpass, Lowpass, Bandpass, Bandstop, and
Smoothing. Windows used include Butterworth,
Chebyshev, Inverse Chebyshev, Elliptical, and Bessel.
Present
Present results by using Express VIs that perform a
function, such as the Write to Measurement File
Express VI, or indicators that present data on the front
panel window. The most commonly used indicators for
this task include the Waveform Chart, the Waveform
Graph, and the XY Graph. Common Express VIs include
the Write to Measurement File Express VI, the Build
Text Express VI, the DAQ Assistant, and the Instrument
I/O Assistant. In this case, the DAQ Assistant and the
Instrument I/O Assistant provide output data from the
computer to the DAQ device or an external instrument.