2 PID´s connected in series!!

Pedro_Teixeira:
hello I am trying to make a control algorithm that takes the output of a PID makes a few calculations and them introduces that value as a Input of another PID. The problem is that the second PID outputs a NAN value.

Is there a way to solve this problem?
Is it even possible to do what I want whith the PID library?

thanks!

I assume that NAN means Not A Number.
Post your code for comment and help as it is impossible without it and we cannot for instance see how the 2 PIDs are defined and used.

As to the general principle, a PID doesn't care about the source of its data as long as it is the correct type. It is, after all, just a computer program. What is it that requires 2 PIDs in series ?