Java Reference
In-Depth Information
tankState # NOTFULL;
}
else if (tankState.equals(NOTFULL)
&& tankLevel > MAXIMUM) {
tankState # FULL;
// closes the output pumps of the colour tanks
redController.openPump("PumpB", 0);
greenController.openPump("PumpB", 0);
blueController.openPump("PumpB", 0);
}
else if (tankState.equals(FULL)
&& tankLevel < # MAXIMUM) {
tankState # NOTFULL;
}
else if (tankState.equals(NOTFULL)
&& tankLevel < # MEDIUM) {
tankState # NOTEMPTY;
}
else if (tankState.equals(NOTEMPTY)
&& tankLevel < # 0) {
tankState # EMPTY;
// closes both the output pumps
pumpA.setOutputFlow(0);
pumpB.setOutputFlow(0);
console.pumpASlider.setValue(0);
console.pumpBSlider.setValue(0);
}
}
} catch (Exception e) { e.printStackTrace(); }
}
}
13.5.4
Test
The test case is very similar to that for the first prototype. In addition, we
need to verify the correct behaviour of the PLCs when automatic control is
enabled. This means verifying that the input and output pumps are
opened and closed when the paint level in the tanks reaches the predefined
threshold values. Specific behaviours to verify are the following:
When the output flow from the colour tanks is high (p50 per cent of the
maximum value), the paint level varies between the minimum and
medium thresholds.
When the output flow from the colour tanks is low (`50 per cent of the
maximum value), the paint level varies between the medium and
maximum thresholds.
 
Search WWH ::




Custom Search