Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Using External Code in LabVIEW.pdf
Скачиваний:
49
Добавлен:
29.05.2015
Размер:
1.85 Mб
Скачать

Chapter 6 Function Descriptions

MoveBlock

void MoveBlock(ps, pd, size);

Purpose

Moves size bytes from one address to another. The source and destination memory blocks can overlap.

Parameters

Name

Type

Description

 

 

 

 

 

 

ps

UPtr

Pointer to source.

 

 

 

pd

UPtr

Pointer to destination.

 

 

 

size

int32

Number of bytes you want to move.

 

 

 

© National Instruments Corporation

6-141

Using External Code in LabVIEW

Chapter 6 Function Descriptions

NumericArrayResize

MgErr NumericArrayResize (int32 typeCode, int32 numDims, Uhandle *dataHP, int32 totalNewSize)

Purpose

Resizes a data handle that refers to a numeric array. This routine also accounts for alignment issues. It does not set the array dimension field. If *dataHP is NULL, LabVIEW allocates a new array handle in *dataHP.

Parameters

Name

Type

Description

 

 

 

 

 

 

typeCode

int32

Data type for the array you want to resize.

 

 

 

numDims

int32

Number of dimensions in the data structure

 

 

to which the handle refers.

 

 

 

*dataHP

UHandle

Pointer to the handle you want to resize.

 

 

 

totalNewSize

int32

New number of elements to which the handle

 

 

should refer.

 

 

 

Return Value

mgErr, which can contain the following errors:

NoErr

No error.

MFullErr

Not enough memory to perform the operation.

mZoneErr

Handle or pointer not in specified zone.

Using External Code in LabVIEW

6-142

www.ni.com

Chapter 6 Function Descriptions

Offset

Macro

int16 Offset(type, field);

Purpose

Returns the offset of the specified field within the structure called type.

Parameters

Name

Type

Description

 

 

 

 

 

 

type

Structure that contains field.

 

 

 

field

Field whose offset you want to determine.

 

 

 

Return Value

An offset as an int16.

© National Instruments Corporation

6-143

Using External Code in LabVIEW

Chapter 6 Function Descriptions

Pin

int32 Pin(i, low, high);

Purpose

Returns i coerced to fall within the range from low to high inclusive.

Parameters

Name

Type

Description

 

 

 

 

 

 

i

int32

Value you want to coerce to the specified

 

 

range.

 

 

 

low

int32

Low value of the range to which you want to

 

 

coerce i.

 

 

 

high

int32

High value of the range to which you want to

 

 

coerce i.

 

 

 

Return Value

i coerced to the specified range.

Using External Code in LabVIEW

6-144

www.ni.com

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]