LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

source is double sink is 1D-array of double

I am getting this message when I wire something. 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. What is source and sink?
0 Kudos
Message 1 of 10
(11,696 Views)
Source is the terminal or wire that you are trying to connect from. Sink is the last terminal that you are trying to connect. Right click on each spot and create a constant. You will see the difference.
Message 2 of 10
(11,692 Views)
Is it possible that you are trying to wire a value that is generated in a For loop to something? Any time you wire a value out of a For loop, the value is automatically indexed into an array so you'll have all of the values generated in the loop. This could be where your 1D array is appearing.

If this is the case, look at the tunnel where the wire is running out of the loop. Instead of it being a solid box, it will be white with small brackets in it. This indicates that an array is being built as the loop runs. You can turn this feature off on a tunnel by tunnel instance by right clicking on the tunnel and selecting "Disable Auto Indexing". Note that with this turned off, you'll only get the last value generated in the loop.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 10
(11,691 Views)
Ed Dickens, You are right. Is the data out from the FOR LOOP source or sink? Actually I want to use ALL the data from the LOOP, thus I do not want to do auto-indexing. Is there a way out? Change the source or the sink? If so, how?
0 Kudos
Message 4 of 10
(11,683 Views)
Just delete the offending wire, then right-click on the output tunnel of the loop and select "create indicator". It will be the correct type. 🙂
Message 5 of 10
(11,676 Views)
Anything that produces data is a source. Think of it like watering your yard. The sprinkler is the source of teh water, the grass is the sink.

If you want all the data from the loop, then you DO want auto indexing enabled. This is what automatically builds the array on the edge of the loop. If you da as Altenbach suggested, you'll have the correct indicator for the array.

The problem you may be having is that now that you have an array, you have to use the array functions to get at the individual values in the array. To get to a single element, wire the array into the "Index Array" function. The 'Index' input specifies which element wil be passed through the function. a '0' will give you the first element, a 1 will give you the second element and so on.

Does that take care of the problem?


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 6 of 10
(11,659 Views)

Apreciate Ed. I lost an hour of my life to solve this problem. Your hint is good one. I'm pleased! Thanks!

There's other question connected with previous one. I'm using a For Loop and when LabVIEW's getting in loop it's trying to complete cycle. But i want to stop it before finishing by pushing a button on the front panel. I have no idea!. Thank you!

0 Kudos
Message 7 of 10
(11,329 Views)

You really should start a new topic. The post you are replying to is 5 years old, and your NEW question has nothing to do with the subject of the post.

 

Alan

0 Kudos
Message 8 of 10
(11,320 Views)
Hello somebody can help me, i have a problem connecting two terminals in an struture case, it displays the message "The type of the source is cluster of 6 elementes"
The type of the sink is 1D array of string how i can connect this wires?
0 Kudos
Message 9 of 10
(8,503 Views)

Start a new thread.  This message is originally 10 years old.

 

When you do, attach your VI.  We can't trouble shoot a problem like that that is described with a short sentence.

 

The problem is you are trying to connect two things together that can't be connected together.  What are your really trying to do?  What is the source of your data and what are you trying to connect it to?

 

 

0 Kudos
Message 10 of 10
(8,458 Views)