Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Labview Code Interface Reference Manual.pdf
Скачиваний:
35
Добавлен:
29.05.2015
Размер:
1 Мб
Скачать
☆

Chapter 2 CIN Parameter Passing

Comparing Two Numbers, Producing a Boolean Scalar

The following example shows how to create a CIN that compares two single-precision numbers. If the first number is greater than the second one, the return value is TRUE; otherwise, the return value is FALSE. This example gives only the block diagram and the code. Follow the instructions in the Steps for Creating a CIN section of Chapter 1 to create the CIN.

The diagram for this CIN is shown in the following illustration. Save the VI as aequalb.vi.

Create a .c file for the CIN, and name it aequalb.c. The .c file that

LabVIEW creates is as follows.

/*

* CIN source file */

#include "extcode.h"

/* stubs for advanced CIN functions */

UseDefaultCINInit

UseDefaultCINDispose

UseDefaultCINAbort

UseDefaultCINLoad

UseDefaultCINUnload

UseDefaultCINSave

CIN MgErr CINRun(float32 *ap, float32 *bp,

LVBoolean *aequalbp);

© National Instruments Corporation

2-9

LabVIEW Code Interface Reference Manual

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