LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic data to array help

I can't seem to write dynamic data to an array. See pic. (pic was taken with "index disabled" on the tunnel, but that obviously was wrong.) When I enable indexing i get the broken wire.
I've tried various things but I can't get it to fill the array.
What am I doing wrong?


0 Kudos
Message 1 of 5
(2,949 Views)
When you use indexing for the Dynamic Data, it creates an array of Dynamic Data.  However, when you use the convert from Dynamic Data Type (DDT), it expects a single DDT, not an array of them.  If you want to do this, you would either have to convert it to an array within the for loop, then index those arrays, or you would have to create another for loop simply to index the array of DDT and convert those each to an array, which you of course would have to append together.  I hope this helps.
 
Brian
Brian Coalson

Software Engineer
National Instruments
0 Kudos
Message 2 of 5
(2,929 Views)
Hello,

You're trying to connect the output indexed of the cycle to a different array type. If you just wanna see the array in the way that's comming out the daq assistante, delete the array. Then right click on the auto-indexed output of the "for" and create indicator.


Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 3 of 5
(2,922 Views)
However, if you disable indexing, you will only get the last output from the DAQ Assistant, not all of the reads.  The ways I mentioned in my previous posts are shown in the attached picture.
 
Brian
Brian Coalson

Software Engineer
National Instruments
Message 4 of 5
(2,917 Views)
thanks for your help guys and I was able to get what I wanted (1D array) by adding a "reshape array" function.

Message Edited by xradian on 03-21-2007 04:23 PM

0 Kudos
Message 5 of 5
(2,905 Views)