The most common reason for getting unexpected results when using an embedded Mathcad document is due to input/output mismatch caused by incorrect numbering.
When you are entering an expression or equation in an embedded Mathcad document, it is important to remember that the input and output keywords begin with the index of 0, and not 1. In other words, the first (top) input connector on the embedded Mathcad document is represented in the Mathcad expression by the keyword in0; the second input by the keyword in1, and so on. Similarly, on the output side, the first (top) output of the embedded Mathcad document takes the value defined by the keyword out0; the second output takes the value of out1, and so on.