NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Proper use of Driver Specific IVI Functions

Solved!
Go to solution

Hello

 

I need to call niDMM specific driver functions, for example diode test function and set current source value. I am able to do it by using IVI step types. I just input function and attribute IDs from niDMM header files. I would like to use IVI drivers, but I need instrument specific functions in some applications. I have tested it and it works well, but is it the right way to do it? What is the recommended approach?

 

My IVI Steps look like this when usig specific functions and attributes: I do not like typing in numbers, but I have not found a way to use header file definitions (see below).

IVI Dmm diode test.pngIVI Tools diode test current source.png

 

Diode test ID is defined by nidmm.h:

#define NIDMM_VAL_FUNC_SPECIFIC_EXT_BASE    IVIDMM_VAL_FUNC_SPECIFIC_EXT_BASE

#define NIDMM_VAL_DIODE                (NIDMM_VAL_FUNC_SPECIFIC_EXT_BASE + 2L)

 

defined by IviDmm.h

#define IVIDMM_VAL_FUNC_SPECIFIC_EXT_BASE       (1000L)

 

Current source attribute ID is defined in nidmm.h:

#define NIDMM_ATTR_BASE                     IVI_SPECIFIC_PUBLIC_ATTR_BASE

#define NIDMM_ATTR_CURRENT_SOURCE         (NIDMM_ATTR_BASE + 25L)             /* ViReal64 */

 

ini.h:

/*****************************************************************************/
#define IVI_ATTR_BASE                   1000000
#define IVI_ENGINE_PRIVATE_ATTR_BASE    (IVI_ATTR_BASE +  00000)   /* base for private attributes of the IVI engine */
#define IVI_ENGINE_PUBLIC_ATTR_BASE     (IVI_ATTR_BASE +  50000)   /* base for public attributes of the IVI engine */
#define IVI_SPECIFIC_PUBLIC_ATTR_BASE   (IVI_ATTR_BASE + 150000)   /* base for public attributes of specific drivers */

 

 

 

Download All
0 Kudos
Message 1 of 2
(3,528 Views)
Solution
Accepted by topic author Paulius
I preferred to use a code module and call the NIDMM functions in there. Then you can use the type definitions instead of the id number.
0 Kudos
Message 2 of 2
(3,515 Views)