Algorithm:function:define, Parameters, Comments – VXI VT1422A User Manual

Page 251

Advertising
background image

VT1422A Command Reference 249

Chapter 7

ALGorithm

Note

If <alg_name> specifies an undefined algorithm, ALG:TIME? returns 0. This can be
used to determine whether algorithm <alg_name> is defined.

This command forces algorithms to run internally. If an algorithm contains a run-time
error, no data can be returned and the command will not complete (will "hang").

When Accepted: Before INIT only.

Returned Value: numeric value. The type is float32

Send with VXIplug&play Function: hpe1422_cmdReal64_Q(...)

ALGorithm:FUNCtion:DEFine

ALGorithm:FUNCtion:DEFine ’<function_name>’,<range>,<offset>,
<func_data
>

defines a custom function that can be called from within a custom

algorithm. See “Generating User Defined Functions” on page 487 for full information.

Parameters

Comments

By providing this custom function capability, the VT1422A's algorithm

language can be kept simple in terms of mathematical capability. This increases
speed. Rather than having to calculate high-order polynomial approximations
of non-linear functions, this custom function scheme loads a pre-computed
look-up table of values into memory. This method allows computing virtually
any transcendental or non-linear function in only 17 µs. Resolution is 16 bits.

<function_name> is a global identifier and cannot be the same as a previously

define global variable. A user function is globally available to all defined algorithms.

Values are generated for <range>, <offset>, and <func_data> with a program

supplied with the VT1422A. It is provided in C-SCPI and BASIC forms.
For full information, see Appendix F "Generating User Defined Functions" on
page 487
.

Parameter

Name

Parameter

Type

Range of

Values

Default

Units

function_name

string

valid 'C' identifier

(if not already defined in 'GLOBALS')

none

range

numeric (float32)

see comments

none

offset

numeric (float32)

see comments

none

func_data

512 element array of

uint16

see comments

none

Advertising
This manual is related to the following products: