Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Тексты по англ.doc
Скачиваний:
8
Добавлен:
12.11.2019
Размер:
833.02 Кб
Скачать

Table 5. Program Containing an Error

10 C=0: T=0

20 INPUT "NUMBER"; N

30 С = С + 1

40 T=T+N

50 IF C01 THEN 20

60 AV-T/C

70 PRINT "AVERAGE OF"; С; "NUMBERS ="; AV

on PPTNT "******i^!*************:l:*****+****"

Table 6 shows a trace through the program given in Table 5 in which the test in line 50 has been mistyped so that the program calculates the average after only one number has been added to the count. This is shown in the trace. The program can be cor­rected by changing the 1 in line 50 to a 3.

Table 6. A Trace Through a Program

[10] [20] NUMBER? 2 [30] [40] [50] [60] [70] AVERAGE OF I NUMBERS =2

an =|!!|!**”*******!(:*****Ц(********

FRE and CLEAR

During program development you can monitor the amount of unused memory by using the command FRE(O). Any character 'an be used within the brackets; it has no effect on4 the value "eturned. In addition,5 the smaller amount of memory remaining for the storage of string variables can be found by using a particular ease of FRE, namely FRE (" ")- In practice, if the string space

may... slip through - могут... вкрасться "bugs" -“блохи”, ошибки

- by initiating a trace through it - иут<'м иртч-лсиия чг;и1 \ шч.' трассяропки it has no effect on - on nc OKri-iiiinaeT ник.жого плиямии n.i in addition — кроме того

51

is used up' during execution of the program the error message "Out of string space in line..." is displayed. Both versions of FRE may be used in direct mode (preceded by PRINT) or within a program.

The value of variables and strings in memory can be set to zero2 and null respectively by the use of CLEAR. This command may also be used within a program to avoid having to clear variables3 individually.

Documentation

It is important to write down details of the program and its use, for subsequent reference.4 You will find it useful to include the following sections in your documentation: Identification, Contents Page, Summary, Description of the Problem, Specifi­cation of the Problem, Input and Output Formats, Use of Program, Interpretation of Outputs, Modifications, Appendices.

VI. Microcomputers in industry. Robotics machine tools5

Machine tools are a class of metal removing machines such as lathes,6 millers7 and drillers.8 The basis of the cutting process is the movement of the cutting tool in relation to the material in a precise orientation and by a precise amount.9

Traditional numerical control (NC) is based upon the movement being controlled via a pre-prepared punched paper tape.10 The development of microprocessors and compact computers has extended the sophistication of the control available, so that the term "computer numerical control" (CMC)" is used. A diagram of the basic control system is shown in Figure 9. For simplicity, only one controlled movement is shown. In practice, movements in all three dimensions are controlled.

' if the string space is used up — если все место для строк израсходовано

2 can be set to zero — может быть установлена на ноль

3 to avoid having to clear variables—во избежание необходимости сбрасывать

перемгнные л for subsequent reference—для последующи?, справок

5 machine tool — металлорежущий станок

6 lathe -- токарный станок ' miller —фрезерный станок

8 driller — сверлильный станок

9 in a precise orientation and by a precise amount - в определенном положении

и в точно заданных пределах '° punched paper tape — бумажная перфолента " computer numerical control (CNC) — числовое программное управление (ЧПУ)

52

transducer

Figure 9. Basic numerical control system

The actual movement and monitoring of the controlled axes' are carried out by motors and position transducers.2

On the above basis numerical control machine tools have been used for many years prior to the development of the microelec­tronics. The application of microcomputers allows for more sophisticated control. When metal is machined, its cutting properties can vary throughout the workpiece,3 particularly if it is a forging or casting. Microcomputers can add a further aspect of adaptive control by reacting to the current power consumption, torque,^ etc. of the driving motors.

Due to the nature of microcomputer systems a distributed processing approach5 can be adopted for the control of the various

' monitoring of the controlled axes — отслеживание (положения) контролируемых

(координатных) осей

"' position transducer—датчик положения ' when metal is machined, its cutting properties can vary throughout the

workpiece — когда металл обрабатывается, его режущие свойства могут

меняться в пределах одной заготовки (детали) 4 torque—вращающий момент 3 distributed processing approach— принцип распределенной обработки (данных)

' 53

functions of a machine tool. This also allows a modular approach' to the development of the hardware and software. In addition, greater operator interaction for unexpected situations is possible due to the work cycle not being restricted to preprogrammed punched paper tape.

Instead of being a substantial part of the cost of a machine tool, the use of microcomputers makes th'e numerical control cost less and adds relatively little to the cost of the machine tool.

Some control systems are too complex for a single micropro­cessor. One approach is to use a bit slice microprocessor system2 whereby the codes of the data bus are broken into slices" each having the same number of bits (e. g. 16 bits into 4 slices of 4 bits). Each of the slices is then processed in a separate processor.

An alternative to bit slice microprocessors for complex systems is to use several microprocessors together. An example of this is shown in Figure 10.

Operator

Controls

__ l_ __

Tape ^_^ Microcomputer A ^_^ Machine reader щw (data handling) 'w tool

Microcomputer В ^_. Common data .. Microcomputer С (cutter path) щr memory щw (motion of axes)

Figure 10. Д multi-microcomputer system

Microcomputer A acts as a programmable interface between the machine tool and the system. It also handles tape and operator input and output. Microcomputer В calculates the axes motions as a function of time and hence4 the path of the cutter, and

' modular approach модульный принцип

2 bit slice... system —система, секционированная по двоичным разрядам;

система с разрядной организацией

3 whereby the codes of the data bus are broken into slices в процессе чего машинная программа шины данных разбивается на секции

4 hence—следовательно

54

microcomputer С controls the position of the feed axes.' The three microcomputers share a common data memory. As more micro­computers are linked to the machine, a greater on-line processing capability2 is built up. For example, "worksurface programming" is the technique whereby the desired profile of the workpiece is specified and the size of the blank3 is entered. The control system works out the pattern of cuts necessary to produce the component. In some cases, this is displayed on the VDU4 as a check before the operator commits the machine.5

The addition of VDUs to machine tool control systems allows a conversational approach6 which guides the operator when inputting the required data. The use of microcomputers has enabled the development of digital readout systems^ (with memory). The current position of all co-ordinates is displayed and in some cases the display can be switched at any time from one system of units to another and vice versa.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]