LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Step through array

I want to use a For Loop to set the configuration on the various digital i/o's on my Computerboard PCI-DAS1001.

I want to set ports 7-13 as outputs and 16-17 as inputs. I created a 1-D array and populated it with T/F constants. The first 15 are T the last two are F. I set N = 20. I connected the array to the array index
and the output of this to the "bit set" terminal on the configuration vi.

The problem is, when I run the loop, it doesn't step through the array like I want it to. I just keeps outputting T, which is the first element in the array.

What am I doing wrong here.

The vi is attached.
0 Kudos
Message 1 of 3
(2,705 Views)
(1) Place your boolean array outside the loop and use autoindexing. This is preferred.

(2) wire the iteration terminal to the index input of "index array".
0 Kudos
Message 2 of 3
(2,703 Views)
I took a look at the original sample vi in the Measurement Computing example library, and it appears that you have "sort of" copied only the first frame of the 2-frame sequence. The second frame has the "DbitOut.vi" and the "ErrMsg.vi". To get your array to actually give a series of digital outputs to your output card, you will need this second part of the vi. This second frame is where you should have the binary array you wish to send. The first frame is only the port bit initialization, not the actual bit send vi's.
I would suggest you go back to the original example, and make sure that you understand EXACTLY how each section operates. The documentation that comes with the library, and is also available from the Measurement Computing web site should be of great assistance in this regard.

Good luck.
Dave
0 Kudos
Message 3 of 3
(2,693 Views)