Omron trajexia CJ1W-MCH72 Operation Manual page 335

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

Advertisement

Practical examples
324
GOSUB start_app
status_word=3 'Application running
ENDIF
IF stop_bit=1 AND status_word=3 THEN
PRINT "Stop by command"
GOSUB stop_all
status_word=1
ENDIF
ENDIF
'Evaluates rising edge in RUN, STOP & RESET bits
GOSUB sequence
'Checks for alarms in the system and monitors the
'system status
GOSUB alarm_sequence
'Upgrade values for showing in the HMI & PLC
GOSUB monitoring
'Reports and reset warnings in servodrive
GOSUB warning_seq
GOTO loop
'--------------------------------------------------------
sequence:
'Define here your signals to STOP/START/RESET
'This example uses the following signals:
'Rising edge of bit 0 of VR(signal_state) as RUN signal
'Rising edge of bit 1 of VR(signal_state) as STOP signal
'Rising edge of bit 2 of VR(signal_state) as RESET signal
'RUN
run_ant=run_act
run_act=READ_BIT(0,signal_state)
run_bit=run_act AND NOT run_ant
'STOP
stop_ant=stop_act
stop_act=READ_BIT(1,signal_state)
stop_bit=stop_act AND NOT stop_ant
'RESET
res_ant=res_act
res_act=READ_BIT(2,signal_state)
res_bit=res_act AND NOT res_ant
RETURN
'--------------------------------------------------------
Section 5-2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents