Chapter 5. option – IAI America S-SEL-E User Manual

Page 237

Advertising
background image

Page 232

Chapter 5.

Option

„ Procedure

This procedure explains the process for programming the application examples.

1)

Set characters (terminating characters) "LF" to indicate the ending of the character string.

2)

Open channel 1to use channel 1 in the RS232C unit.

3)

If channel 1 receives a signal, the first column of the local string takes the signal in.

4)

When the received data is "HOME", Axis-2 performs homing. After homing is completed, an "OK" signal will
be sent back.

5)

When the received data is "MOVE", the velocity data is converted into binary notation and set in variable 10. The
position data is also converted into binary notation and set in position no.1. When the motion is completed, an
"OK" signal will be sent back.

… Application Program

Step

No.

N

Op-Code

Operand 1

Operand 2

Post

Comment

1

SCHA

10

Set LF as terminating characters

2

OPEN

1

Open SIO Channel 1

3

TAG

1

4

READ

1

1

Read in one line from SIO

5

6

ISEQ

1

'HOME'

HOME command

7

HOME

11

Homing

8

EXSR

1

Send OK signal

9

EDIF

10

11

ISEQ

1

'MOVE'

If a MOVE command

12

SLEN

3

3 lines for length

13

VAL

10

5

Velocity

à

Variable 10

14

VEL

*10

Set velocity

15

16

PCLR

1

1

Clear position 1

17

SLEN

3.3

18

VAL

199

8

Axis 1 position

à

Variable 199

19

PPUT

1

1

Set 1 data

20

21

VAL

199

15

Axis 2 position

à

Variable 199

22

PPUT

2

1

Set axis 2 data

23

MOVL

1

Move

24

EXSR

1

Send OK signal

25

EDIF

26

27

GOTO

1

28

29

BGSR

1

Send OK signal subroutine

30

SCPY

1

'OK'

Set OK

31

SPUT

3

13

Set CR

32

SPUT

4

10

Set LF

33

WRIT

1

1

Send signal

34

EDSR

Advertising
This manual is related to the following products: