• No results found

Teach operations with a force sensor for a linear robot arm

N/A
N/A
Protected

Academic year: 2021

Share "Teach operations with a force sensor for a linear robot arm"

Copied!
72
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Citation for published version (APA):

Galet, E. (1986). Teach operations with a force sensor for a linear robot arm. (TH Eindhoven. Afd. Werktuigbouwkunde, Vakgroep Produktietechnologie : WPB; Vol. WPB0255). Technische Hogeschool Eindhoven.

Document status and date: Published: 01/01/1986 Document Version:

Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website.

• The final author version and the galley proof are versions of the publication after peer review.

• The final published version features the final layout of the paper including the volume, issue and page numbers.

Link to publication

General rights

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain

• You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement:

www.tue.nl/taverne

Take down policy

If you believe that this document breaches copyright please contact us at:

openaccess@tue.nl

providing details and we will investigate your claim.

(2)

By: Eric Galet

Universite de Technologie de Compiegne

(3)

At the end of my training period, I wish to express my acknowledgements to my coach, P.C. Mulders, for his

advice and his kindness.

Greatest thanks also to H. Smit, who by his competence contributed to the good march of my trainee.

I also want to thank Rogier, Ineke for creating with the others a nice atmosphere of work and specially Lia who typed this report.

(4)

T.l The Technische Hogeschool Eindhoven I.2 The education at the university

T.3 The Mechanical department II PRESENTATION OF THE WORK

11.1 The Research Program FAIR 11.2 My Practical Work

III THEORY ABOUT TEACHING OPERATION 111.1 The Manual Displacement Method 111.2 The 'Dummy' Arm Method

IV

V

VI

111.3 The Telecontrol Method FIRST APPROACH, FIRST DESIGN IV.1 The Linear Robot Arm

IV.2 The Equipment of the Linear Robot Arm The Force Sensor

The 'Hall Effect' Switches

The Incremental Linear Transducer IV.3 Design of the System

THE DEVELOPMENT OF THE EQUIPMENT

V.l The intellec serie III micro computer s~stem V.2 The ISBC 86/05 single board computer

V.3 Interface force sensor/ISBC 86/05 V.4 Interface drive system/ISBC 86/05 V.5 The switch debouncer

V.6 The 'hall effect' switches card V.7 The hardware interrupts

THE SOFTWARE

VI.l The basic flowchart of the program

VI.2 Explanations of the interrupt procedures VI.3 The interrupt handling

VI.4 The use of ASSEMBLY-86 interrupt procedures VI.5 Remarks about the program

VI.5 Conclusion VII Conclusion VIII Appendix 3 3 3 6 6 7 8 10 10 12 15 16 ~ 6 16 19 21 23 24 25 26 26 28 29 32 35 36 37 38

(5)

I . PRESENTATION OF THE WORK ENVIRONMENT

I 1 . TECHNISCHE HOGESCHOOL EINDHOVEN

The Eindhoven University of Technology has been founded in 1956. It offers nine courses of study in which students can qualify as graduate engineers specializing in the following subjects:

- Technology in its social application

- Industrial engineering and management science - Mathematics - Computing science - Technical physics - Mechanical engineering - Electrical engineering - Chemical engineering

Architecture; structural engineering and urban planning. Since the Eindhoven University of Technology opened in 1957 more than 6.600 students have graduated from it. The degree of doctor in the technical sciences can be obtained by students submitting a doctorale thesis on research, they have carried out.

I 2. THE EDUCATION AT THE UNIVERSITY

A full University course in the Netherlands used to take at least 4 years. University studies are divided in two phases.

The first phase has a duration of 4 years and comprises two examinations: The first or preliminary examination at the end of the first year and the final examination at the end of the fourth year. Students are allowed 2 extra years to complete this first phase. The first examination has to be passed at the end of the second year at the latest.

The second phase will be introduced in the adacemic year 1986;87. It covers three types of training:

- Further professional training as physician I pharmacist,

dentist, veterinarian with a maximum of two years.

- Professional training of teachers for secondary school with a maximum of 1 year.

- Training for research and technological design with a maximum of 1 or 2 years.

(6)

Design and production are the two main groups into which the highly varied tasks of mechanical engineers are divided. The nature of the tasks carried out by mechanical engineers varies from scientific research and development to industrial organisation. A part from their theoritical knowledge mechnical engineers must possess specific practical skills. To this end the curriculum includes, among other things, participation in the work done by the department in its four divisions:

- fundamentals of mechnical engineering - product design and development

- apparatus design for industrial processing - production engineering an -automation.

In this department, there are about two hundred employees (teachers, technical personel) and nine hundred students.

(7)

II . PRESENTATION OF MY WORK.

II 1 , THE RESEARCH PROGRAM 'FAIR',

(Flexible Automation and Industrial Robots),

The Research Project 'FAIR' has been established for research in the field of Flexible Automation and Industrial Robot. It's financed and directed by the dutch government. At the Eindhoven University of Technology, the mechanical and electrical engineering departments are involved in this project. They try to find an approach to improve the flexibility with the aim of designing components for flexible automation equipment. In addition of researchers, students carry out their graduate work on detailed problems of the program. I had to work with some of them.

The project is divided among several parts:

1. General aspects of fixed and flexible automation 2. Parts feeding and handling

3. Kinematics, dynamics, design aspects 4. Drive and control system, programming 5. Sensor control Welding.

II 2 . MY PRACTICAL WORK

At the University ,in view of Flexible Automation a one dimensional robot arm has been developed in order to get more experienced with problems such as position regulation, welding, etc.

According with that aim, the subject of my work was defined as follows: Development of a force sensor and hardware on a one dimensional robot arm to achieve teach operations.

The interest of that report is to describe the realization of programming a robot arm by teaching. The operator should be able to program the robot using the "Teach" mode, running the robot through the desired movements and then record the moves for later reproductions or play-back. There are several ways to guide the robot through the required pa.th: either the use of a remote manipulation system (joystick, teach box) or by a manual drive of the robot body. Our interest will be for the second possibility.

(8)

One might think that the simplest method is by physically grasping the robot end effector and leading it through the required path at the required speed, while simultaneously recording the continuous position. There are robots in which this method can be applied (by disengaging the motors in the case of electric robots or reducing the oil pressure in case of hydraulic ones). However because of the transmission elements (such as gears and leadscrews) in t.he robot manipulator, it might be impossible t.o generate a motion of the robot joints by pulling its end effector. Rather than diminishing the effects of the transmission syst.em, the idea is to take advantage of them to move the robot. The figure below describes the general configuration.

f1

on

i ,",OR

Rabol-I<ttyba.utd

During the teach mode the robot is used as a sensory controlled robot. The direction of the desired movement is given by a three-dimensional force sensor grasped by the operator. Then the control of the robot is a function of the information sensed from the end effector: a processor unit drives the different motors and handles at the same time position devices which allow you to store either the path end points or continuous positions.

e My practical work was to perform that teach operation for a one dimensional robot arm fitted with a force sensor.

The project included the design and implementation of teaching operation on an Intel Single Board Computer 86/05. Further requirements are accuracy of recorded positions.

(9)

The firs't at least colleagues be used.

part of my job was to decide a planning of my timet or to define the different steps to take. My coach and my helped me much because they knew which equipment might The first part of my

teach operations. One about robotics.

report concerns a general inquiry about can find this information in every book Afterwards, ! received precious help from my colleagues, so as to get the required knowledge about the equipment such as the robot. However, that gave me some problems, because the previous reports about this subject are written in Dutch.

Anyway, that first approach permitted me to design a first system. After improving the hardware possibilities, for instance the Intel Single Board Computer ISBC 86/05 and the interfaces lanalogt to ddigital

t• digital to analog converters( incr~mental

(10)

III . THEORY ABOUT TEACHING OPERATIONS

To realize this teaching operation project, it might be useful to inquire, at first, about the theory of that programming method. When studiing the actual methods for programming a robot I

teaching operations with a force sensor appear to be a combination of them wich includes advantages of each method. The most commonly used programming method for servo controlled robots is direct training of the robot. This method is called dTeaching by doing", otherwise programming is carried out using a language. All methods of programming by training are based on a physical demonstration of the task to be performed.

There are three methods of moving the robot:

- manual displacement method (without any power transmited to the motors)

- the dummy arm method (master-slave)

- telecontrol method (by teach box or syntaxer). III 1 . MANUAL DISPLACEMENT METHOD

The human operator moves the robot manually. For the 'point to point' robots, when the required configuration is reached, the recording is activated by a command switch. Such method can only be used if the system allows motion by direct action on the axes and not only by the motors. Then the robot is called reversible. The final condition is that the forces required to move the robot must be compatible with the physical strength of the human operator. With 'Recorded Trajectory Robots', the trajectory is recorded by sampling. In both cases, manual movement will not be very precise, because the positions recorded without any power do not correspond to the positions when motors are controlled.

(11)

The manual movement method is used with small robqts and in case the degree of precision required is not very large.

III 2. THE 'DUMMY' ARM METHOD (Robot simulator - Teaching arm)

The robot is replaced by a mechanical structure with identical geometry but unmotorized and very light. It's equipped with position feed back devices. The operator teaches the end points or the path to the robot and is not hampered by the mass and actuators of the robot.

Although t.he advantages of the robot simulator method are the simplicity of direct programming and small human force required, it has also some disadvantages:

The problems of precision are the same as before, with the added differences that may exist between the dummy and the robot (structure, sensors) and between the position of the dummy and that of the robot

This method is manual, a high precision cannot be achieved an investment in a simulator is required

(12)

III 3 . THE TELECONTROL METHOD

The robot is moved by its actuators which are controlled by the operator. For 'Point to Point' robot control is established using a control box or teach box or teach pendant. The control box is equipped with an array of switches which allow the degrees of freedom (D.O.F) of the robot to be actuated one by one, until the combination of all axial positions gives the direct position of the robot. The technique of moving axes using binary switches is extremely difficult to make. The coordination of several OOF is virtually impossible 50 the operator works sequentially on one

OOF at a time.

In order to provide teaching flexibi~itYI several teach modes are developed using coordinate transformers: worldl tool.

In the world mode, the robot moves in a reference coordinate system fixed in the robot arm base. In the tool mode, the tool moves in its own coordinate system. The robot computers calculates in real time the required individual joint motions.With those methods, performance are improved.

A new method is developed to solve more problems: a syntaxer or joystick allows real control of the robot, by acting simultaneously on several OOF without constraint. The syntaxer is like a dummy arm ,but total precision is not essential, since the human can observe the effect of his commands. The only fault which is found with this method is that the human operat.or is not longer in direct contact with the robot .

. .

.

.

. .

. .

.

.

.

.

(13)

Because each disadvantages, them.

of those it may be

three methods has advantages and interesting to find a compromise of

Several aspects may be considered:

the method must be compatible with the strehgth of the human (as the dummy method)

- the repeatability of the recorded trajectory and the executed traje'ctory must be optimal: the actuators must not be inerted

- the operator must have a physical contact with the robot in order to realize the desired task.

- the task of the operator may not be complicated SO as to

limit the number of trials and to reduce the time while the robot is tied up during teaching mode.

Teach operation method with a force senso~ reaches these conditions. It appears as a compromlse of manual displacement, robot simulator and telecontrol methods.

While this method has much advantages, it has at least one disadvantage:

In some applications, when a gripper is used, then it may be difficult to integrate a force sensor method to teach the movement of the gripper. So you may use another device (Teach pendant, syntaxer, dummy gripper) . Anyway a welding operation doesn't require any gripper.

(14)

IV . FIRST APPROACH. FIRST DESIGN.

I had to apply the theorical aspect of the teaching operations to the Linear Robot Arm. I studied the possibilities it offers in order to design a first system.

IV 1 . THE LINEAR ROBOT ARM.

The linear part

Arm.

The

Arm is constructed of two parts: a mechanical stem. The f ure below shows the Linear Robot

.

(15)

The drive unit contains a power amplifierl an actuator (DC servo-motor) and also a tachometer.

The motion is controlled by a closed-loop system. That system compares speed references with feedback signals to determine the errorl which is amplified and used to generate drive motions. The control of the motion of the arm commands the rotational motor speed by manipulation of the motor voltage. The robot arm is treated as a load disturbance acting on the motor's shaft. Then the variations in the movement of inertia affect only the time constant of the response but don't result in any unwanted consequences and don't affect the required time to reach the target position. This control approach by manipulating the

De-motor voltagel fits with our application. For the welding the

specification of velocity is appropriated. The figure below shows the analog servo-system.

(16)

IV 2 . THE EQUIPMENT OF THE LINEAR ROBOT ARM.

In addition to the drive system/ the Linear Robot Arm is also equiped with other devices:

- a force sensor

- two 'Hall effect- Digital Switches - an incremental linear transducer.

The Force Sensor

The force sensor has been built by an other stagiars of the THE. It measures the component of the force in the direction of the spindle. The signals sensed by the strain gauges are amplified and sent as a voltage value between -4 and +4 Volts.

An Analog to Digital Converter transforms the measured voltage to a binary datas which will be used as input for a computering system.

The 'hall effect' switches

The role of the 'hall effect' switches is to be able to sense the end position of the arm. When the end position is reached a pulse of +5 V is sent. (appendix J )

The incremental linear transducer.

The incremental linear transducer allows us to measure the position. The output signals (K

1, K2) of the transducer are two square-wave signal trains, TTL-compatible and a reference mark used for initialization of measures.

Because it's an incremental system, the output signals are not usable, directlYI to count. We might transform them in order to get other signals which contain more informations, such as the direction of the movement.

A card was realized to perform that purpose. The pulse/edge converter card is described in appendix F in more details.

(17)

OUTPUT SIGNALS FROM THE INCREMENTAL LINEAR TRANSDUCER

K~

::...J

t

I

.1

I

I

I

.s, ..

,

I

"1

I

IC~ •• $L

J

,,,~,,,

ltO

~'"

..

...

OUTPUT SIGNALS OF THE PULSE/EDGE CONVERTER

The signals Kjl d K2 are transformed to COUNTUP and COUNTDOWN signals. Also tne~~tch is reduced from 40 ~m to 10 ~mJ that gives a higher precision.

Although some progress have been done, the position counting is not yet complete. We had to find a solution to use those signals

(COUNTUP and COUNTDOWN). Position counting solutions:

Most of the developments required for our application have typical solutions (such as analog to digital convertion). However we wanted to inprove a new method to check the position.

L

1

(18)

Previous realisations with the robot arm have used a home-made computer board fitted with a 8085 Intel Microprocessor 8-bits. This product will be replaced because it's getting too old and t.oo slow, by the INTEL Single Board Computer 86/05 fitted with an 8086 Intel Microprocessor-16 bits. This computer gives new possibilities for us to handle the development of the equipment. We will describe it more detailed in paragraph

The problem of position counting can be managed in several ways. We had at least three soluations with advantages and disadvan

tages.

use the on-board counters; This method could be very useful, but for our case, all counters were already used (sample time of the force, serial communication) and then not usable for that purpose.

antoher solution can be an external card fitted with required counters and latches to allow parallel I/O communications with the computer: this solution as the previous one is quite easy to handle but the low reliability of the hardware card is a disadvantage. at last,

r

could use a software solution.

For example, I can receive the pulses through the interrupt lines of the computer board and count them by some software. In t.his case we don't need any new hardware. It's an important advantage.

We had to make a choice: it would be the third method, because we did like to have little hardware.

(19)

IV 3 . DESIGN OF THE SYSTEM .

.

~~---:_ft_._~_.t

__

~---~~~-f.~--~~~_._:~_~_.

__

~

..

"'!t---...

c. ... " ...

tc. ..

I---_____ - ... - ...

'1~c. .. " . .

"''ct...\

(20)

v .

DEVELOPMENT OF THE EQUIPMENT.

In this part, we will describe the development of the required equipment with the help of Intel products environment:

- The Intellec serie III micro computer and its features - The Isbc Single Board computer 86/05.

and then we'll look at the implement of Interfaces between the omputer and the robot's devices:

- Analoq to Digital conversion - Digital to Analog conversion - The Edge/pulse converter.

V 1 • INTELLEC SERIES III MICROCOMPUTER DEVELOPMENT SYSTEM.

The INTELLEC serie III micro-computer development system is more than a keyboard, a video display and disk drives. It's a real tool for designing microcomputer software for the IAPX 86/88 processor.

I used this system to program Assembly for the 8086 and also Pascal '86. We are also able to write programs, debug them, link them, locate them and run them on the system itself, or on its boards.

V 2 . THE ISBC 86/05

a) ~T~h~e~~I~S~B~C~_8~6~/~0~5~~S.in~.q~1~e~~B~o~a.rd~~C~o~m~p~u~t~e~r~a~n~d~~t~h~e~I~N~T~E=L

environment

The ISBC 86/05 single board computer is a member of Operational Equipment Manufacturers microcomputer systems.

The ISBC 86/05 is a complet computer system on a single printed circuit card. The CPU, System clock, read/write memory, non-volatile ROM, I/O ports and drivers, serial communication interface, priority interrupt logic and programmable timers, all reside on the board. Multibus interface logic is included to

(21)

offer capatibility to communicate with Single Board Computers, expansion memory options, digital and analog I/O expansion board and peripheral controllers.

We used the ISBC 957 Intellec-ISBC 86/05 Interface and execution package which provides the hardware and software required to interface an ISBC 86/05 Board with an Intel Intellec Microcomputer Development system.

So after working the programs on Intel Microcomputer Development System, we run the program on ISBC 86/05.

