05-30-2011 06:33 AM
Hi,
Is there a way to implement CVI "HashTableType" equivalent data type in TestStand?
Regards,
Ramjee V
06-06-2011 01:02 AM
06-07-2011 09:01 AM
Hi,
I have a structure in CVI that uses the hashtable type to read the data from a configuration file to search for a key. The same structure i need to get reflected in TestStand to use these strucutre values for the rest of my sequence.
So, Please suggest me a best solution to do this kind of implementation.
Regards,
Ramjee V
06-08-2011 01:14 AM
Hi Ramjee,
Yes you can you approxiamte with a custom data type your CVI structure.
Note: for each Property in our data type you have be defined the the 'C' datatype.
and dont forget the alignment.
There is also good example \Examples\StructPassing\C\Struct Passing to C DLL.seq that comes with TS
Regards
Juergen
06-08-2011 09:38 AM
Instead of duplicating data, you could export the functions you need to access your data structures from your CVI DLL and call those from TestStand.
06-08-2011 09:57 AM
06-08-2011 10:48 AM
If your data structure is complex enough to require accessor functions and it is already implemented in CVI, it would be simpler and faster to access the data via CVI functions. If your data is not global, you'll need to pass a pointer to it back to TestStand for TestStand to hand back to your accessor functions.
If you need to be able to inspect and access the internals of your data structure in the TestStand variables view or in expressions (unlikely if you have good accessor functions), or if your data structure is a structure you want TestStand to convert to the languages of other modules such as LabVIEW or .net, then you might want to put it in TestStand.
An analogy would be an instrument driver. Instrument drivers have all sorts of internal data structures, but you typically only deal with their exported functions (and the instrument handle), whether calling them from TestStand or CVI.
06-09-2011 12:34 AM