Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Passing Values Between Modules Using Global Variables in CVI Test Executive

Primary Software: LabWindows/CVI Add-ons>>Test Executive
Primary Software Version: 2.0
Primary Software Fixed Version: N/A
Secondary Software:

Problem: How do I give CVI Test Executive tests in different modules access to the same instance of a global variable?

Solution: In order to provide tests in different modules with access to the same instance of a global variable you need to define that variable as part of the actual Test Executive (TE).
  1. Create a .c file (e.g., my.c), declare a global variable there (e.g., int a), and add it to the TE project.

  2. In the test module project, create a .h file (e.g., my.h), use extern to access the variable in my.c (e.g., extern int a).
Although globals are generally discouraged in favor of the inbuffer and outbuffer schemes, they can sometimes be useful, and they are often implemented in custom Test Executive modifications.

Related Links:

Attachments:





Report Date: 10/02/1998
Last Updated: 11/12/2003
Document ID: 1E1CFBL1

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit