Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Multiple References to the Same CIN in a Single VI

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

If you loaded the same code resource into multiple CINs, or if you duplicated a given CIN, LabVIEW gives each reference to the code resource a chance to perform initialization or deallocation. No matter how many references you have in memory to a given code resource, LabVIEW calls the CINLoad routine only once when the resource is first loaded into memory, although it is also called if you load a new version of the resource. When you unload the VI, LabVIEW calls CINUnload once.

After LabVIEW calls CINLoad, it calls CINInit once for each reference to the CIN because the CIN data space for the CIN might need initialization. Thus, if you have two CINs in the same VI and both reference the same code, LabVIEW calls the CINLoad routine once and CINInit twice. If you later load another VI referencing the same code resource, LabVIEW calls CINInit again for the new version. Because LabVIEW has already called CINLoad once for the code resource, it does not call CINLoad again for this new reference.

LabVIEW calls CINDispose and CINAbort for each individual CIN data space. LabVIEW calls CINSave only once, regardless of the number of references to a given code resource within the VI you are saving.

The following figure shows an example of three CINs referencing the same code resource.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit