<font size=2 face="sans-serif">Hi, (I've had problems with joiningthe vrf so I send this post againg. Sorry -if its already there)</font>
<font size=2 face="sans-serif"> </font>
<font size=2 face="sans-serif">I'm looking for help on interfacingVEE6.0 with NI-DAQmx. In the NI-DAQmx package there is a headerfilebut it needs to be 'adjusted' for VEE6.0 mainly because of unsupportedtypes. (VEE6.0 ships with a header file for the NI - Traditional DAQ dll).</font>
<font size=2 face="sans-serif">Has anyone made such .h file ? - andwould like to share it ?</font>
<font size=2 face="sans-serif">KON-I-TEK
v/ Frank Olsen
DK</font>---You are currently subscribed to vrf as: rsb@soco.agilent.comTo subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".To send messages to this mailing list, email "vrf@agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".
> needs to be 'adjusted'
'Completely reworked' would be a better description!
> Has anyone made such .h file ? - and would like to share it ?
No, but if you could define a set of functions I could do it.
In General: The type equiv table (starting at the line "// NI-DAQmx
Typedefs") gives you a reverse equivalency for these NI-DAQmx types. Ignore
signed & unsigned. They are:
int8 = char //cannot be used.
uInt8 = char //cannot be used.
int16 = short
uInt16 = short
int32 = long
uInt32 = long
float32 = float
float64 = double
int64 = ?? //I don't think this can be used.
bool32 = long
WATCH OUT FOR THIS ONE:
TaskHandle = long*
Their definitions of TRUE and NULL are incorrect but shouldn't cause
problems.
Any function definition will translate to:
long __cdecl name(params)
Eliminate "const" from "const char" and change & repos "[]" to "*".
For instance:
long __cdecl DAQmxBaseLoadTask(char *taskName, long* *taskHandle);
Notice there are two splats on taskHandle. This may cause VEE difficulty - I
don't know. If it does, you can eliminate one splat and use:
pTaskHandle = GlobalAlloc(4, 4);
Pass pTaskHandle for the taskHandle param in the LoadTask call. This will
cause all other calls that have a parameter of TaskHandle troubles:
eliminate the splat from those parameters and pass pTaskHandle instead.
Don't forget to call:
GlobalFree(pTaskHandle);
at the end of your program.
In all cases, change and repos "[]" to "*". For instance, if VEE does not
barf on double splat params:
long DAQmxBaseWriteDigitalU32(long *taskHandle, long numSampsPerChan, long
autoStart, double timeout, long dataLayout, long *writeArray);
IMPORTANT: whatever[] does not *always* equal *whatever (even though I
always say it does), however this is a linker issue so you shouldn't have
any problems with substituting *whatever for whatever[] when executing
calls.
Note also that you won't be able to do int8 or uInt8 as parameters at all in
their native forms. It can be done but it's a hassle. The easiest thing to
do is to change uInt8 whatever[] to short *whatever and use an Int16 array
with each element's bytes swapped:
for each value in whatever[]
value = bitAnd(value, 0xff) * 256 + bitShift(bitAnd(value, 0xff00), -8)
next value
That can probably be done without looping in VEE. Swap bytes before an
output call and after an input call.
All the other things are just constants. That is, DAQmx_SelfCal_Supported =
0x1860. It would probably be a good idea to just pick out the ones you need
and define them as VEE constants.
-SHAWN-
---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".