LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert "1D array of dynamic data" to "Dynamic data" after auto-indexing with loop

Hi -

 

I have a question about how exaclty auto-indexing works with the Dynamic Data type when exiting a while loop. I'd like to use the DAQ assistant to record data through an analog input (on the MyDAQ) and then replay that data through an analog output. This works fine if I use the DAQ Assistant to record data for a set amount of time:

 

DAQ_settime.PNG

 

However, I run into trouble when I try to use a While loop with a stop button to record data for an arbitrary amount of time. I set the dynamic data tunnel out of the While loop to "Indexing", but then when it exits the loop, it becomes "1-D Array of Dynamic Data" instead of just "Dynamic Data", and get a broken wire when I try to connect it to the input of the DAQ Assistant. I've also tried converting the dynamic data to Array and Waveform data types inside the loop, but have the same issue (they become 2D Array and 2D Array of Waveform respectively when leaving the loop). Try as I might using blocks like Convert to/from Dynamic Data Type, or Array Subset, I'm unable to get them back down to just Dynamic Data or Waveform, which will be accepted by the DAQ Assistant:

 

DAQ_WhileLoop.PNG

 


One other small note - I'm not sure if using the "Build Array" function with a shift register accomplishes exactly the same thing as just auto-indexing an array out of the loop - so I've tried both, but still have the broken wire issue.

 

I'm assuming this is just a simple issue of using the right block to convert "1D Array of [Something]" to just plain [Something]. Any help appreciated.

 

 

 

Download All
0 Kudos
Message 1 of 13
(9,679 Views)

Notice the difference in the data wire between the DAQ assistant and the build array. They are different data types.

 

Build array is converting the 1D data to 2D. If you right click on the build array, you can turn it to concatenate.

 

Also, I am required to point this out: Get rid of the sequence structures. They are doing nothing in your code. LabVIEW will follow the flow of the wires without the structures.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 2 of 13
(9,674 Views)

When I right click the Build Array function, "Concatinate Inputs" is already checked and grayed out - I can't deselect it.

 

Forget about the Build Array part - I get the same error if I try to just use the auto-indexed tunnel, without doing anything to the data inside the loop.

error.PNG

 

The sequence structures are a remnant of being used to lines of code that execute sequentially :). I'll train myself to get rid of them.

0 Kudos
Message 3 of 13
(9,671 Views)

Ahh, my fault, I didn't realize you can't do that with signal wires.

 

Try the "Append Signals" vi

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 4 of 13
(9,665 Views)

Then you should but the DAQ assistant that outputs values into a For Loop and auto-index on the 1-D array of dynamic datatype on that.

0 Kudos
Message 5 of 13
(9,664 Views)

Hi bfinio,

 

Have you found the solution to this issue?

I'm facing the same problem

 

0 Kudos
Message 6 of 13
(9,554 Views)

Hi U_hend

 

have you tried what was already suggested in the above posts? Show your code and may be we can help

Regards
Freelance_LV
TestAutomation Consultant
0 Kudos
Message 7 of 13
(9,542 Views)

Hi Freelance_LV

 

I just found out that my problem was different than bfinio had. Mine was passing 2D array to a table outside the loop, So, I had 3D array coming out of the loop instead of 2D array. But, I finally found the solution to that, I insert index array before leaving the loop Smiley Happy

 

Thanks for trying to help Smiley Happy 

0 Kudos
Message 8 of 13
(9,537 Views)

Have you found solution for it. I have been also facing problem with converting 1D array of dynamic data to dynamic data.

0 Kudos
Message 9 of 13
(9,042 Views)

I have been facing problem for all temperature values placing the Write to Measurement File outside the Loop. 

 

In Error message it says" Source: 1D array of dynamic data and Sink: Dynamic data".

 

Is there any means of convering 1D array of dynamic data to dynamic data?

 

I would highly appreciate any help.

0 Kudos
Message 10 of 13
(9,021 Views)