Omron TJ2-MC64 - PROGRAMMING Programming Manual page 323

Hide thumbs Also See for TJ2-MC64 - PROGRAMMING:
Table of Contents

Advertisement

Examples and tips
'Unit Detection
' ML04 Unit
IF COMMSTYPE SLOT(0) <> 36 THEN
PRINT "Error Comms Type for unit 0 is not ML04"
SET_BIT(0,diag03)
ENDIF
' FL Unit
IF COMMSTYPE SLOT(1) <> 33 THEN
PRINT "Error Comms Type for unit 1 is not FL"
SET_BIT(1,diag03)
ENDIF
'Start Mechatrolink Section
'MECHATROLINK device detection for ML04 unit 0
IF READ_BIT(0,diag03) = 0 THEN
'Initialise Mechatrolink
MECHATROLINK(0,0)
' Device count
IF NOT MECHATROLINK(0,3,system01) THEN
PRINT "Error getting device count for ML04 unit 0"
SET_BIT(0,diag01)
ELSEIF VR(system01) <> 2 THEN
PRINT "Incorrect device count for ML04 unit 0"
SET_BIT(1,diag01)
ENDIF
' Check SJDE-02ANA-OY address
IF NOT MECHATROLINK(0,4,0,system01) THEN
PRINT "Error getting address for ML04 unit 0, station 0"
SET_BIT(0,diag02)
ELSEIF VR(system01) <> $43 THEN
PRINT "Incorrect address for ML04 unit 0, station 0"
SET_BIT(0,diag02)
PROGRAMMING MANUAL
317

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tj1-prtTj1-drtTj1-cortTj1-mlGrt1-ml2Tj1-fl02

Table of Contents