LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

You have connected two terminals of different types

Hey guys,

 

I am making a VI to calculate and display the first ten numbers of a Fibonacci Numbers, and I think I am really close, but I get the "You have connected two terminals of different types" error. I am not looking for someone to do my hw (although I would appreciate the tips if you have any to give), I'm more worried about me understanding what that error means and how to fix it for now and future situations?

In the pictures bellow, when I try to connect the shift register straight to the array, I get the error, but if I send the data though the wire instead the shift register, the array doesn't update. Is there a specific methodology to fix an error like that? What am I doing wrong?

 

Thank you for your time guys!! 

0 Kudos
Message 1 of 4
(1,428 Views)

1.JPG2.JPG3.JPG

0 Kudos
Message 2 of 4
(1,426 Views)

Well, you can't connect a scalar to an array.  When you hover your cursor over the broken wire, it will tell you that.

 

As for your second question, what do you mean by "it doesn't update"?  When your VI runs, you'll get an array after the loop is done running which means pretty instantantly.

 

PS:  You should probably use I32 for those data types rather than I8.  I8 will only allow you to go up to +127.

Your expanded shift register node servers no purpose as you never use the value of from 2 iterations ago.

 

 

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

To get help, attach our VI. we cannot debug pictures.

 

It is very unusual to mix feedback nodes and shift registers for no reason. If you want to use an expanded (to two histories) shift register, the feedback node is not needed. See if this can give you some ideas.

 

Keep it simple! Make sure you fully understand the code.

 

Compare the output with an internet search. it needs to be:

 

[0, 1, 1, 2, 3, 5, 8, 13, 21, 34] for the first 10 numbers.

 

altenbach_1-1595951553726.png

 

 

0 Kudos
Message 4 of 4
(1,390 Views)