13.07.2015 Views

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

CJ2 CPU Unit Software User's Manual - CIP ETI

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5 Understanding ProgrammingPrecautions Instruction Usage RestrictionsInstructions That Must Be in the Same TaskThe following instructions must be placed in the same task.MnemonicJMP/JMECJP/JMECJPN/JMEJMP0/JME0FOR/NEXTIL/ILCSBS/SBN/RETMCRO/SBN/RETBPRG/BENDSTEP/STEPInstructionJUMP/JUMP ENDCONDITIONAL JUMP/JUMP ENDCONDITIONAL JUMP NOT/CONDITIONAL JUMP ENDMULTIPLE JUMP/JUMP ENDFOR/NEXTINTERLOCK/INTERLOCK CLEARSUBROUTINE CALL/SUBROUTINE ENTRY/SUBROUTINE RETURN(If the global subroutine instructions (GSBS(750), GSBN(751), and GRET(752))are used, the subroutine can also be called from another task.)MACRO/SUBROUTINE ENTRY/SUBROUTINE RETURNBLOCK PROGRAM BEGIN/BLOCK PROGRAM ENDSTEP DEFINEInstructions That Are Not Allowed in Interrupt TasksThe following instructions cannot be placed in interrupt tasks. Any attempt to execute one of theseinstructions in an interrupt task will cause the Error Flag (P_ER) to turn ON and the instruction willnot be executed. The following instructions can be used if an interrupt task is being used as an extracyclic task.MnemonicTKONTKOFSTEPSNXTSTUPDIEISFCON, SFCOFF, SFCPR,SFCPRNTASK ONTASK OFFSTEP DEFINESTEP NEXTCHANGE SERIAL PORT SETUPDISABLE INTERRUPTENABLE INTERRUPTSFC Task Control InstructionsInstruction• The operation of the following instructions is unpredictable in an interrupt task: HUNDRED-MSTIMER: 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), HUNDREDTH-MS TIMER TIMUH(544) and TIMUHX(557), ACCUMULATIVE TIMER: TTIM(087) andTTIMX(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 TIMERWAIT: TMHW(815) and TMHWX(817), PID CONTROL: PID(190), and FAILURE POINT DETEC-TION: FPD(269).• In addition to the above, the following instruction cannot be used in the power OFF interrupt task.The Error Flag (P_ER) will not turn ON if these instructions are used in the power OFF interrupttask. The instruction will not be executed.READ DATA FILE: FREAD(700), WRITE DATA FILE: FWRIT(701), WRITE TEXTFILE(TWRIT(704)), NETWORK SEND: SEND(090), NETWORK RECEIVE: RECV(098),5-34 <strong>CJ2</strong> <strong>CPU</strong> <strong>Unit</strong> <strong>Software</strong> User’s <strong>Manual</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!