177
Using Tasks Section 4-2
4-2-2 Task Instruction Limitations
Instructions Required in the Same Task
The following instructions must be placed within the same task. Any attempt
to split instructions between two tasks will cause the ER Flag to turn ON and
the instructions will not be executed.
Instructions Not Allowed in Interrupt Tasks
The following instructions cannot be placed in interrupt tasks. Any attempt to
execute one of these instructions in an interrupt task will cause the ER Flag to
turn ON and the instruction will not be executed. The following instructions
can be used if an interrupt task is being used as an extra task.
The operation of the following instructions is unpredictable in an interrupt task:
HUNDRED-MS TIMER: TIM and TIMX(550), TEN-MS TIMER: TIMH(015)
and TIMHX(551), ONE-MS TIMER: TMHH(540) and TMHHX(552), TENTH-
MS TIMER: TIMU(541) and TIMUX(556) (See note.), HUNDREDTH-MS
TIMER TIMUH(544) and TIMUHX(557) (See note.), ACCUMULATIVE TIMER:
TTIM(087) and TTIMX(555), MULTIPLE OUTPUT TIMER: MTIM(543) and
MTIMX(554), LONG TIMER: TIML(542) and TIMLX(553), TIMER WAIT:
TIMW(813) and TIMWX(816), HIGH-SPEED TIMER WAIT: TMHW(815) and
TMHWX(817), PID CONTROL: PID(190), FAILURE POINT DETECTION:
FPD(269), and CHANGE SERIAL PORT SETUP: STUP(237).
Note These instructions are supported by the CJ1-H-R CPU Units only.
The following instructions cannot be used in the power OFF interrupt task
(they will not be executed even if they are used and the Error Flag will not turn
ON):
READ DATA FILE: FREAD(700), WRITE DATA FILE: FWRIT(701), WRITE
TEXT FILE(TWRIT(704)), NETWORK SEND: SEND(090), NETWORK
RECEIVE: RECV(098), DELIVER COMMAND: CMND(490), TRANSMIT:
Mnemonic Instruction
JMP/JME JUMP/JUMP END
CJP/JME CONDITIONAL JUMP/JUMP END
CJPN/JME CONDITIONAL JUMP NOT/CONDITIONAL JUMP END
JMP0/JME0 MULTIPLE JUMP/JUMP END
FOR/NEXT FOR/NEXT
IL/ILC INTERLOCK/INTERLOCK CLEAR
SBS/SBN/RET SUBROUTINE CALL/SUBROUTINE ENTRY/SUBROUTINE
RETURN
Note: If the global subroutine instructions (GSBS(750),
GSBN(751), and GRET(752)) are used, the subroutine
can also be called from another task.
MCRO/SBN/RET MACRO/SUBROUTINE ENTRY/SUBROUTINE RETURN
BPRG/BEND BLOCK PROGRAM BEGIN/BLOCK PROGRAM END
STEP/STEP STEP DEFINE
Mnemonic Instruction
TKON(820) TASK ON
TKOF(821) TASK OFF
STEP STEP DEFINE
SNXT STEP NEXT
STUP CHANGE SERIAL PORT SETUP
DI DISABLE INTERRUPT
EI ENABLE INTERRUPT