Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

trouble with DAQmxWriteDigitalLines

Hello,
 
I'm trying to do a program in Visual Basic 6.0 using the function DAQmxWriteDigitalLines. All work correctly except this function. When it try to execute this function say that a parameter "data" is not concur with the expected data.
 
This is the code:
 
 Dim data(7) As Byte
   
    data(0) = 1
    data(1) = 0
    data(2) = 0
    data(3) = 0
    data(4) = 0
    data(5) = 0
    data(6) = 0
    data(7) = 0
 
DAQmxErrChk DAQmxWriteDigitalLines(myTaskOut, 1, 1, 10#, DAQmx_Val_GroupByChannel, dataOutput, 0, ByVal 0&)
 
 
If I write this, the program works correctly but only write in one line of the output. I would like to write in the seven lines of the port.
DAQmxErrChk DAQmxWriteDigitalLines(myTaskOut, 1, 1, 10#, DAQmx_Val_GroupByChannel, dataOutput(0), 0, ByVal 0&)
 
Thank you
 
 
antonioSotelo
0 Kudos
Message 1 of 2
(6,811 Views)

Hello,

I have found a solution. I did not see when you write dataOutput(0), the complete array (dataOutput(0),dataOutput(1),....) is written in all ports. I thought only data wrote was dataOutput(0) but it is not so.  So i must not write "dataOutput", i must write dataOutput(0).



Mensaje editado por antonioSotelo
antonioSotelo
0 Kudos
Message 2 of 2
(6,782 Views)