NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing values from CVI dll to TestStand gives wrong values

Initially I wanted to pass an array of booleans from CVI to TestStand.  I read that this was not possible because you cannot set Boolean as a parameter.

So I declared it as unsigned intin CVI.

Strangely enough, TestStand does receive it as an arrayof Booleans.  However the values are still wrong.  I wonder if it actually is possible to pass an array of Booleans.

Using TestStand 3.1 and CVI ver 7.1 (no impact)

Here is how I declare the parameters in CVI:

void __declspec(dllexport) __stdcall MemTest
(
    CAObjHandle     thisContext,
    unsigned char *    apbResult,
    int             alComport,
    int                alSocketNum,
    UINT32            aulHostAddr,
    BOOL        *    apbTestOutcome,
    UINT32             testSize,
    UINT32          startAddress
)

 

The other functions within CVI use an array of booleans.

 

Here is how I declare the parameters in TestStand:

 

 

Here are the results I get.  They should match...

 

 

 

The obvious question is:

 

How do I get the results in TestStand to match those from CVI?

The printout >>  no. 1 Passed << etc..  are the values of the array apbResult in CVI.  bSippResuls should match.

Message Edited by Ray.R on 10-16-2009 10:41 AM
Download All
0 Kudos
Message 1 of 2
(3,182 Views)

Ray,

 

Try this:

 

 

void __declspec(dllexport) GetResults(unsigned char arg1[16])
{
 //Insert function body here.
 
 
 
 arg1[0] = (unsigned char)0;
 arg1[1] = (unsigned char)1;
 arg1[2] = (unsigned char)0;
 arg1[3] = (unsigned char)1;
 arg1[4] = (unsigned char)1;
 arg1[5] = (unsigned char)0;
 arg1[6] = (unsigned char)1;
 arg1[7] = (unsigned char)1;
 arg1[8] = (unsigned char)1;
 arg1[9] = (unsigned char)0;
 arg1[10] = (unsigned char)1;
 arg1[11] = (unsigned char)1;
 arg1[12] = (unsigned char)1;
 arg1[13] = (unsigned char)1;
 arg1[14] = (unsigned char)0;
 arg1[15] = (unsigned char)1;
 
}

 

teststand.PNG

 

 

 

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 2 of 2
(3,173 Views)