LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lvdaq.dll argument question for function DIO_Port_WriteInterface().

Hello,

What are the parameters for the following functions:
DIO_Port_WriteInterface() and DIO_Port_ReadInterface()? They are part of lvdaq.dll dynamic link library.

Thanks,
Ken
0 Kudos
Message 1 of 4
(3,124 Views)
Hi Ken,

The arguments for Write are as follows:

unsigned int *taskID,
unsigned int *pattern,
int *mask,
unsigned int *taskIDout, (copied from the first arg)
int *error (less than zero means error)

Read has the same number and type of args, but the pattern and mask have swapped position.

You will need to do a "DIO_Port_ConfigInterface" first.
0 Kudos
Message 2 of 4
(3,124 Views)
What are the arguments for: DIO_Port_ConfigInterface"?

Thanks again!
Ken
0 Kudos
Message 3 of 4
(3,124 Views)
Hi Ken,

lvdaq.dll is undocumented because it is used only internally by LabVIEW. It might be better to use ni-daq instead, as the API should remain stable and be well documented. The lvdaq.dll may change at any time, or even be completely replaced in the future.

This is how I figured out the arguments:

Write a LabVIEW application that does what you want, for example using the "write to digital port.vi." Double-click the VI to load the block diagram. You will find that it has a "Port Config" and "Port Write" VI. Double click the "Port Config," the block diagram will have a Call Library Function node, right click and choose "configure."

You will see almost everything you need, like the function name (DIO_Port_ConfigInterface), cal
ling convention, number of parameters, etc. In this case they are all pointers (so you know how the stack should be built/destroyed). Close that window and look at the data types being wired to the CLF, and you'll be able to figure everything out.

Do the same for any other functions you may want to use.

Good luck!
0 Kudos
Message 4 of 4
(3,124 Views)