Apr. 12, 2019

When specifying hardware and software to be used in a given PC bus application, it is essential to adopt a ‘top-down’ approach. An important first stage in this process is that of defining the overall aims of the system before attempting to formalize a detailed specification. The aims should be agreed with the end-user and should be reviewed within the constraints of available budget and time. Specifications should then be formalized in sufficient detail for the performance of the system to be measured against them and should include such items as input and output parameters, response time, accuracy, and resolution.





Having set out a detailed specification, it will be possible to identify the main hardware elements of the system as well as the types of sensor and output device required. The following checklist, arranged under six major headings, should assist in this process:





1 Performance specification

• What are the parameters of the system?

• What accuracy and resolution are required?

• What aspects of the process are time critical?

• What environment will the equipment be used in?

• What special contingencies should be planned for?

• What degree of fault tolerance is required?





2 I/O devices

• What sensors will be required?

• What output devices will be required?

• What I/O and signal conditioning boards will be required?

• Will it be necessary to provide high-current or high-voltage drivers?

• Should any of the inputs or outputs be optically isolated?





3 Displays and operator inputs

• What expertise can be assumed on the part of the operator?

• What alarms and status displays should be provided?

• What inputs are required from the operator?

• What provision for resetting the system should be incorporated?





4 Program/data storage

• What storage medium and format are to be employed?

• How much storage space will be required for the operating system and/or control program?

• How much storage space will be required for data?

• How often will the control program need updating?

• Will stored data be regularly updated during program execution?

• What degree of data security and integrity must be achieved?





5 Communications

• What existing communications standards are employed by the end-user?

• Will a standard serial data link based on RS-232 be sufficient or will a faster, low-impedance serial data communications standard be needed?

• What data rates will be required?

• What distances are involved?

• Will it be necessary to interface with automatic test equipment?

• Will a networking capability be required?





6 Expansion

• What additional facilities are envisaged by the end-user?

• What additional facilities could be easily incorporated?

• Will expansion necessitate additional hardware, additional software,or both?

• What provision should be made for accommodating additional hardware?









Hardware design





Start by identifying the principal elements of the system including industrial PC, card frame, power supply, etc. as appropriate. Then itemize the input devices (such as keypads, switches, and sensors) and output devices (such as motors, actuators, and displays). This process may be aided by developing a diagram of the system showing the complete hardware configuration and the links which exist between the elements. This diagram will subsequently be refined and modified but initially will serve as a definition of the hardware components of the system.





Having identified the inputs required, a suitable sensor or input device should be selected for each input. It should then be possible to specify any specialized input signal conditioning required with reference to the manufacturer’s specification for the sensor concerned. Input signal conditioning should then be added to the system diagram mentioned earlier. Next, a suitable driver or output interface should be selected for each output device present. Any additional output signal conditioning required should also be specified and incorporated in the system diagram.





Software design





Software design should mirror the ‘top-down’ approach adopted in relation to the system as a whole. At an early stage, it will be necessary to give some consideration to the overall structure of the program, and identify each of the major functional elements of the software and their relationship within the system as a whole. It is important to consider the constraints of the system imposed by time critical processes and hardware limitations(such as the size of available memory). Furthermore, routines to cope with input and output may require special techniques (e.g. specialized assembly language routines).





The software should be designed so that it is easy to maintain, modify, and extend. Furthermore, the programmer should use or adapt modules ported from other programs. These modules will already have been proven and their use should be instrumental in minimizing development time. When developing software, it is advisable to employ only ‘simple logic’ (i.e. that which has been tried and understood). The temptation to produce untried and over complicated code should be avoided. Simple methods will usually produce code which is easy to maintain and debug, even if the code produced requires more memory space or executes more slowly. If the process is time critical or memory space is at a premium then code can later be refined and optimized. It is also important to consider all eventualities which may arise, not just those typical of normal operation. The following are particularly important:





• Will the system initialize itself in a safe state? Will there be momentary unwanted outputs during start-up?

• What will happen if the user defaults an input or if an input sensor becomes disconnected?

• What will happen if the power fails? Will the system shut down safely?

• What input validation checks are required? What steps should be taken if an ‘out-of-range’ input is detected?





More info at Jawest.



