NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing and Receiving Struct from Test Stand

Hi All,

 

I have this DLL with this function:

 

long __declspec(dllexport) InitMyNodeID(char* nameNode myData* mh)

{

 GimmeMyNodeID(nameNode, &mh->myNodeID);

}

 

struct myData {

int myNodeID;

};

 

 Notes:

 GimmeMyNodeID is a standard API that receives nameNode as input and returns an int myNodeID.

 

 

I'm having difficulty receiving it on the test stand parameter...

 

Can somebody help me on this..:o)

 

 

 

 

0 Kudos
Message 1 of 4
(2,816 Views)

Ray,

 

in order to pass structs as parameters from/to TestStand, you have to define a datatype. In the typedefinition, you can set a property which is called "Allow Objects of This Type to be passed as Structs".

Then you have to create a variable using this type and there you go 🙂

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,814 Views)

Hi Norbert,

 

Do you mean define the data type in the test stand environment?

 

 

0 Kudos
Message 3 of 4
(2,805 Views)

Yes, in anywhere in the typepalette (i would suggest using the SequenceFile).

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(2,795 Views)