LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

source is double sink is 1D-array of double

My source which should be the (command out) is double of 51 values I want to connect it an array to see all the values. however, I am getting this message. These cannot be wired together because the data types do not match. The type of the source is double. The type of the sink is 1D-array of double. I am attaching an image of my block diagram and as I am totally new to labview any help and explanation is appreciated. proplem.PNG

0 Kudos
Message 1 of 6
(4,776 Views)
The error is pretty clear. Your function is returning a scalar, not an array of 51 values. Other than that, the image is not useful since you did not use the proper format (an actual snippet), attach the VI, or even mention what the subVI is that you are using.
0 Kudos
Message 2 of 6
(4,761 Views)

This is very fundamental LabVIEW.

You cannot force a scalar value into an array.

I suggest taking some LabVIEW tutorials. You need to learn how to crawl before you can walk. No shortcuts.

 

0 Kudos
Message 3 of 6
(4,758 Views)

It appears that the subVI you used does not do what you expected.  Perhaps it sould be inside of a FOR loop with autoindexing tunnels?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(4,741 Views)

Erm? What about the 'Build Array' function? Of course, the OP would get just a single value in the array and is probably looking to create some sort of buffer of the data - but you can force a scalar into an array!

 

MostTrivialSnippet.png

 

The fact that this is the most trivial VI Snippet I have ever put on these forums does make me think that perhaps you should try some LabVIEW tutorials!


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 5 of 6
(4,732 Views)

The blue VIs with the green headers are generated by the shared library import wizard which creates wrappers for DLL functions. You will need to read the documentation for that DLL (MIRA05?) to see how the specific functions work. Since the wizard uses the C header file to create the wrappers, my best guess is that it was imported correctly and that you do need to call the function in a loop and give it the index of the value you want every time, as someone suggested, but that's just a guess. You really need to read the documentation for it.


___________________
Try to take over the world!
0 Kudos
Message 6 of 6
(4,703 Views)