.Program CHECK
C ---------------------------------------------------
C ????? ??????? ??? ??-01 ??? ???? ? ??
C ---------------------------------------------------
C ?????? ???????:
C 1 GO.HOME - ??? ? ?????? ?????????
C 2 SET.SPEED - ???????? ????? ???????? ???
C 3 TAKE - ????? ??? ? ???? ? ?????
C 4 REPLACE - ???????? ???
C 5 GIVE - ????? ? ?????? ??? ????? ????
C 6 PUT - ????? ??? ? ????? ??? ? ???????
C 7 Exit - ??? ?? ?????
C
C ??????????
CALL INIT
C
GO READY
GO #READY0
GO #SPACE
GO #HOME
OPEN
C
PRINT 'Robot is ready'
C ==> ???
SET MARKER. = NULL.
CALL TRANSC.
C ????
RETURN
C ------
10 PRINT '$'
C <==> ??? - ???????? ???????
CALL SWITCH.
JUMP 101
JUMP 10
C 1 ??????
CALL GO.HOME
JUMP 101
JUMP 10
C 2 ??????
CALL SET.SPEED
JUMP 101
JUMP 10
C 3 ??????
CALL TAKE
JUMP 101
JUMP 10
C 4 ??????
CALL REPLACE
JUMP 101
JUMP 10
C 5 ??????
CALL GIVE
JUMP 101
JUMP 10
C 6 ??????
CALL PUT
JUMP 101
JUMP 10
C 7 ?????? - ??? ?? ?????
GO #SPACE
GO #READY0
GO READY
RETURN
C ------
C
101 CALL ERROR.
JUMP 10
.End
C
C==============================================================
C ????? ???????
C==============================================================
C
.Program GO.HOME
C --------------------------
C 1 ??? ? ?????? ?????????
C --------------------------
C ?????? ???
C
PRINT 'Go home position'
ENABLE INCALLS
OPEN
GO #SPACE
GO #HOME
DISABLE INCALLS
C ==> ???
SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ????
101 RETURN
.End
C
.Program SET.SPEED
C ---------------------------------------
C 2 ???????? ????? ???????? ??? (%)
C ---------------------------------------
C ??????:
C PAR1. - ?????? ????? ??? (1%-300%)
C
PRINT 'Set speed % ',PAR1.
IF PAR1. < 1 THEN JUMP 102
IF PAR1. > 300 THEN JUMP 102
SET SPEED = PAR1.
SPEED% SPEED
C ==> ???
SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ???? ? ??????
102 SET ERRORW. = ER1
C ==> ???
SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
C
.Program TAKE
C ------------------------------
C 3 ????? ??? ? ???? ? ?????
C ------------------------------
C ???????:
C PAR1. - ????? ????? X ?? ??? (1-8)
C PAR2. - ????? ????? Y ?? ??? (1-8)
C
PRINT 'Take off checker'
PRINT PAR1.
PRINT PAR2.
C
SET PAR1 = PAR1.
SET PAR2 = PAR2.
C ?????? ???????? ??
CALL POS.XY
JUMP 102
C ????? ???
ENABLE INCALLS
GO #WAIT
OPEN
C ???????? ?????????? ??? ????
WAIT IN I.WORK.N
C ?????? ????? ????
OUT O.WORK.Y
C
GO #WORK
GONEAR POS,30
SPEED% 100
SPEED NEXT 50
GOS POS
CLOSE
SPEED% SPEED
GOSNEAR POS,30
GO #WORK
GO #SPACE
C ???????? ????? ????
OUT O.WORK.N
C
GO #PUT
GONEAR #BOX,100
SPEED% 100
SPEED NEXT 100
GOS #BOX
DELAY 0.5
OPEN
SPEED% SPEED
GOSNEAR #BOX,100
GO #PUT
GO #SPACE
GO #HOME
DISABLE INCALLS
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
C
.Program REPLACE
C -----------------
C 4 ???????? ???
C -----------------
C ???????:
C PAR1. - ????? ?????? ????? X ?? ??? (1-8)
C PAR2. - ????? ?????? ????? Y ?? ??? (1-8)
C PAR3. - ????? ?????? ????? X ?? ??? (1-8)
C PAR4. - ????? ?????? ????? Y ?? ??? (1-8)
C
PRINT 'Replace chacker'
PRINT PAR1.
PRINT PAR2.
PRINT PAR3.
PRINT PAR4.
C ????? ???????? ??
SET PAR1 = PAR1.
SET PAR2 = PAR2.
C ?????? ???????? ??
CALL POS.XY
JUMP 102
C
LOCATE POS1 = POS
C ?????? ???????? ??
SET PAR1 = PAR3.
SET PAR2 = PAR4.
C ?????? ???????? ??
CALL POS.XY
JUMP 102
C ????? ???
ENABLE INCALLS
GO #WAIT
OPEN
C ???????? ?????????? ??? ????
WAIT IN I.WORK.N
C ?????? ????? ????
OUT O.WORK.Y
C
GO #WORK
GONEAR POS1,30
SPEED% 100
SPEED NEXT 50
GOS POS1
CLOSE
SPEED% SPEED
GOSNEAR POS1,30
C
GONEAR POS,30
SPEED% 100
SPEED NEXT 50
GOS POS
GOSNEAR ,-1
DELAY 0.5
OPEN
SPEED% SPEED
GOSNEAR POS,30
GO #WORK
GO #SPACE
C ???????? ????? ????
OUT O.WORK.N
C
GO #HOME
DISABLE INCALLS
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
C
.Program GIVE
C -------------------------------------
C 5 ????? ? ?????? ??? ????? ????
C -------------------------------------
C ???????:
C PAR1. - ????? ????? X ?? ??? (1-8)
C PAR2. - ????? ????? Y ?? ??? (1-8)
C
PRINT 'Give checker'
PRINT PAR1.
PRINT PAR2.
C
SET PAR1 = PAR1.
SET PAR2 = PAR2.
C ?????? ???????? ??
CALL POS.XY
JUMP 102
C ????? ???
ENABLE INCALLS
GO #WAIT
OPEN
C ???????? ?????????? ??? ????
WAIT IN I.WORK.N
C ?????? ????? ????
OUT O.WORK.Y
C
GO #WORK
GONEAR POS,30
SPEED% 100
SPEED NEXT 50
GOS POS
CLOSE
SPEED% SPEED
GOSNEAR POS,30
GO #WORK
GO #SPACE
C ???????? ????? ????
OUT O.WORK.N
C
GO #GIVE
GONEAR #MEET,150
C ???????? ????? ???
WAIT IN I.MEET.Y
C
SPEED% 100
SPEED NEXT 100
GOS #MEET
C ??? ? ???? ?????
OUT O.MEET.Y
SPEED% SPEED
C ???????? ????? ???
WAIT IN I.MEET.N
C
DELAY 0.5
OPEN
GOSNEAR #MEET,150
C ??? ?? ???? ?????
OUT O.MEET.N
C
GO #GIVE
GO #SPACE
GO #HOME
DISABLE INCALLS
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
C
.Program PUT
C ----------------------------------------
C 6 ????? ??? ? ????? ??? ? ???????
C ----------------------------------------
C ???????:
C PAR1. - ????? ????? X ?? ??? (1-8)
C PAR2. - ????? ????? Y ?? ??? (1-8)
C
PRINT 'Take and put checker'
PRINT PAR1.
PRINT PAR2.
C
SET PAR1 = PAR1.
SET PAR2 = PAR2.
C ?????? ???????? ??
CALL POS.XY
JUMP 102
C
ENABLE INCALLS
GO #SPACE
GO #GIVE
GONEAR #MEET,150
C ??? ? ???? ?????
OUT O.MEET.Y
OPEN
C ???????? ????? ???
WAIT IN I.MEET.Y
C
SPEED% 100
SPEED NEXT 100
GOS #MEET
CLOSE
SPEED% SPEED
C ??? ???
OUT O.MEET.N
C ???????? ????? ???
WAIT IN I.MEET.N
C
GOSNEAR #MEET,150
GO #GIVE
GO #SPACE
C ???????? ???
GO #WAIT
C ???????? ?????????? ??? ????
WAIT IN I.WORK.N
C ?????? ????? ????
OUT O.WORK.Y
C
GO #WORK
GONEAR POS,30
SPEED% 100
SPEED NEXT 50
GOS POS
GOSNEAR ,-1
DELAY 0.5
OPEN
SPEED% SPEED
GOSNEAR POS,30
GO #WORK
GO #SPACE
C ???????? ????? ????
OUT O.WORK.N
C
GO #HOME
DISABLE INCALLS
C ==> ???
100 SET MARKER. = NULL.
CALL TRANSC.
JUMP 101
C
RETURN 1
C ==> ???
102 SET MARKER. = ERRORW.
CALL TRANSC.
JUMP 101
C ????
101 RETURN
.End
C
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C ????????
C++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C
C==============================================================
.Program POS.XY
C --------------------------
C ?????? ???????? ??
C --------------------------
C ???????:
C PAR1 - ????? ????? X ?? ??? (1-8)
C PAR2 - ????? ????? Y ?? ??? (1-8)
C
IF PAR1 < 1 THEN JUMP 102
IF PAR1 > 8 THEN JUMP 102
C
IF PAR2 < 1 THEN JUMP 102
IF PAR2 > 8 THEN JUMP 102
C
LOCATE CIJ = C00
C
10 IF PAR1 <= 1 THEN JUMP 20
SHIFT CIJ = 34.5
SET PAR1 = PAR1 - 1
JUMP 10
C
20 IF PAR2 <= 1 THEN JUMP 30
SHIFT CIJ = ,34.5
SET PAR2 = PAR2 - 1
JUMP 20
C
30 LOCATE POS = CHECK(CIJ)
RETURN 1
C
102 SET ERRORW. = ER1
C ???? ? ???????
101 RETURN
.End
C
C##############################################################
.Program ALARM
C ----------------------------
C ??????? ?? ????? ????
C ----------------------------
C
PRINT 'ALARM'
C
WAIT IN I.ALARM.N
C
STOP 'Continue ?'
C
ENABLE INCALLS
RETURN
.End
C##############################################################
C
C==============================================================
.Program INIT
C ------------------------------------
C ?????????? ????? ???? ? ??
C ------------------------------------
C
C ?????????? ??????????? ????
CALL INID2.
C
C************ ?????????? ??? / ???? ****************
C
OUTGROUP 1 = 0
OUTGROUP 2 = 0
C
C--------------------------- ??? ----------------------------
C ?????
C ??
SET I.ALARM.Y = 15
C ???
SET I.ALARM.N = -15
C ?????? ????
C ?????
SET I.WORK.Y = 14
C ??????
SET I.WORK.N = -14
C ???????? ????? ???
C 1
SET I.MEET.Y = 13
C 0
SET I.MEET.N = -13
C
C--------------------------- ???? ---------------------------
C ?????? ????
C ??????
SET O.WORK.Y = 14
C ????????
SET O.WORK.N = -14
C ??????? ????? ????
C 1
SET O.MEET.Y = 13
C 0
SET O.MEET.N = -13
C
C**************************************************************
C
SPEED 166
ODELAY 1
CDELAY 1
TOOL
FRAME CHECK = O,X,Y
C
C*************************** ???? *************************
C ?????? ?????? (A)
SET ER1 = 65
C
C************************* ??????? ***********************
C
C ??????: PAR1, PAR2,
C ??? ??????
SET MAX.FR. = 7
C ?????? ?????? ????? ???
SET SPEED = 200
SPEED% SPEED
C
INCALL I.ALARM.Y, ALARM
RETURN
C ------
C
C************************* ????????? ************************
C ??????:
C #READY0 - ????? ????????? ??? READY
C #SPACE - ??????? ?????????
C #HOME - ?????? ?????????
C #BOX - ????? ??? ??
C O - ???? ???? ??????? ???
C X - ??? X ???
C Y - ??? Y ???
C #PUT - ????????? ??? ????
C #WAIT - ????????? ? ??? ????
C #WORK - ????????? ??? ????
C #MEET - ????????? ??? ????? ??
C #GIVE - ?????? ????????? ??? ????? ??
C C00 - ???? ?? ? ???? ??????? ???
C ??????:
C CHECK, CIJ, POS, POS1
.End





Чтобы не видеть здесь видео-рекламу достаточно стать зарегистрированным пользователем.
Чтобы не видеть никакую рекламу на сайте, нужно стать VIP-пользователем.
Это можно сделать совершенно бесплатно. Читайте подробности тут.