How-to’s
Section 5-1
269
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
Summary of Contents for trajexia CJ1W-MCH72
Page 69: ...Specifications Section 2 4 58...
Page 83: ...FINS commands Section 3 4 72...
Page 147: ...All BASIC commands Section 4 2 136 AXIS 1 AXIS 0...
Page 277: ...All BASIC commands Section 4 2 266...
Page 371: ...360 Index...
Page 373: ...362...