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

Chapter 3 CIN Advanced Topics

As with multiple instances of the same node, LabVIEW calls the

CINInit, CINDispose, and CINAbort routines for each individual CIN data space.

In the case where you have a reentrant VI that contains multiple copies of the same code resource, LabVIEW calls the CINInit, CINDispose, and CINAbort routines once for each use of the reentrant VI, multiplied by the number of references to the code resource within that VI.

caller 1

caller 2

caller 3

My VI

 

 

 

My VI

data space 1

My VI

 

data space 3

4-byte CIN

 

 

 

4-byte CIN

data space

 

 

 

data space

(data space globals)

 

 

(data space globals)

My VI

 

 

 

 

data space 2

code resource

 

global storage

4-byte CIN

 

 

 

 

data space

 

 

 

 

(data space globals)

 

 

 

(code globals)

Figure 3-3. Three VIs Referencing a Reentrant VI Containing One CIN

Code Globals and CIN Data Space Globals

When you declare global or static local data within a CIN code resource, LabVIEW allocates storage for that data. LabVIEW maintains your globals across calls to various routines.

When you allocate a global in a CIN code resource, LabVIEW creates storage for only one instance of it, regardless of whether the CIN’s VI is reentrant or whether you have multiple references to the same code resource in memory.

LabVIEW Code Interface Reference Manual

3-8

© National Instruments Corporation

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