LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you access a .dll that has parameters with bit fields defined?

I am using LabVIEW to access a .dll where one of the parameters is a structure containing integers with bit fields set. How can set up the data types in a cluster for bit fields?
An example of the structure definition:
typedef structure{
UINT8 a:4;
UINT8 b:1;
UINT8 c:3;
} EX_STRUCT;
Where a,b,&c are located in one byte.
0 Kudos
Message 1 of 2
(2,546 Views)
The bit field structures should always work out to a byte boundary (one, two or four bytes). The feed into this structure is U8, U16 or U32 respectively. You need to assemble the bits into bytes (in the example you gave one byte) and then feed that byte into the DLL.

Not too difficult.

Rob
0 Kudos
Message 2 of 2
(2,546 Views)