Omron SYSMAC CJ Operation Manual page 279

Sysmac cj-series programmable controller motion control unit
Hide thumbs Also See for SYSMAC CJ:
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
267

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cj1w-mch72

Table of Contents