Published online by Cambridge University Press: 05 March 2013
In this chapter, we develop the controller of another complete example: a mechanical press. The intention is to show how this can be done in a systematic fashion in order to obtain the correct final code. In Section 1, we present an informal description of this system. In Section 2, we develop two general patterns that we shall subsequently use. The development of these patterns will be made by using the proofs as a mean of discovering the invariants and the guards of the events. In Section 3, we define the requirement document in a more precise fashion by using the terminology developed in the definition of the patterns. The main development of the mechanical press will take place in further sections where more design patterns will be presented.
Informal description
Basic equipment
A mechanical press is essentially made of the following pieces of equipment:
a vertical slide, which is either stopped or moving up and down very rapidly;
an electrical rotating motor, which can be stopped or working;
a connecting rod, which transmits the movement of the electrical motor to that of the slide;
a clutch, which allows to engage or disengage the motor on the connecting rod.
This is illustrated in Fig. 3.1.
Basic commands and buttons
The following commands can be performed by means of buttons named respectively B1, B2, B3, and B4.
To save this book to your Kindle, first ensure [email protected] is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
Find out more about the Kindle Personal Document Service.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.
To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.