03-26-2014 11:00 AM
I have a 2D array of Boolean controls. Which is 6 columns wide by 23 rows long. What I am struggling to do is to read the first row and pass its data to a digital I/O then read the next row and pass its data to the digital I/O and do this for the 23 rows then stop. I have connected an indicator to the subset array function and this will sequentially indicate the data in each row but when i try to output the data from the for loop it only outputs the last row.
Is there a better way to do this ? i have attached the code that i have created so far.
When you click automatic test it should output the 23 bits of data sequentially
03-26-2014 11:17 AM
You need to put your DAQmx Write inside of the FOR loop.
You also shouldn't constantly create and destroy your DAQmx task. Create it once at the start and clear it once during your shutdown.
03-26-2014 11:20 AM
The U32 array exiting the For Loop has a Tunnel Mode=Last Value.
03-26-2014 11:39 AM
Thanks for the replies, your have to bare with me as I'm still quite new to labview. i can see what your are saying about sorting the task once and closing it at the end but when ever i try and and rearange the DAQmx task this is the only format that seems to work. I.e if i move the digital ouput function outside the while loop or the stop and clear functions it doesent work.
when i changethe mode to indexing in creates a brocken wire and says i am connecting two diffrent types of arrays.
03-26-2014 11:53 AM - edited 03-26-2014 11:53 AM
You need to be much more specific than "it doesn't work". Show us your modified code.
Once you enable indexing, you need to wire to an array indicator or some function that accepts arrays.