You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Both The Three Way And Two Way valves will look the same code vise. The difference is in how they operate, but for implementation they will look identical.

Lets start by identifying the required inputs and outputs:


INPUTS:

  • openCMD → BOOL
  • override → INT


OUTPUTS:

  • valveSignal → BOOL
  • valveState → INT

Here OpenCMD is the signal which the controllers are going to use for commanding a valve to be opened, while valveSignal is the actual signal which is sendt to the Valve. Since none of the valves has any feedback system, It will just be trusted that they valves work.

The override input is utilized for external control of the valves . Here the override function can take in three values. These values are 0, 1 and 2 which are mapped to the following,


Override ValueFunction
0Automatic Mode
1Manual Off
2Manual ON
  • No labels