Omron CS1W-MCH71 Operation Manual page 668

Sysmac cs/cj-series
Hide thumbs Also See for CS1W-MCH71:
Table of Contents

Advertisement

Others
Example 4
WAIT #IB00501 = = 1; Initialization completed
#OB00500 = 0;
#OB00503 = 1; Counter 1 enabled
;
;Set the axes to RUN
#IB04402 = 1; AXIS1 on
WAIT #OB04403 = = 1; Wait for confirmation AX1
#IB04402 = 0;
;
WHILE 1 = = 1;
;IW0B01 is the cutting length from the PLC
#MW0000 = #IW0B01-550;
;
IF #IB0B000 = = 1; START bit
MOVELINK [J01]50 [J05]100 A100 D0; Acceleration synchronized
MOVELINK [J01]200 [J05]200 A0 D0; Following part
#OB0BA00 = 1; Activate shear
MOVELINK [J01]50 [J05]100 A0 D100; Deceleration synchronized
#OB0BA00 = 0; Stop shear
MOVELINK [J01]-300 [J05]400 A100 D100; Return to origin
MOVELINK [J01]0 [J05]#MW0000 A0 D0; Wait distance
ENDIF;
WED;
END;
This example shows how to handle with the safety and the sequence of other
motion programs without the direct management of the PC. This is useful
when you want a fast reaction or a local control in the MCH. Depending on the
operation maybe it is necessary to disable some automatic data exchange
between PC and MCH (P00007 and P00008).
PROG P000 Q00000000;SHELL
;--VARIABLES:
;----- OW0BA0 = Alarm status
;----- OW0BA2 = Shell status
;----- IW0B00 = RUN/STOP/RESET from PLC
;----- DW0000 = Auxiliary task variable
;----- MW0000 = Application program status
;
#MW0000 = 0;
#OW0BA2 = 0; Status = Initial
#DB00000 = 0; Task variable: Rising edge to start program
GOSUB P500; Initialization
#OW0BA2 = 1; Status = Stopping programs
GOSUB P501; STOP all programs
#OW0BA2 = 2; Status = System stopped
;
WHILE 1 = = 1; Infinite loop
;Conditions to generate an alarm or warning
#OB0BA00 = #OB03000; Any alarm active
#OB0BA01 = #IB0B002; Stop active
#OB0BA02 = !#SB021C4; Main power not active in axis 1
#OB0BA03 = !#SB024C4; Main power not active in axis 2
#OB0BA04 = !#SB027C4; Main power not active in axis 3
#OB0BA05 = !#SB02AC4; Main power not active in axis 4
#OB0BA06 = !#SB02DC4; Main power not active in axis 5
;
Section 10-3
623

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Cj1w-mch71

Table of Contents