Denso RC5 Specifications Page 55

  • Download
  • Add to my manuals
  • Print
  • Page
    / 692
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 54
Chapter 1 Sample Program
1-3
1.3 Program List
Below is a program list for the model case.
There are 4 programs: “PRO1,” “PRO2,” “dioSetAndWait,” and
“dioWaitAndSet.”
“PRO1” is the main program.
“PRO2” is the subprogram related to QR code reading.
“dioSetAndWait” and “dioWaitAndSet” are subprograms to operate the I/Os
used to check part supply. These two programs are stored in the PAC
program manager program bank.
Program coding list “PRO1
'!TITLE “Pick & Place”
#INCLUDE “dio_tab.h” 'Reads a DIO macro definition file.
#INCLUDE “var_tab.h” 'Reads a variable macro definition file.
#DEFINE appLen 100 'Defines an approach length.
appLen and 100 are functionally equivalent.
PROGRAM pro1 Declares a program name. See p. 9-1.
TAKEARM 'Obtains an arm semaphore.
MOVE P, P[pHome], S=50 'Moves to the home position at 50% of
'internal speed in PTP motion.
SPEED 100 'Sets the internal speed to 100%.
CALL dioWaitAndSet(ioParts, ioPartsAck) 'Checks part supply.
Invokes a program. See pp. 2-1 and 2-3.
CALL pro2 'Reads the QR code.
SELECT CASE I[iPartsId]
Macro
CASE -1 'Countermeasure for QR code reading
'failures.
CALL dioSetAndWait(ioErrQR, ioErrQRAck) 'Outputs an error.
CASE 1
GOSUB *PlacePartsA 'Processes part A.
Calls a subroutine. See p. 2-2.
CASE 2, 3
GOSUB *PlacePartsBC 'Processes parts B and C.
END SELECT
CALL dioSetAndWait(ioComplete,ioCompleteAck) 'Outputs the motion finish signal.
GIVEARM 'Releases the arm semaphore.
END
Continued on the following page.
Statement required to run the
robot. See p. 14-13.
Equivalent to macro P[10] or P10. See p. 20-1.
Statement that conditionally executes a statement block
depending on I[¡¡] and passes control. See p. 11-19.
If I[¡¡] is -1, the following will be executed.
Releases the arm semaphore
declared with TAKEARM.
Page view 54
1 2 ... 50 51 52 53 54 55 56 57 58 59 60 ... 691 692

Comments to this Manuals

No comments