Omron trajexia CJ1W-MCH72 Operation Manual page 280

Sysmac cj-series programmable controller
Hide thumbs Also See for trajexia CJ1W-MCH72:
Table of Contents

Advertisement

How-to's
5-1-1-2 Example
'================================================
'THE FIRST PART OF THE PROGRAM
'CONSISTS OF A CHECK SEQUENCE TO
'VERIFY THAT THE DETECTED AXIS CONFIGURATION IS THE
'EXPECTED ONE.
'IF YES, THE PROGRAM FINISHES AND STARTS "APPLICATION".
'IF NOT, THE PROGRAM STOPS AND NO OTHER PROGRAM STARTS.
'THIS PROGRAM MUST BE SET TO RUN AT POWER UP IN 'A LOW
'PRIORITY TASK (1 IN THIS EXAMPLE)
'================================================
'Start MECHATROLINK Section
' Check detected slaves
' Unit 0
IF NOT MECHATROLINK(0,3,0) THEN
PRINT "Error getting slave count for unit 0"
STOP
ELSE
IF VR(0) <> 3 THEN
PRINT "Incorrect slave count for unit 0"
STOP
ENDIF
ENDIF
IF NOT MECHATROLINK(0,4,0,0) THEN
PRINT "Error getting address for unit 0, station 0"
STOP
ELSE
IF VR(0) <> 65 THEN
PRINT "Incorrect address for unit 0, station 0"
STOP
ENDIF
ENDIF
IF NOT MECHATROLINK(0,4,1,0) THEN
PRINT "Error getting address for unit 0, station 1"
STOP
ELSE
IF VR(0) <> 66 THEN
PRINT "Incorrect address for unit 0, station 1"
STOP
ENDIF
ENDIF
IF NOT MECHATROLINK(0,4,2,0) THEN
PRINT "Error getting address for unit 0, station 2"
STOP
ELSE
IF VR(0) <> 67 THEN
PRINT "Incorrect address for unit 0, station 2"
STOP
ENDIF
ENDIF
' Set axis types
' Unit 0
ATYPE AXIS(0)=40
ATYPE AXIS(1)=40
ATYPE AXIS(2)=40
' Set drives into run mode
Section 5-1
269

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents