Skip to main content
1-Visitor
October 9, 2017
Solved

Issues with Solve Block

  • October 9, 2017
  • 2 replies
  • 3877 views

I'm trying to set up a solve block so I can call it as a function. In the this case it will find what cable size matches the manufacturers specifications and return the subscript for which it is at. But it keeps telling me that the variable is undefined. Can you explain what I'm doing wrong here?

Best answer by terryhendicott

Hi,

 

You have the wrong equal sign.

Capture.JPGCapture2.JPG

You need to change the if blocks to use otherwise statements, as Luc has pointed out you always get 5

2 replies

18-Opal
October 10, 2017

What solve block?

 

How about now as per attached?

Subs.png

23-Emerald IV
October 10, 2017
Subscription ALWAYS results in 5, due to the last statement of the program.

Luc
21-Topaz II
October 10, 2017

Hi,

 

You have the wrong equal sign.

Capture.JPGCapture2.JPG

You need to change the if blocks to use otherwise statements, as Luc has pointed out you always get 5

24-Ruby IV
October 10, 2017

May be the built-in function match solves you problem

match.png

1-Visitor
October 10, 2017

Sorry for ignorance. Could you explain a little more in detail with what I'm trying to accomplish? I'm trying to be able to use this to determine the correct set of manufacturer specifications for the given wire gauge, that needs to be used for the equation such as Rposseq,Xposseq,Rzeroseq, etc... that can use "i" to be able to shift through the equation to given all the answers for the table