b) The possibilities of the ISBC 86/05

The ISBC 86/05 Single Board Computer is a complete computer system .on a single printed-circuit. It includes

a

16-bit central processing unit (CPO), 8 K bytes of dynamic RAM, a serial communication interface, three programmables parallel I/O ports, programmable timers, priority interrupt control, expansion to be interfaced with other boards.

Among its features, I'll speak about those which are of special interest for my project.

The ISBC 86/05 includes 24 programmable parallel I/O lines implemented by means of a Intel 8255A PPI (Programmable Peripheral Interface). The system software is used to configure the I/O lines in any combination of bidirectional I/O and bidirectional port.

The RS 232C compatible serial I/O port is controlled and

interfaced by an 8251A USART (Universal

Synchronous/Asynchroners/Receiver/Transmitter) chip.

Three independent, fully programmable 16-bit interval/event counters are provided by an INTEL 8253 PIT (Programmable Interval Timer). Each counter is capable of operating in either BCD or binary mode, two of these counters are available to generate accurate timers.

The Intel 8259A PIC (Programmable Interrupt Controller) can handle up to eight interrupts. By using external PIC's slaved on the on-board 8259 (Master), the interupt structure can be expanded to handle and reduce priority of up to 64 sources.

The PIC, sensitive interrupt

which can be programmed to respond to edge-or level-sensitive inputs. After resolving the priority, it sends a single interrupt request to

(22)

the CPU. Interrupt priorities are independently programmable by means of software control.

The CPU includes a non-maskable interrupt (NMI) and a maskable interrupt (INTR).

The 8259A provides source to the CPU. by 4 to device a interrupting device.

an 8-bit identifier of the interrupting The CPU multiplies the 8-bit-identifier pointer to the service routine for the The first step was to

installation procedures of defined environment.

carry out the configuration and the Single Board Computer, for our A variety of jumper and switch options allow the user to configure the board for his particular application.

You may find in appendix X, the list of most required jumpers switches we used.

(23)

V 3 . INTERFACE FORCE SENSED/ISBC 86/05 COMPUTER.

The features of the analog force sensed are as follow:

The signal issued from the strain Gages is amplified by a MESVERSTARKER KWS/35-5, in a range from - 4 V to + 4 V.

That analog bipolar voltage is then input in the analog to Digital Converter Card fitted with a AD 570 (appendix H ) which accepts bipolar (- SV to + 5V) analog inputs and performs a 8-bit conversion in 25 ns.

Control description of the ADC

As the BLANK and CONVERT input is driven low, the outputs will be open an a conversion will commence. Upon completion of the conversion, t.he DATA REApY. line will go low and the. data will appear at tlie output. Pu hng the BLANK and CONVERT lnput hlgh blanks the out.pus and readies the ADC for the next conversion. (see figure bellow).

CONTROL OF THE A.D.C

Then to perform this conversion ,I might do the following interfacing to ISBC 86/05:

The parallel I/O port B, bits 0 to 7/ is reserved to input the 8 bits sent by the ADC CARD. To handle those inputs, we

've installed input terminators on required IC sockets to interface port B with Intel 8255 A PPI.

The parallel I/O port C bit ~ handles the output BLANK and CONVERT. A driver SN 7405 interfaces port C bit ~ with Intel 8255 A PPI.

The Parallel I/O port C bit 4 handles the input DATA/READY it is interfaced with intel 8255 A PPI by an terminator. The ADC CARD is detailed in appendix

(24)

,

:t'0 ._"" I.,," ':J

V

Ilb S:fC

fo"(.e..

Pe. ....

~

~

,t.;,,,,

~

• 0

tOW'r

t. 0

a,,"vy.

al

<,o"vttU:

p.y," C

It

:.. 'J>""""

, SA .. ., ,

/A\

/,.'

,

, . .. U.

t"~

h."so'

(25)

V 4 . INTERFACE ISBC 86/05 VOLTAGE INPUT OF THE MOTOR DRIVE SYSTEM

The interface computer/input voltage of the motor drive should allow us to command the motor by inputing in its drive system a voltage from -10V to +10V.

The DAC-~8 MULTIPLYING CONVERTER (appendix G ) performs the

Digital to Analog conversion in 85 ns.

We used a bipolar output operation as follow:

.I.!:m!lt Hexa bit 0 1 2 3 4 5 6 7 FF 80 7F 00 1 1 1 1 1 1 1 0 0 0 0 0 0 0

o

1 1 1 1 1 1 1

o

0 0 0 0 0 0 0 General description : OUTPUT VOLTAGE - 10 V - 50 mV + 30 mV + 10 V

The ADC-08 is inplanted on a card (see appendix ); you are able to modifie gain and offset of the amplification stage,

through potentiometers.

The parallel IIO port ,bits 0 to 7, handles this output. The interface port A/INTEL 8255A PPI is realized with a bidirectional data buffers.

(26)

:tS'Bt '('OS :D fit.

t."

ItJ)

,

..

,..\\

..

\ 1./0 , .. h ""'h 1

~

"'t.Ot

,

I

p.,\-A

,

t t.ils

V

~ t • 0

Y"

~

S"'.,.

V

c."",,-,

(27)

V 5 . THE SWITCH DEBOUNCER.

To record a wanted position, you have to press a button. The button is a mechanical switch. It sends an interrupt to the on-board Programmable Interrupt Controller. It appeared that the switch contacts did not open or close cleanly: at closure there are several separate contacts over a period of many microseconds.

It gave more than one interrupt. A switch debouncer removes the bounce by responding to only one of the voltage excursions during each switch operation.

The figure below shows NAND gates (appendix I )

.

t.he

switch debouncing circuit using The output is connected to the interrupt matrix of the ISBC 86/05 Board (see paragraph V.7

-411-... ----0v.\t""\>

\-0

,,,,ht'f',,tr

w.a.\-.. ';,c

C)

s.

'4wa\ ttL

(28)

v

6 . THE 'HALL EFFECT' SWITCHES CARD.

The signals emitted by the two 'Hall Effect' switches don't have a nice shape.

To fit up the waveform, I used a NAND SCHMITT TRIGGER Integrated Circuit (appendix I ), for my pulse shape card. At the moment of switching, the circuit increases the edge of a pulse.

The figure below describes the circuit and the waveform' correction.The outputs S1' S2 are connected to the interrupt matrix of the ISBC 86/05 Board. (See paragraph V.7 ).

V _I _ _ _ V ...

~

VNi1 __ _

~

