LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I convert a 1D array of dynamic data to a 1D integer array? The express VI "from DDT" doesn't work with arrays. Thanks in advance

Solved!
Go to solution
Solution
Accepted by topic author borisC

Hi Boris,

 


@borisC wrote:
How can I convert a 1D array of dynamic data to a 1D integer array?

Use a FOR loop to autoindex your DDT array. Place a FromDDT inside the loop and convert to "integer". Create an array by using an autoindexing output tunnel…

 

Suggestions:

  • Don't use DDT wires and ExpressVIs too heavy. You create better code without them!
  • Place more text inside the message body and less in the message title!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(1,367 Views)

Dynamic data is an opaque container that can contain a lot of different stuff. An array of dynamic data is even worse!

Most dynamic data is not really well suited to be converted to an integer array, (typical inner data is arrays of DBL or boolean plus timing and other metadata!) 

 

You should probably ask yourself why you have an array of dynamic data in the first place. What does the data represent? What you want to do with it?

 

I have the nagging feeling that you are looking for a solution in the wrong place. Maybe the problem should be solved more upstream. I am sure we can give you much more specific advice once you show us a (possibly simplified) version of your code.

0 Kudos
Message 3 of 4
(1,338 Views)

Try using the "To Double Precision Float" function (under Numeric -> Conversion).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 4
(1,322 Views)