LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

output port

HI
 i am using PCI 6040 and i want to use 8 digital outputs from it. I created a " DAQ assistant " configuring the port ( with 8 digital IO ) as output.  But when i tried to wire the input the DAQ is asking for 1D array of unsigned long as input. I dont understand how the DAQ will convert 1D array of unsigned numbers into digital output. I have attahed the VI .
  I created a 1D array with all elements of array initialized to zero and gave this array as input to DAQ. But i am not getting Logic 0 output at the pins.
please help me
 
thanks in advance
 
0 Kudos
Message 1 of 5
(3,256 Views)

What don't you understand about representing digital output as a number? If you have 8 bits, that can be represented in binary as ranging from 00000000 to 11111111. In hex, this is 00 to FF. In decimal, from 0 to 255. The DAQ Assistant by default takes an array because you can have pattern output and that implies that the bit values change. With on-demand output, just take an int and use the Build Array function.

 

Message Edited by Dennis Knutson on 03-21-2007 07:29 AM

0 Kudos
Message 2 of 5
(3,248 Views)

I understand binary range , decimal range and all. I wanted to know how it interprets each element of array.i.e whether each element of array for all port pins  or each element to each port pin .

I tried ur example. It is working. Thanks

still i have some doubts

I have attached two VI. The first VI "Digital output-1.vi" where i am giving a 1-D array of 3 elements which is not working

the second attachment "Digital output-2.vi" i am giving 1-D array of 1 element which is working without any problem.

I have used Build array function in both example.

In summary 1-D array with single Element input  the DAQ will work but 1-D array with three element ( any number other than one ) the DAQ is not working.

Can u pls verify and let me know the reason.

Download All
0 Kudos
Message 3 of 5
(3,232 Views)
Hi Shash,

I didn't use DAQ before, but I would try to change the mode from 1-Sample to N-samples in the properties dialog of the DAQ express vi...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,227 Views)
Okay, my lack of experience with the DAQ Assistant led to some incorrect remarks. Each element in the array would represent one entire 8-bit port. If you had turned on automatic error checking or had an error indicator wired, you would get the same error that I got  (-200524). This means that the number of channels in the data does not match the number of channels in the assistant. With three elements in the array, there would have to be three ports defined in the assistant.
0 Kudos
Message 5 of 5
(3,226 Views)