Simulation is for inputs
You generally wouldn't use a PID / PIDE block to to simulate, especially if the response that you're looking for is the result of a PID. Not saying that it's impossible, just not how I would approach it
The PID block monitors an analog input, and produces a 0-100% signal to drive an analog output (or the time-slice of a discrete input). In theory, you could reverse the concept, feeding another PID's output and using it to drive that other's PID's AI, by inhibiting the input module and writing to the Local:x.I address.
But there are other, perhaps better ways.
Method 1:
If you are only interested in checking if the valve opens when the AI goes high and closes when the AI goes low, then you can simply force the raw AI value (using either forces or inhibiting the I/O module). This gives you complete manual control, and you can simply enter in various numbers and watch the result.
This method can be modified to use internal registers and expose them to the HMI, and have an InSimulationMode bit that enables the logic and provides the end-user the ability to drive the simulation themselves. Handy for FAT.
Method 2:
If you want to get fancy, you can write some code that writes to the AI address. I typically build an AOI that can be configured to work with fairly complex responses.
It's based on the equation
Code:
(PV + k[sub]a[/sub]*PV[sub]a[/sub] + k[sub]b[/sub]*PV[sub]b[/sub] + k[sub]c[/sub]*PV[sub]c[/sub] .... )
PV' = ---------------------------------------
(1 + k[sub]a[/sub] + k[sub]b[/sub] + k[sub]c[/sub] .....)
where
PV is the most recent PV (code triggered on a timer)
PV' is the new PV.
PV
a, PV
b, etc. are various PVs determined by the current process (see below)
k
a, k
b, etc. are weighing factors for how much each PV component affects the current one.
For example, PV
a could be the PV that the PID is trying achieve be it's current CV. I generally linearize this, so that at CV = 100%, the PV
a will equal some max, at CV = 0, PV
a will either be some minimum value (ambient temperature, or 0 PSI, 0 GPM, or whatever whatever seems appropriate, OR it could be PV', if the CV only adds energy but does not remove it.
PV
b could be set up as a load, which may be constant or which may depend on other process conditions. The "load" can also just be "ambient" (22°C; 0 PSIG) to simulate radiant cooling or leaks.
PV
c might be an upstream condition, like in temperature recirculation loops. I'll often put the upsteam PV in a time-driven FIFO to simulate process lag. The same can be done with the PV from a PID output.
And so on. If the k value = 0, the contribution of that PV is disabled, which means I can build a complex AOI, yet only use the number of factors that are needed for a particular process.
With this, you can get as creative as you want / have time for, and make the system appear as realistic as you need.
Good luck!