06-20-2006 06:39 PM
06-22-2006 08:02 AM
06-23-2006
02:06 PM
- last edited on
07-10-2025
09:23 AM
by
Content Cleaner
06-23-2006 05:28 PM
06-24-2006 04:18 AM
06-24-2006
08:04 AM
- last edited on
07-10-2025
09:23 AM
by
Content Cleaner
04-21-2007 08:34 AM
04-23-2007 03:45 AM
Hi,
The reason that this and other functions are not supported is because they use data types that are not supported within Visual Basic. - i.e unsigned integer - which VB does not have a valid data type for.
The correct method to write to digital lines with DAQmx in VB 6.0 is
int32 DAQmxWriteDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved)
Refer to the DAQmx API C Reference Help for more information
Hope this helps
Hannah
NIUK & Ireland
04-23-2007 09:34 AM
thanks, I have been using this function. But it looks like I have to write an array of 8 bytes to set one port. Is there a way to set a whole port using the bits of a byte or integer? Am I missing something?
Joe
04-23-2007 05:37 PM
also there is uint8 in the lines routine that is successfully used in VB6 as a byte array --see below. Why can't this be done for writeuint8
in C header
int32 __CFUNC DAQmxWriteDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout, uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);
in VB^
Function DAQmxWriteDigitalLines(taskHandle As Long, numSampsPerChan As Long, autoStart As Boolean, timeout As Double, dataLayout As DAQmxFillMode, writeArray As Byte, sampsPerChanWritten As Long, reserved As Any) As Long