Denso RC5 Specifications Page 69

  • Download
  • Add to my manuals
  • Print
  • Page
    / 692
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 68
Chapter 2 Program Flow
2-7
The following two programs “MOTION1” and “TIMING” are examples of
synchronization control that use semaphores.
If the program “TIMING1” is run the program “MOTION1” starts concurrently.
The timing of the “MOTION1” is created by the “TIMING1” with a semaphore to
execute the MOVE command.
PROGRAM MOTION1
TAKEARM
SPEED 100
RUN TIMING
TAKESEM I1
MOVE P, P1
MOVE P, P2
END
PROGRAM TIMING1
I1 = CREATESEM (1)
TAKESEM I1
RUN MOTION1
I[1]=0
DO WHILE I[1]<10
DELAY 5000
GIVESEM I1
LOOP
DELETESEM I1
END
Fig. 2-5 Example of Synchronization Control Using Semaphore
2.3.2.2 I/O
The robot can communicate among tasks by using I/O.
The following two programs “MOTION2” and “TIMING2” are examples of
synchronization control that use I/O. The motion is the same as “Example of
synchronization control using semaphore” explained in “3.3.2.1 semaphore."
If communication among tasks is executed using I/O then only the first come
order Queuing method can be used.
If the program “TIMING2” is run, the timing of the “MOTION2” is created by the
“TIMING2” according to the status of IO [118] to execute the MOVE command.
This operation repeats itself until the “TIMING2” loop ends.
PROGRAM MOTION2
TALEARM
SPEED 100
WAIT IO[118]
MOVE P, P1
MOVE P, P2
END
PROGRAM TIMING2
RUN MOTION2
I[1]=0
DO WHILE I[1]<10
SET IO[118]
DELAY 500
RESET IO[118]
DELAY 5000
LOOP
END
Fig. 2-6 Example of Synchronization Control Using I/O
Page view 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 691 692

Comments to this Manuals

No comments