1%84130.1 UGM U<irt( ,

..

10\1"T 'lcW~.T \

...

,

,

t. ')

--

....

-

-

-

- - -

....

.

-..L

-r:

.... t

.,V

1.~'1 ~A.

..

. "'

...

,

1"-

I----,

$'1

,

sa. :

...

..

...

S ".

.

t..l \{Ja..

...

e

.

~

"~1

,

1

I

I

- - - -

-

--

... ---~----

- - - - ___ £.B.Q

I

(29)

V 7 . THE HARDWARE INTERRUPTS.

Most of the informations issued from the Linear Robot Arm were used as interrupt.

ZP ... Zero Postion COUNTUP, COUNTDOWN ... Incrementation,

Decrementation of the position

S 1 S 2 ( 1 ) . . . .. End switches REC. . . . .. Recording Button In addition of these external interrupt requests, we connected the output interrupt line TIMERO INT of a on-board Intel Programmable Interval Timer 8253A.

Further, the purpose of that interrupt will be described.

The jumpers of the interrupt matrix description is given in appendix

(1) The End Switch S2 is near the Motor on the Linear Robot Arm.

(30)

VI . THE SOFTWARE.

VI 1 . THE BASIC FT,OWCHART OF THE PROGRAM.

The program may be divided in three parts.

- INITIALIZATION: The operator enters the parameters for the sample time of the force, for the P.I.D. The hardware devices are initialized (PIT , PICt PPI) .

- ZERO POSITION: We search the zero position of the incremental inear sensor The robot is moving from the left to the rigth until the ZP interrupt occurst then immediately the position cQuting starts.

- TEACH OPERATIONS: The value of the force exerted on the gripper by the operator is sampled at a constant time .( 1 ms) t then the corresponding command motor

is sent to the drive system.

The operator is enabled to record the positions he desires I to

change the parameters and to stop the program.

You may find next page the flowchart of the program. Further, we explain why and how we were induced to use the Assembly Language in the interrupt procedures (particularly for Count Up and Count Down) .

(31)

THE FLOWCHART OF THE PROGRAM

%'"i"W ... \ ',&.\-\611\ . ' ,,'- ~Q."v.a

..

ce

,\'.:c.c

0," ~&

f." •••

ft."

1 "')

&,"

\l f

t-_

'~oc.c..l.~

.. s_

_ _ _ _ _ _ _ _ .... tMIL£" 1 .. " ... ftiWM."r

,,,,,h._

i. ,.~\-S

"-"r .. ,,

z. , ..

a"

V

---+-_-_-_-_-_-_-_--'-______ ....

IMlI\BLIi

t

:rN,QT

"C).

c.,

"E'seT C,O\lNTl'l OoT"' c. ... ",,") VOLTK'

t.,v.l'

ft.UM'c:k-l

'.,'h'.1I\.

T"_ ...

~.v

\,

~r.,rccl It.

,." ... ,' «w ... -'

c.-~",

,-"".low ..

'Z-.h.W . . i., 11.5.,,"-"'" It J .... \"' .. ~

(32)

VI 2 . EXPLANATIONS OF THE INTERRUPT PRQCEDURES.

***PROCEDURE INTZEROINIT

The accuracy of the program depends on that interrupt procedure I

because as soon as the ZERO POSITION is found, the position counting should begin.

The subroutine sends a Faulse Value to the boolean variable ZERO and then enable the COUNTUP and COUNTDOWN interrupts.

***PROCEDURES SWITCHE1INIT, SWITCHE2INIT.

These procedures change the direction of the displacement of the Linear Robot Arm during the zero position research.

***PROCEDURES COUNTUP, COUNTDOWN

These procedures increment or decrement the position value {Variable POSITION).Each interrupt should be handled quickly, in order to be able to handle the next interrupt, COUNTUP or COUNTDOWN. Because if I miss some interrupt, the reliability of the accuracy decreases.

***PROCEDURE ENREGISTREMENT

It sends the True Value to the boolean variable ENREG. ***PROCEDURE INTERTIME1

It sends the True Value to the boolean variable TIME1. ***PROCEDURES 11SWITCHE I 12SWITCHE

When one of these interrupt occurs, the operator has reached the end of the Linear Robot Arm.

These procedures change the direction of the displacement of the Linear Robot Arm and send True Value to the boolean value SWITCH.

(33)

VI3 . THE INTERRUPT HANDLING.

In the program, we had to handle an interrupt processing. The mecanism has two states:

preparation of (initialization)

the PIC for the hardware environment

associate the interrupt procedures written in assembly with each particular interrupt.

a ) Initialization

The on-board 8259 A PIC handles eight vectored priority interrupts. During the interrupt processing, it determines which

interrupt requests is of the highest priority; It issues an interrupt to the CPU based on the determination of the interrupt level and sends the CPU a vectored restart address.

To realize that operation, the PIC requires an initialization. In our particular environment, that initialization is carried out with three Commands Words (ICW1, ICW2 and ICW4). My interest won't be for ICW1 and 1CW4i Any information about them may be found in the Intel documentation.

I will detail the command word ICW2.

ICW2 represents the vectoring byte required by the CPU during the processing interrupt. It allows you to choose where in the memory the compiler will write the start adress of the different interrupt procedures . ICW2 The fi ve mos t programmer. The interrupt level. b7 b6 b5 b4 b3 b2 b1 bO MSB LSB

significant bits (b7 to b3) are supplied by the three other bits (b2 to bO) correspond with the

The CPU during the interrupt process, multiplies the vector byte by four and that value is used as the address where the start adress (4 bytes: offset and base) of the corresponding interrupt is written.

(34)

-PIC programming word ICW2:

ICW2: (MSB) 0000 1000 (LSB)

(when programming the bits 0 to 2 are 0)

-Vectoring byte used during the interrupt proccessing, when the interrupt level request is 2:

b7 b6 b5 b4 b3

o

0 0 0 1

Choice of the programmer

The Vector Byte is (0 A) H.

Then the Vector address is (2 a) H In the memory we have:

Memory address: datas (28)H (29)H offset b2

o

b1 1 bO

o

Interrupt Level Base

Now we have to associate the interrupt procedures with the desired interrupts. That is done in the program written in PASCAL-a6. In PASCAL-86, we can control the compilation by using compiler controls that allow us to specify options.

INTERRUPT is a compiler control I it designates procedures as

interrupt procedures and generates the interrupt vector. You can optionally specify a number for each procedure which represents, multiplied by 4/ the interrupt location of the entry of the interrupt procedure.In my easel i did not write this optional number because further I use the procedure SETINTERRUPT, which overrides it.

More. four procedures are provided to aid interrupt processing - ENABLEINTERRUPTS

- DISABLEINTERRUPTS - CAUISEINTERRUPT - SETINTERRUPT

My interest will be for SETTNTERRUPT.

SETINTERRUPT provides a way to dynamically associate an interrupt procedure (declared by compiler control INTERRUPT) with a

(35)

given interrupt number.The number should be the same as the vector byte of the given interrupt level discribed previously.

I continue my example:

The vector byte of interrupt level 2 was (OA) , (10) decimal.

I take two interrupt procedures INTER1, INTER~.

Then, we have in the Pascal-86 program:

INTERRUPT(INTER1, INTER2)

SET INTERRUPT (10, INTER1)

5ETINTERRUPT (10, INTER2) .

So I have changed the interrupt procedure for interrupt two, this

(36)

VI 4 . THE USE OF ASSEMBLY-86 INTERRUPT PROCEDURES.

The interrupt procedures were written in Assembly-86. Below is

explained why and how.

The paragraph IV.2 describes the incremental linear transducer and its converter. We remember that the pitch of the ouput signals COUNTUP and COUNTDOWN is 10 ~m. If the speed of the robot is 1 m/s. The period of the counting becomes 10 ~s. Then at the most, we have to handle an interrupt (COUNTUP or COUNTDOWN) every 10 ~s. This is a short period and took me much work to find a reliable software solution to handle these interrupts.

I

At first I wrote, the interrupt procedures in Pascal-56. The use of the compiler control I '$ CODE' gave the listing of

approximated assembly code of those Pascal-56 routines.

The program below is the listing of an incremental operation:

INTUP PROC NEAR PUSH ES PUSH DS PUSH AX PUSH CX PUSH DX PUSH BX PUSH S1 PUSH DI

MOV AX, SEG DATA MOV DS, AX

PUSH BP MOV BP, SP PUSH BP

MOV AX, POSITION INC AX MOV POSITION, AX MOV SP, BP POP BP POP Dr POP 5I POP

ax

POP DX POP ex POP AX POP DS POP ES IRET

(37)

INTUP ENDP

The execution time of each operation depends on the code and effective adress calculation time. The intel documentation "ASM86 Language Reference Manual" allowed us to calculate the execution time. The program, it takes 260 clock cycles at 8 MHZ, this gives

32,5 ~s.

We see that the Pascal-86 saves all the registers when an interrupt occures. In fact this is not necesary, it is enough to save only the registers I may use in my assembly subroutine. For example, I may save AX Register because it's used in INC operation. T~ avoide, those useless safeguards, I decided to write the interrupt procedure in ASM-86.

More, using the integer. However, run-time.

register AX is not necessary if POSITION is an Pascal-86 uses it and then it increases the You can see the difference in the following listing, which realizes the same incrementation:

INTUP PROC NEAR PUSH AX

MOV AX, POSITION INC AX

MOV POSITION, AX POP AX

IRET INTUP ENDP

At the most, this program takes 40 clock cycles 5 ~s.

Calling an assembly language subroutine from a Pascal program gave as much problems, because we had to provide the interface specification between the both languages. I had to take care of the data passing and data definition conventions used to link different language programs. Simply put, the assembly language code that talks to pascal 86 must do what pascal code expects it to do.

I continue my example with the interrupt procedure COUNTUP.The listing below is the program I used with the required interface conventions. I will explain them.

(38)

INTPROCASM86

EXTERN POSITION: WORD ASSUME CS:CODE

ASSUME DS: SEG POSITION ASSUME SS: SEG POSITION

PUBLIC COUNTUP

COUNTUP PROC NEAR INC POSITION IRET

COUNTUP ENDP CODE ENDS

END

A program written for the 8086 is combined in memory with segments.There are 4 different segments~

- code segment - data segment - stack segment - code segment

I could choose the model segmentation specifies how memory.

of segmentation: the model of program segments are archieved in

I used the SMALL model which offers the highest code and fastest execution time: then code is one segment, data and stack another. With the control -CONST IN DATA-, the constants are stored in the data segment.With the SMALL model, all procedures should be given type NEAR.

I must also connect the different segment registers (CS, DS and SS) used in assembly declarations with the segments ( such as segment CODE) and variables ( POSITION) declared in Pascal-86. This was done by the ASSUME directive, which makes the addressability of the code and data.

However, against these precautions, during the linkage of the different modules I a warning appeared. But it was not fatal and

(39)

VI 5 . REMARKS ABOUT THE PROGRAM.

I will describe the role of each module I've written. Each file contains a module:

File MAIN.PAS PARAM.PAS INTPOS.PAS

Module : MODUMAIN1 MODUPARAMS MODURECHERCHEZERO

File INIT.PAS CONVER.PAS

Module : MODurNITHARD MODUCONVER

POSASM.ASM

MODUSUBASSEMBLEUR In each moduler you have one or more procedures or functions.

MODUMAIN1 :

This module is the main module, it calls the other modules. It contains the procedures:

- INPUTFORCE

- CALCULATION: the function COMMAND MOTOR

=

f(FORCE} is a P.I.D. The p.r.D (the parameters TS, TD and TI) has not been improved. Then it may be the reason of further studies of the linear robot arm.

MODUPARAMS:

- LECTURE reads and prints 4 characters input from the keyboard.

- ASCII4 TO INTEGER4 converts 4 hexadecimal characters in an integer.

- CHOICEPARAMETERS inputs t.he parameters ( Sample time of the force and p.r.D parameters ).

MODURECHERCHEZERO

- INITPOSITION researches the zero position and declares the interrupt procedures.

MODTJINITHARD

- INITSAMPLETIME resets the counter Q - INITPPI initializes the PPI

(40)

- INITPIC initilizes PIC MODUCONVER

- this module contains the procedures to convert an integer

in 2,3 or 6 characters and then prints them on the screen.

MODUSUBASSEMBLEUR contains all the assembly interrupt procedures.

VI 6 . CONCLUSION

The program I've written carries out point-to-point teach

operations for the linear robot arm. the position counting by the

software method is a success. Although the precision of the

recorded positions is reliable, the maximum speed I can reach during the teach operations is less than 1 m/s.

Working with interrupts and with different languages was very

(41)

VII CONCLUSION

During my practical work at the University of Technology of EINDHOVEN, I learned how to develop a project in research view. It's important to mention that I met some problems at the begining, because I had to discover a system for which all the informations are written in dutch. However I performed the job as people expected: then I learned much about Microprocesser, languages and real time problems.

The following step is to improve the system for a continous path teach operation program and then performing the playback of the recorded movements.

(42)

VII . APPENDIX

- summary in french - documentation

(43)
(44)

Introduction au Pascal by plerre Lebeux, 1980, ed. sybex

The art of the digital design by david Winkel, 1980, ed. prentice-hall

Philips Data handbook, Integrated circuits, 1983

INTEL documentation:

iAPX 86,88 Family utilities user's guide

ASM86 Language reference manual

ASM86 Macro assembler operating instruction

Pascal-86 user's guide

ISIS-II user's guide

Illtellec serie III microcomputer development system

console operating instructions

iSBC 957 intpllec- iSBC 86/12 interface and execution package

Components data catalog 1981

iSBC 86/05 single board computer hardware reference manual

(45)

Interruot. Jurnoers Configurations FROM Designation Zero position Count Up Count Down REC 51 (end Switch) 52 (end Switch TIMERO INTR priority

Power Fail INT

JUMPERS POSTS in 119(*) 123 129 JUMPERS POSTSout 132 133 124 131 130 145 128 120 TO Designation INT(jJ Highest Priority INT1 INT2 INT3 INT4 INT5 INT6 lowest NMI Gate

(*) This interrupt is connected to the recording

(46)

;':f~1:PASC86 INI"l'l.PAS SMALL (_. CONS" .LN DA'TA ._)

; :F'1 :1'-f!.~'iU36 CDN'.JER,I"r'\!:; ~)t1'''I...I. .. ( .... CUNBT :n·! O,'.-!(\ .... )

LINK86 MAIN2.U8~. PARAMS,08~. INIPOS.U8~. INIT1,Q8J, POBASM.a8~. CUNVER.O

SE:CIUS.I_L8, tl·::L:F:'861~NU~I._II3v :1··1: ~:'861~;~1, 1_:!.E~~ &

:Fl:RfNULL.LI8. &

:Fl:87NULL.LI8

&

TO TE,.c/ .. I. LJ·If(

UJCD6 n ::,',CH.i...NI< 'Hi Tl'·.,'"CH F:Cbl:CI:"·.!E , ll:i..i.I:.:UH 'n) OU.[)OH· )

m'IU" TU,CH TO rEACH. HU{

(47)

PLlRTE:ADDfi '''OCAH; PORTCADDI:;: '~OCCH; SETBIT1CC =009H; r~ESETE:IT'+CC '''0 (JaH; It1A~lf([~ECPOr~T =OC2H; :r:HPUT r:TJI":C[ [ lK OUTPUT CC:B l'::n ll'l

TYPESTFU:NG6~'PACI<ED (·',I'<I'::AY [1. ,6:1 (,)1'" CH(,l'i;

STRING3=f'ACKED ARRAY [1 •• 3J OF CHARI

Sn(ING2"PACf(ED AI:;:f~AY [1 •• 2 J tH" CH,:H,;

STRING 1 ~1" Pr!',Cf(ED (~I:;:I:;:AY I: 1. •• 13 J OF C\-'''!,I'i;

STRING't'~I"(~CI<ED Al'mAY I: 1 •• It] UF CH("H I

VAR STI'<:: !,TI':lNG6;

STI~2; STI:;::ING2;

STF<~3: STI~]:i"'G:3 t

POINTS: F',',Cf(ED (~I:;:I:;:(,Y I: 1 •• 1 () 0 J UI'" :INTEGl::.fi;

1<, rs, '1'1, 'I'D: n,TEGU(; [;« 'H\f(I,'·)~:L.i;;S LmLO \:::'( THE f:'I·(OC[.[)Uf::E CAL.-' ;,: J

[ :I( UJLSPI~ED (CUI::l"r:IC:l.ENn; UF THE P .1. [) ) X~ :1

TSfiE,;L.: :Ii~TECEf~; [)I( B,~~II"'LI:: Hi'iE U~,EO UY THE COU~!TEI':: '" J

PLlSI1 IOi'l, ENDPOSIT:ION, I"O!:)!,,"NTE,D: TNTI::GE]:;:;

ST ARfPOS:r.TION 1 Ii,nEGU~;

110DEl ,MUDEZ, SWTTCHE, E::NI':EG, TTl"!:::\. ,f"Dbl'::E,V;HED: COOLE(IN;

ZERO:OOOL.EAN; C* MTbE A FALSE QUAND ON PASSE PAR ZERO *J

CUMMZEI:;:OTNrr : :rNTEGEr::; I::+; V:I:TEb!3E DU E::I·~,:)b r'''U COUI'(!3 DE L,"- m::CI-IEI;:C\-IE X~:3

C~ DU ZERO PUL.L.IU10H,; PUSHIUFOH #J

I,,): INTE:CE!'(; [:I: CDi'II"'TI~:UI'~ TAE:U,:AU

OI:

:

:!,

1"Cl!"TrIONb U,!I:,E:ClbTf(EES :+; J

COUNT : f~EC(]I'{D CA!"E 8()()L.E~'I~ lJF

Tf~UE : (FUI._LWClI'<I): W(}I~D) ;

FAL.SE: (L.OW, HIGH: 0 •• 255) ;

END;

F'1;:OCEDUf(E DEBUT;

PUBL.IC l'l[)DUPAf~"',~IS;

PI:WCEDUI:::E CI"IOICEI"'!',I:;:r.,ME (Vr'·,I'( 1(, lb ,LI I' TO, bT(,I'(lI"D!3TTIDN ~ IHTECI'.J-;; t'iUDE:l,

MClDEZ: E:()ClL.E(~N) ;

PROCEDURE PRINTASCTI13(WORD13:STRINC13);

PROCEDUI:iE f"FnNTASCII4 (WOI'(D'f I Sm:ING't) ;

PROCEDUI'::E FINENREGIS'TREl1ENT; I:'ROCEDU\::E L.IN; PROCE:DUI<E T{-IE:; PUE:L.:r.C ~)E:CIm-,; pr~OCE:r)UI:::C eu (X: CHr,ro ; FUNCTION CI 1 CHAf(;

PUE:L.IC i'iODUI"ECI-IEf~CI-II::ZE1:;:Cl,

F'FWCEDlJI'(E INITPosrnON;

PUE:L.IC i'I()I)UUUE:r,SSEMBl..EUI'::'

F'ROCEDlJl(!:' n,ITZEmll:rllT;

PROCEDum,. CllUNTU!"';

1:'fWCEDUI(i:: Cl1UNTDO I PROCEDURE CClUNTUP21

I"f~:()CEDlJf~I,: L:()UNTDCl~:~;

PROCEDUI',:L !:;~n:TCI-IE:l :UU:T ;

Pl:;:DCI:DUI'::E m,[[TCHI,,2l:1HT;

f'r~OCEDum,. J:N1EF:EXTEF,NE:;

I"fWCEDlJl·::E ENI:;:ECJ:S'mEl'iE,NT;

PROCEDUF::E. nHEI~Tn"El; F'F(()CE[)UI'~E: I H)~IITCHE ; PROCEDUI'::L l:;~swrrc\-IE; PUBL.IC l-IOI)UINI TH(~,fW ; pr~OCEDum: INLTF'!"'I; .... , .~,., ... , • .... ,_ . ... ··,'· ... ··r .... ·~.f' A

(48)

PROCHAM !,\ODUl·iAHI1 i

CClNS'!

PJ:TC:DNTI~:(·\DDI~: '" OD6H;

TIMEI;:OCONTF(1401:m ... 03llH;

\lAI;: DI<CU, Ol-(TE",CH ,m(!'~ECI"UE : C\-I(.\I·': ;

!,;:Ci',DYCH"'I!":' Fur';:CECI·I?lf':: CHA!';:;

f(CADY "CClMOTUn, COrIOT, FUF;:CL, FDI·:CE:l.i,n" ,),~:;;, ',;0, I:: (): THTCCEJ':;

CClNST~:;T:I, CDNETDTE: TNTEGlcR;

,.J: TNTEGU<;

[ )(~:.<)l(JK ~K)K:«~~:A()l()K }+;:::t:.)1( )f.~):< *:.+( ;KIt. *::+{~}I()t( ~ ;K/.{ }//(~::J~ :({)i( >K N.:f.<};, M;i(:>1< x<::«;+;:YI, )«)!{)t.;)!{ X~ !+\~Yl.:': ~~)K i«. )t:~~ }K)t: ;KX< )K~;)l.; y.~)+;

!"fWCEDum::: TNPUTFOf;:CE (V,·'F': FOI'(CECI"!f",I:':; CHtlf<; \..'(.,f( "'Of<CE:tNT, F()f(CE: :INTEGER) ;

VAR I :J:iHEGER;

BEGIN

DUTEWT (F'OlnUlDDF;:, 1 UH) ;

FOR I:=l TO 5 DO;

INBYT(PORTBADDR,FClRCECHAR). OUTE:YT (PURTCAD()f;: , 0

a )

;

FURCEINT ,~Ol':[) (F(jr(CECH"\I~) ,

C)I( FOf':CE:[NT: 0 <···-I'·USI+· 127 ET 128 .. -F·ULL··· ..

·

·>

::~::i5

,n

FOf(CE: "127··FOI':CE:n-n;

ell: FOI;:CE : 127 <···I:'UBI+· 0 ET .•. .1. ··rULL-·-·> ···12B :~,]

END;

{: )l;:«,)X )I()fr:; *)¥'~>K ~ >r.)K )K~)K)I()f:;.K)Y.

*

~ ~KX{)I(:+\ ~~Y.{~ »:";K:t.: ~ ~"~y'{:« ~{)t( l.{:«::+:~ )!<iK~::K Y.{:«}t\}i~:« )i()f:~:« :«X':;..:y.c)K}t{~:w.)I( :J I"I:WCEDUI:<E C'~L.CULAT]:ON (FOI:;:CE: :r:NTECU;:; \)1,1:( CCli10T, COMcrr:I1,rr:

:n,

!

fEeER) ;

BEGIN

cml0T:" (1<)j(FOI:;:CE+CDM;T~;;TD' (EO+I'OI'<CI::) +CDNSTI)T~)'" (FOf;:CE····r' 0» OP) :L 0 00;

.

so

:~SO+I"'OI'(CE;F(}: '·"FDI:;:CE.

[ll; cm'IOT ; 127 <--·PUbl+··· 0 ET .•. J. ····I"ULL··_·> .... 1213 :«:3 :[1" CUi'IO'1'<'-128 THEN CO~IOT: ""·<l:'.U;

IF CDNlTf:> 127 THEN cm'IOT; .. ,. 1. ;',; ; .1'1'" CUI'IlJ'r..::o fHENCC)I·IUTINl': ~'CUi'lt:rr+;','5(:)

ELSE COi'HJTni"f: '" CUMU'!;

[ ll: cm'iOTLNT , 127

< ..

···r:·U~'lI+- u 1=.:'1' ~:':'~:i ··+·Ul..l ...

···

>

12!l "']

END;

[ ">+: *:4<

>A*

*

1.( X(:« iK'Jt. :«:«~ll. :t()+;!4()Y. >K Jf{ ;"::I.{}t( :;t::a.::,(~)1(}:.;:';;:~ X< ~{\ ~t~)I/. ».: ~{::t()Y.)KX;:;K)!( )KX(;.K )K)K}K )KYt. :«)f.)i;; 'It, >I< ~}f;;)K )t(;t~~)K »: ::t::~:~~)jC

I"fWCEDUI'<E DE!,:UT;

BEGHl

D:r.SAL:I...EnnEF<I'<UI"T!3 ;

C)I: :r:NIT['~L.IS(.,.r:IOi~ DU 1·1f.\ 1:(1) W(., F< 1'.: : 1::'1":£ , F':Cf

":'1'

1"Te

C A<F"f':OCEDUf':,c I:i'!rrI"I"I ; FILl:: TNTI':[ .pm3

[>l:F'RUCEDlJRE: INITf"IC; FILE Ii'1:tT l. • h;~) ~:]

[)I(CONTHOl..E ~iOOE WClI'(D FOf;: rH1EI:::O , f". I . T :;<:3

INITPIC; [:<:I::·.:t. CZ']

HIITI"PI;

CHOICEPAI:;:AM!:; (1<, TB, TI , m, ,; r "":( n:'usrr:n.li~ \' i'IUIX::I ,hDlkZ;' i

CUN~;TSTL~100[)I«'n; u:IV C':>«'LU);

CmtST[)T~3:"'1[)()·O)l«m DTV T");

:« J

[~ IN1'fI ALTSATIUN DU CDMf"I'LUR -J

COUNT. FUL.LI4UI':U: ~'TSf<EAL; I::

"1".

T > T ~;Af"iF'l..C rniE :« J

DUTE::YT (I"ITCUNTI'<:A[)DI~, T:U'U":F;: 0 CClt-!Th:HUF,:D); I:: .«P .• J:, T CCHHI;:OI_ i"IODe ,,] .

I:: )j( n!rr:[(·~L.:tEi'!;T:rON DES; W',I::::[ACU,:~, ; I·:' () "G () ,. ]

[~ IJ,TIMEJ.,ENREG,SW:tl·CHE )j(J

FO:"'ll ;Gll:~O)

(49)

CONVf2Rr:roN3( (l"'OlN1SCl,j])!(14<S) IYI:V 10000 ;CO(' . ' ) ;

CONVERmECIt~2 ( ( (,',[:5 (POINTSr: I_I:1;')K 1 t·16) ~lllD 1 () () Il 0) DIV 100 ,f.;Tf~:z.);

PRINTASCIll::l (' i'1t1. CONrlN' ) ;

Pt:UNTA5C:r-.l13 ( , UE •••••• (Y /N) , ;. ;

Ot-(RE Cpm3 ~ =CI ;

WI-tILE (mm (Ot-(IO;:ECF'm3) <>OI:U) ( , Y , » (:".0

(mm (Qf(l-::ECPOS) <>Ofm ( , N' )

:-DO BEGIN CO(CHR(07H»;OKRECPOS:~CI;ENO;

CO (' ' ) ; CO (QfCWXpm;) ; LIN;

IF mm (UlmECPD!3) , .. emu ( , r.' ) THEN r;:t:NI:::i'II':EC1.m r::LhU·fl ;

IJ:~IJ+l;ENREG:~FALSE;

G!Di

END; END;

[ )(:t;:::K X(>K ;«:iY, l«)K:t()!(}I()K~)K )j()I(~:n:)K)l( :KY.{ ~ X<)t(:i.<. Xc: »: :-.Ky'o(:« »:':.4::)K)K ~\~ :1

E:EGIN DE:E:Ul ;

(50)

IN..I..rp08ITION~

t:)Ii ClIo{ DEBUT TEACH:lNG LItH

PRINTA8CII1~H I ST(~I~T TE(.;ICH ';';

P~;:.r:NTASCII13 ( • OF'I:::RAT1)JNS' :. ;

Pr.::INTASt:II1~J( • ••••••••

<

YIN) • ) ;

REPEAT

OI<TE{)CH! ";CI

UNTIL OF:£) ( OKfEt!\CH ) :;:;OFm ( I Y • ) t

CO(' .) ;CO<OKTEACH) iL.lNiLIN;

1 AE:; PRIi'HASCII1~H ')I()KlKlK)I(>y' NUDE ' ) ;

Pf.;INTASCII13 ( I n::f~CH F'C}INT T'»)

PRIN1ASCII13('O POINT IS RU');

F'f<INTASCII13( 'NN:tNG »OIOtDIOIOI,(') tLINtL.INt fAE:; PRINTASCII13('YOU CAN MOVE ' ) ;

F'RINTf~SCII13 ( • THE AHM TO TH·:·;

PRINTASCII13('E DESIf<ED POI';';

F'ftrNT ASCII 13 ( , i'll'S, PUSH • ) t L.IN t T I;E: ;

PRINTASCII13( 'THE ",:;:ECORDR I;' ~

PRINTASCIJ:13('BUTTON TO STO');

F'RINTASCII13( I RE THE COOHDI':';

F'RINTASCII13 ( 'NATE. ') tLINtLl}H

OUTI:::YT (:I:MASl·<REGPORT,. 091-1); C:1I. INTE1:;:I=<:UPTS 3 ET () HONT r1(~~3C·1Ut::l:~S)l{ J

t:: )l(Pt:;:OCEDURE INITSAMPLETIi1E I' FILE INIT 1. .. P(..\S JK J INITSAMPLETIME;

WHILE TRUE DO E:EGIi'l

IF SW:rTCHE THEN BEGIN

OUTE:YT (F'DHT Af\ODR" COM,-1:ZE:I:;:OIH:rT) t PRINTASCII:L3 ( I YOU HAl}E 1;~Ef."C·);

PRINTASCII13( 'I·IEO A E~ND SW1:'); F'RINTASC:I:I13 ( I TCHE.. I ) a.IN;

PRINTASC:tI13( I E:N[) SW:r.TCHE : I ) ;

CONVEF<TION ( (ENDF'OS:t"TION)I(146) DIV :L 0 0 () 0 l' STI~) ; CO ( I • I ) ,

CtINVERTDECIM2': ( (t~E:S ( ENDPOSITXCJN ) lK 146) ) HOD :l () 0 0 0) Dl:V :lO () .. ST!~~t ) t

PRINTASCII'f (' riM t ) ; TAB;

CONVERI:I:ON (ENIJI:'osrn:UN, ~rn;:) t

Pf<INTASCII13( I UNr.rs ') ;

ltU:TPOSITION t

SWITCHE : =F AL.~3E t

(: ~ IN'lEF<r(UPTS 3 ET 0 SONT I-If.'iSCiUE.ES:.t;;:j

OUTBYT (:rMAS~~REGPORr , 0 9H) ;

INJ:TSAMPLETIME;

F'f(INTASCII13( 'I'\OD£ TEf':lCH 1::'0'» PRINTASCII13('INT TO POINT '/~

Pf<I.NT ASCII 1:3 ( I IJ, I:~UNNING. ' ) t L.:I:N t LIN;

E~NO;

l:F TII'iE1 THEN E:EGIN

:r.tUTS){\MPLETl:i"tE t Tn"El t :=F ALSE}

INI::'un:OF:CE'; Fm(CE:CHi~IF!, FOI:..:CEINT l' Feme!::) ;

C(~LCULf~TION (FCme!::: , C:UI'\OT I' COi'iUTINT ) i OUTE:YT

(r;'mrr

i!tAD!)I::':, CHI:": (Cm-l0TINT ) ) ; IF ENI:;':EG;::.:Tf~UE ('HEN BEGIN

(51)

PROCEDURE CONVEI:;:TJ:ON (NUt'IBE:F..:: INTEGE.R t Vf~l:;: B11:;:: STI:;~:rNG6) ,

PROCEDURE CONVEI=i:TION3 (NlJI"'iE:EJ';':: l:NTEGEJ~ ; VAf< STR3: Sn:;:n'lG3) t P\;:OCEOUF:E CONVERTDECIf<jZ ( NUME:EI~ : l:NTEGER i V?"R STI~Z : STRINGZ) ~

(52)

CO(CR) ;CO(LF):

END;

C**************.***.***.*******.*.*~***.*******.***.**.************J F'FmCEDURE FINENf~EGISTf~EMENT 1 VAR Z : INTEGEFH BEGIN LDH Z:::~l;

PRINTASCII13( 'I:;~ECORDED PlJBI: ') t,

F'F~INTASCII13 ( I TIONS

L:tN;

REF'EAT .

TAE: j.F'Rl:NTASCII13 ( I ..• ~. __ . __ . __ ._.~ ..

>

I ) ;

CONVERTION3 ( (PO:rNTSr. Z J)I(146) DIV i 0 0 0 0 l' 8'n~~3) ; co ( I • I ) ;

CONVERTDECIM2«(ABS(F'OINTS[Z])M146) MOD 10000) DIV 100

PRINTASCII13( I MM ') ;LIN;

Z:~Z+l; UNTIL Z::::IJ+1i

LINH:'RIN1ASCII13< I TE(',CH MODE FI');

F'F~INTASCII13 ( I NISHED .. DO-'YO I )

t

PRINTASCl.I13('U WANT 1"0" CON'); PRINTASCII13( 'T:rNUE ... (Y/N) ':';

OKEN[)!=Cr;

II 8Tl:;:2) ;

WI"tILE (OI~D ( OI'(END ) <>OH{) ( , Y'

»)

tiNt) ( OI~1.) ( OI<ENO )

<>mm (

I 1·1 ' ) )

DO BEGIN CO ( CHI': ( 071-1) ) t Ol-{END .~ ~"CI ; END; CO (. ') t CO UJI-{ENLJ ) ;. LIN;

IF OI~D ( Ol-(ENO ) :.:;;CJrm ( , Y ') THEN /i:EG:LN LIN t LIN j; DE:l:ilUT ; ENI) ;

WHILE TRUE DO

·END;

[ »:

** lK

)('*Jr. :I( )1(*::«

lK

*lK~

lK

lI(

**

*)K:+: YolK

»~)t(.lK)t:;1:

)!OI()K)I.;)I( )101.( *Yf.

)',:;.c.:*

)tOIO!.: )I.;)'.OI()f:)I()Y.)t: *:..:* JI( JI()I;;)I( lK:«:.to:)K lK 'l40iOK

:l

pr<OCEDUI:~E TAB t E~EGIN

PI:;::rN'l f!lSCI.ll ~H I , ) ;

ENDi

[*.lI(lKYf.JI(:«lK.**)KlKlK~*lKlKlI(lI(.lI(lI(*.JI(lI(~.*~*.lI(JI(***.JI(*JI(lI(*.*JI(**lI(**.lK~*~**.lKlI(**J

PROCEDLJf;':E CHOICEf'ARAMS (VAH l< I' TS 'I TI, TD \I ST f"1RTPmU:TIDN ; INTEGEI;:; MODE: J. '! MODE21ElOOLEAN);

BEGIN

C ----.---.--.----.--- PARAMETE1:;:S -.-.-.--.-~.--.-.. -•.

----.----.--.-.:J

I_IN; TAB;

PRINTASCII 13 ( I *)j()I(lI("lK:~Ol(lI(*)\Ok:+:* I ) , PI~!INT ~1SCI:I 13 ( ,

*;.c.:)IOIOIOK}i()K*Jt:JI(lKlK ' ) ;.

F'RINTASCn 13 ( • lK»DK:~OI()K"lK)I()I()I(lKJKlK ' ) ; F'R:rNT c~SCII13 ( • lKlI()I(lK)4(iK*lK*lI(:t()K)rI(' ) ) LIN; TAEI;

PRIN1ASCII13 (

'lI(

TEACH Pi) s:F'RINTASCII13( 'OINT TO POINT I ) t F'RINTASCII13( • WITH A FORCE ') ; PfU:NTASCII13 ( I SENSt:lF< )I( I ) ;

LIN;TAE:;

PRIN'l ASCII13 < I

*)IOIOIOl(lKlK)I(lIOK***' ) ;

F'1-::[NTASC:x::r:1.:3 ( I 1IOIO«::tlClIOIC;t.:)K1ICt:::+:»t)l( I ) ;

F'F.:INTASCII13 ( I lIOKlK)I()I()IC)4<::11010IC«:)IOI( , ) } PfU:NTASC1:I 13 ( 'lK:f(}IOK)lOlC)Kit(;4C-IOf<:¥.)I( , ) ~

LIN; LIN t TAE: t .

F'1~:r:N'1 ASC:[I13 ( 1 .•. _____ .•. ___ ....• , ) ~ PI:;::U-.!T(")BCl:I:l.3 ( I CHOICE OF I ) ;

F'r~INTASCII13 ( I F'AHAMETERS I ) ; P\:;':INTASCII:L3 ( I --.-.-... -.~ .. -.-.---.' ;. ; L.IN;

F~EPEAT Ll:i~; 1'':11::,

PI~IN'l {.ISCII13 ( 'TIMING Vt!\LUE ');; F'I,::I:i-lT::-lGC1::I:l::H ' 01ICHObEC) ~ ') t TSREAL:::::(LECTURE:.:1229) DIV 1000;

LIN; LIN;:

TAI~:; f-'I~INTASCII13 ( I ._m. ____ ~ ___ .__ • ;. ; F'\-:lJ.n f'l!?,C:r.:r 13 ( 'CI~I(J:r:C1::~ P .:[. D I ) ;

F'f'.:INTASCII13 ( , PARf~I"iE:TH;~S ') 1 PK!:r.rU;ISCIll~~ 0: I -.---.~---.-•• - . - ' ) ;

(53)

TAE:;F'I:UNTASCIIL·:H'DE:JUVi-iT. TDt ') ~TD::·;;Ll:J.::TU1·~Ea_..cN) L]].H·1 AE:; PI:;:INT~ljSC:[Il:J ( 1 F'{.II:~i."-iI¥lI:::TLF":S CJI< 1 ;. :~

F'1:;:INT.:'-l~3C:rI13 (' ••••••• (Y /N) I ) t

OI{F'AHAMETERS: ~CI 1=

WHILE (mm (OI·(PI-~I:;:('·\"'ETE.\:;:S) <>DF~D ( "y' 1 ) (,Nt) (Ol:;':\) (OI<P{'I~(~HETE:HS) <>01·;:0 ( • N' ) ) DO E:I::GIN CO (CHR ( 07H) ) t OI<PARf~ii1ETEJ~~) ~ ~;;Cl:;; END;

CO (OHPAI;;:(\ME:TEr~S) t Ll:i'~ t UNTIL ORO(OKPARAMETERS)=URDC'Y')i I: ---.. -.--.----. MOOE CHOIX .-... _ ... -... -.. -... -... __ ... -.-... -.--... J [: >KI;:E:PEAT MUDE1:=FALSE~MODE2:~FALSEi LIN.TA8:; PRINTASCII13('--- I , A ."

,

F'fUNT ASCII 13 ( I CHOICE: RECl.mO':' t'

PRINTASC:r.I1~H' i'mOE • ) ;

PRINTASCII1:=l ( , ._. ___ .. __ .. _ ... ___ I ) ;

L_IN. TAE:;

PI;:IN'l ASc:tI13 ( II-lODE 1 : PUSH I ) ;

F'FUNTASCII13 (' THE L~:UTTON ') ) L:IN ; '1 AE: t

PI;:INTASC:tI13 ( 'i-lODE 2 ! F~ECO'); F'RINTAsc:rI13 ( 'RD ALL POSITX':I;

PI;;:INlASCII1~) ( 'ONS LIN.TAE:, PRINlASC:II1::l< 'CHOICE (1/2 I ) ; I ' · .... )

,

F'f.:INT ASCII13 ( , ) + • • • + • • • + • ';1 '); REPEAT NUMEROMOOE: ::::CI

UNTIL.. ( ORr.)

<

NUMEROMODE ) "c OI~~D ( , :L I :0 )

( Ofm ( NU~'lE~~m'100E ) ::::ORO ( I 2 I ) ) ;

CU(NUMERUMODE);LINf

em

IF NUNEI:Wi'100E;~":l' THEN i'\OI.)E 1 : ::.:,n~UE ELSE i'IODE2 t :::.TRlJE;'

LIN;TA8;F~I~rASCII13('MODE L~( (Y/N) , ) i

PRIN T ASCII 13 ( I • • • • • • + • • • • ? I ' A ) ? REPEAT

Ol-(MOOE : ::.:CI

UNTIL (01;:0 (OI{i-lODE) ;::(JF~D ( 'Y , ) UH (mm ( (JI-G'IDDE ) ::::miD ( , N I ) ) t

CO ( 01-(1'-100E) ; L1J~ t

UN,. XL DRO (OI'{MODE) :;;;01=i!1) ( , Y , ) t ~ :I

I: ---.-"--.---.. ---.---. STARTPOSITION .... " ... -.--.. ---... -.. -.---." .. -.-.-.... ]

()( F~EPEAT

LIN; Tf'-lB;

F~RINTASCII 13 ( '.-.---.... -.----... - , ) ; F'I~INTASC1:I13 ( I CHOICE STI-~RT ') ;

PRINTASCII13(' POSITION ' ) ; F'RINTASCII13 ( I - - - . - - - - . - . - - , ) t LIN; TAE:, Ph::rN'1 f~SC1.I13 ( 'STI~I~Tpm3:I:TI()N' :0 ; PRINTASCII13(' (1 UNIT~O,Ol'); PRINTASCII13(IMM) •••••••• ? ');STAR1POS1TION:~LECTURE;LIN; LIN;TA8;PFUNTASCII:l3( I STI~IRPCH3IT]:ON ') ~ PRINTASCII:t.:3 ( 'DI< (Y /N) ••• ? ' ) ; r-\:EPEAT m~ST i~I;:TP()SITI()N : ::::eI UNTIL (ORD(OKSTARTPOSITION)=ORO('Y'» OR (ORD(OKSTARTPOSITION)~ORD('N')); CO (OKST t~RTPOSIT:rON) , L.IN;

UNTIL ORD (OI'(STARTPOSITION ) ::::01;:1) ( 'Y , ); )I(]

STARTPOSITION:=O;

(54)

I: :« ;I("OK)I( lK)l( )lCl<lK)I( Ji(:« lIOIC!OK lIO!Ct<)IOIOIG!< ]

PROCEDURC IN:tTF'OSITIDN; E:t:GIN l: '" IN1:TPOSITION )I{:I PtlSITION ~ =3HO 7;

I:)t: INTEF~HUf'T:tONS pour;: n,rrTP(H3l:Tl:m~ :4( ]

$INTEF<fWPT (INTZE.l~aINIT:;'O 'f COUNTUP:;::.t. )' COUNTDO<Z , S!ttI:TCHE.l INrr,~:4 )

$~rNTEI;:RUPT (SWITCHEZINJ:T:, .. ::.) ~ :r:NTEJ,:EX'1 EI:::NE::::7) SETINTErmUPT ( 0 'f 'Ii-.!TZERClIi\[tT) ? SE:TINlE:l~:RUPT (11' CQUNTUP) ; ~)ETINTE.RRUI:'''T ( Z v COUNTDO) ) SETINTEI:;!f~lJf'T <

"*

v SHITCHEllJ-U:1 } ; SETINTEr~I~UPT ( 5 I' SWITCHEZINIT) ~ SETINTH;:mJPT (7 v INTEJ<EXll:::f~HE) ;.

OUTE::YT (.rt'iASI-(I~:EGPORr., 0 .ItEH) ; [: :.101( t'ii~'1;)I< .nrn. f 2 y ;) .. c') ~JI(:1

E~NAE:LEINTEI~Fi:UPTS ~ ZET.:o: :::iH;;UE t

f~E:F'EAT (JUTf)YT ( PORl' '!lADm~ , COl'li'1ZEI:;~Cll.N:I:'l ) UNTJ:L ZEI~D";;F ?ILSt~ ;

UUTE:YT (POI=\T AAODF:., () 0 H) ; [ :Ij{IJ:rn::S~3E NUI...U::;~ ] LIN;

pr~It,n ASCII 13 ( I ZC::F<O PUSIT:U:lN I ) t

F'RINTASC:r:I13 ( I UF THE AHI'i, I ) t

L:rN;

1:)It INTEHHUF'TIONS POUH 1'1::1"(;1-1-:G~ OPEF:{'~TION >K:J

$INTEHRUPT (EhIF~EGIBH~EHEi,rr'~:l!;:; v INTE1~n:t'iE:L'..:6 v .I:H;W:r-fCI-IE...:12, 12~3yIITCHE!:::t:3) SETINTERf~Ut='T (7 \I EJ-JREt;IS1T{EI1ENT ) ;

c

»: RE:COI~D CONNE:c-f EE INT EXTEHHE >K J

SETINTEf~I;:UPT ( 6 , INTEF<TIME:I. ) ; I: >K :rNTEf<r;!UPT SAMPU~Tl}\E ;~ ]

SETINTEI:mUPT Vh I1SWITCH.E) ; c~ (..ILI~il;:HE JI{ J

SETINTEJ<f~UPT ( 5, IZSWITCHE) t [:)1( f~LAI:;,:t'jE )I( ]

Referenties

GERELATEERDE DOCUMENTEN

In this study, CFA was used to confirm the factor structure of each of the variables (transformational leadership, past leadership, job resources, past job resources

Onder de parameters zijn niet alleen gedragingen van de kalveren, maar ook de klinische gezond heid en parameters bij de slacht, bijvoorbeeld hoe de longen eruit zien..

In all the examined countries the protective legal norm has a twofold orientation: (1) the fixation of a historically grown stock of (mostly public) universities by

The privacy-corrosive potential of these “smart city” technologies is acknowledge, and Martinez-Ballesté et al list technologies available today to mitigate these negative

te Kontich bracht '^G-methode uitsluitsel over de datering. Vele dergelijke geïsoleerde water- putten werden aangelegd in depressies die in de periferie lagen van de hoger

Even though the specific identity of the ostrich-specific mycoplasmas (Ms01, Ms02, and/or Ms03) responsible for subsequent infection of immunized ostriches was not determined, it

Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of

Zij hebben ieder evenveel betaald; het aantal guldens, dat ieder gestort heeft is 8 meer dan tweemaal het aantal personen.. Hoeveel personen zijn er en hoeveel heeft