Objetos Usados en el Programa

Anexo VI. Objetos Usados en el Programa. ANEXO VI. OBJETOS USADOS EN EL PROGRAMA. • ALPHANUMERIC. An object that displays alphanumeric data. Use ...
0 downloads 1 Views 598KB Size
Anexo VI.

Objetos Usados en el Programa.

ANEXO VI.

OBJETOS USADOS EN EL PROGRAMA. •

ALPHANUMERIC. An object that displays alphanumeric data.

Use Use AlphaNumeric to display any of the data types as a single value, an Array 1D, or a Array 2D. To view an array, scroll the display with the scroll bars. Properties General tab: Enable Indices - When the check box is selected and the data received is an array, each line in the display area is indexed. Default is on. Initialization group: Clear At PreRun - When the check box is selected, the contents of the AlphaNumeric are cleared at PreRun. Default is on. Clear At Activate - When the check box is selected, the contents of the AlphaNumeric are cleared at Activate. Default is on.

ESI. Universidad de Sevilla.

AVI-1

Anexo VI.

Objetos Usados en el Programa.

Number tab: Global Format - Use the default format. Default is on. Integer: - If Global Format is off, specify the number format for integer numbers to be displayed on this object. The choices are Decimal (e.g. 42), Octal (e.g. #Q52), Hexadecimal (e.g. #H2a), and Binary (e.g. #B00101010). Default is Decimal. Real: - If Global Format is off, specify the number format for Real numbers to be displayed on this object. The choices are Fixed (e.g. 98.6000), Scientific (e.g. 9.8600E+01), Engineering (e.g. 98.6000E0), Standard (e.g. 98.6), and Time Stamp (e.g. Sat 01/Jan/1997 17:01:38). Default is Standard. Significant Digits: - If Global Format is off, specify the number of significant digits to display for Real values. Notes A row of asterisks (***) is displayed if the current width of the AlphaNumeric object is too small to display the default precision of the numeric type (using the currently specified display font). Resize the object to display the data. If there is a 2D Array, you will see a scroll bar. (unless you have resized the object to show the entire array). Arrays that are three-dimensional and larger are displayed as the string 3D Array and so forth. ASCII 0-30 are dependent on font and may not be readable. Location Display AlphaNumeric

ESI. Universidad de Sevilla.

AVI-2

Anexo VI.

Objetos Usados en el Programa.

See Also Default Preferences and Logging AlphaNumeric. To Display a Scalar Value To Display an Array of Values



A*B (MULTIPLY) An object that performs an arithmetic multiplication on two operands.

Use Use a * b to multiply the values of two containers. The two containers may be of any type and of any shape. If one of the containers is an array, the other must be either a scalar or an array of the same size and shape. The result is a container of the highest type, with the same shape as the operands. If both operands are of type Coord, they must have their independent variable(s) match exactly or an error is returned. The multiplication is only performed on the dependent (last) variable. If one of the containers is Text, the other must be an Int32. Text multiplication consists of repeating the string the number of times given by the value of the Int32. Enums are converted to Text for multiplication. This multiplication operation performs a parallel multiplication on all elements of the arrays, including matrices. For a matrix multiply, see the function matMultiply(A,B). Example Array times a scalar: [1 2 3] * 3 returns [3 6 9]. Two arrays: [4 5 6] * [1 2 3] returns [4 10 18]. Two PComplex scalars: (2,@45) * (3,@90) returns (6,@135) with Trig Mode set to Degrees. Two Coord scalars: coord(1,3) * coord(1,5) returns coord(1,15). Two Coord scalars: coord(1,3) * coord(2,5) returns an error. Text times a scalar: "hello" * 3 returns "hellohellohello". ESI. Universidad de Sevilla.

AVI-3

Anexo VI.

Objetos Usados en el Programa.

A Text array times an array: ["hello" "b"] * [3 2] returns ["hellohellohello" "bb"]. Notes If either of the containers is mapped (that is, of type Waveform, Spectrum, Coord, or a mapped array of any other type), the other container must be unmapped or have identical mappings. The return value will have the same mappings as the operands; otherwise an error is returned. Location Device Function & Object Browser Type:

Operators

Category:

Arithmetic

Member:

*

See Also a + b (add), a / b (divide), matMultiply (A,B), and a - b (subtract).



BUILD WAVEFORM. An object that creates a Waveform from separate components.

Use Use Build Waveform to create a Waveform from a Real array of amplitude values and time span information.

ESI. Universidad de Sevilla.

AVI-4

Anexo VI.

Objetos Usados en el Programa.

Open View Parameters Time Span - The length of time in seconds over which the y data was sampled. Time Span may be added as a data input. Default is 20m seconds. Notes The input values' mappings are ignored. Build Waveform assumes the y data was sampled linearly at a constant rate over the given interval. There are the same number of points as sampling intervals. Each point is at the beginning of the sampling interval. Location Data Build Data Waveform See Also Build Arb Waveform, Build Data, Build Spectrum, and UnBuild Waveform. ifft(x).



COUNTER. An object that displays and outputs the number of times its data input pin has

been activated. Use Use Counter to keep a running count. Counter keeps a running count of the number of times an input has been activated by a previous object's output. The Counter output is a Real scalar.

ESI. Universidad de Sevilla.

AVI-5

Anexo VI.

Objetos Usados en el Programa.

Object Menu Clear - Clears the contents of the Counter. Properties Initialization group: Clear At PreRun - When the check box is selected, the Counter is cleared at PreRun time. Default is on. Clear At Activate - When the check box is selected, the Counter is cleared at Activate time. Default is on. Notes The data input for Counter does not require any particular type data and even counts an input with a nil value. It can also be cleared by activating the input Clear control pin. The value of the Counter, a Real scalar, is available at the Counter output. Location Device Counter See Also Accumulator.



DERIV(x, order). An object used to calculate the derivative of order order across all values of the

input data using a sliding fourth-order (five-point) polynomial.

ESI. Universidad de Sevilla.

AVI-6

Anexo VI.

Objetos Usados en el Programa.

Use Use deriv(x,order) to calculate the numerical approximation of the derivative of order order across all points of a set of ordered equally spaced values (x). The result is an array of the same size and shape as the input x. The result is the same type as x except for Int32. Int32 returns a Real and has the same mappings (if any) as the input x. Example deriv([0 1 2 3 3 2 1 0], 1) returns [1.25 0.9167 1.083 0.5833 -0.5833 -1.083 0.9167 -1.25]. Notes The deriv(x,order) function is applicable to one-dimensional arrays of simple numeric values (Int32, Real, Waveform) and lists of two-dimensional (two field) coordinates that represent equally spaced ordered data.

For mapped arrays, the

mappings of the resultant array will be identical to those of x. For coordinate lists, the values a and b represent real values between the x-values of the first and last point in the coordinate list (inclusive). For mapped arrays, the values a and b represent real values between the Xmin mapping and Xmax-dx (inclusive), where dx is the interval between consecutive points: (Xmax-Xmin)/N. For unmapped arrays, it is assumed that the data is equally spaced and ordered, and a value of 1 is assumed for the interval dx between points. For mapped arrays, the operation is performed with the interval value dx equal to (Xmax-Xmin)/N and is thus automatically scaled appropriately. For a coordinate list, the independent (first field) values are first checked to be sure that they are ordered and equally spaced, then the operation is performed on the dependent (second field) values using the previously determined spacing as the value for dx. If an unmapped array is used, but it is known otherwise that the interval between points is some value dx, then the correct value for the operation can be obtained by dividing the result of deriv(x,order) by the known dx value. When the values represent noisy data, the result of deriv(x,order) can often be improved (in a pragmatic sense) by first filtering or smoothing the data. Smoothing removes much of the unwanted noise which is

ESI. Universidad de Sevilla.

AVI-7

Anexo VI.

Objetos Usados en el Programa.

superimposed on the underlying values. See the polySmooth(x) function and related smoothing functions for examples. Location Device Function & Object Browser Type:

Built-in Functions

Category:

Calculus

Member:

deriv

See Also derivAt(x, order,pt).



DIGITAL IN CONFIG. Use the Digital In Config object (located at DT DataAcq > Digital In Config) to

configure a digital subsystem for input. The open view shows the Configure button. Click Configure to access the Select Device and Subsystem Dialog. Notes Use the Get Single Value object with Digital In Config to read digital values. Data Pins The data output pin, hSubsys, is the subsystem handle identifying the subsystem to the data acquisition objects.

ESI. Universidad de Sevilla.

AVI-8

Anexo VI.



Objetos Usados en el Programa.

FILE NAME SELECTION. An object that displays a pop-up dialog box that displays a list of files to the

user. Use Use File Name Selection to display a list of the files on a disk drive to the user. The user responds by selecting one of the choices on the dialog box. File Name Selection is very useful to interactively request file names to be used in To File and From File objects. In the pop-up dialog box, when a file selection is made and the OK button is pressed, the selection is output on the File Name output pin. When the Cancel button is pressed, a 1 is output on the Cancel output pin. Open View Prompt/Label - The string that prompts the user to select a file name. You may add this parameter as a data input. Default is Enter File Name: Initial Directory - The directory that is initially shown in the File Name Selection pop-up dialog box. You may add this parameter as a data input. Default is the directory from which you stared HP VEE. Initial File/Wildcard - Allows you to set a file name as the default or to filter a set of file names by using wildcard characters. You may add this parameter as a data input. Default is *.*. Select File For: Reading | Writing - When you select Reading, the user must select an existing file name from the pop-up dialog box. If the user types a nonexistant file name into the pop-up dialog box and presses OK, they are prompted to enter an existing file name. When you select Writing, the user may type a new file name or select an existing file name from the pop-up dialog box. If an existing file name is chosen, a warning dialog box pops up asking if it's OK to overwrite the file. If the user presses Yes, the file name is output to the File Name output pin. If the user presses No, ESI. Universidad de Sevilla.

AVI-9

Anexo VI.

Objetos Usados en el Programa.

the user is returned to the File Name Selection dialog box to select another file name. You may add this parameter as a data input. Notes The location of the pop-up dialog box is approximately at the center of the work area. It will go to the same location each time the program is run. To respond to the pop-up dialog box using only the keyboard: when the dialog box pops up, use Enter and Esc keys. Or use the Tab key to move between the buttons and the selection area; move through the choices with the arrow keys, and select the file name with the Space bar. The pop-up dialog box is only displayed while the program is running. While the popup dialog box is displayed, the entire program pauses execution, then continues when the dialog box is closed. Location Data Dialog Box File Name Selection See Also From File, Integer Input, List Box, Message Box, Real Input, Text Input, To File, and UserObject.



FORMULA. An object that performs a user-defined mathematical operation, function, or

other expression specified by a mathematical formula. Note Refer to Function & Object Browser for information about the individual mathematical operations and functions supported by the Formula object.

ESI. Universidad de Sevilla.

AVI-10

Anexo VI.

Objetos Usados en el Programa.

Use Use Formula to execute any desired mathematical expression supported by HP VEE. Many predefined operators and functions are available in the Function & Object Browser. Additionally, the browser displays user-defined functions, and ActiveX objects and controls that are available. The default Formula object has one input (A) and an example formula (2*A+3). However, the example can be replaced with any desired formula, and any number of inputs or outputs can be added as required by the userdefined formula. (If the formula requires no inputs, you may delete all inputs.) The input(s) can be of any data type. For a relational formula (e.g. A