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 Programming5-10-2 Special Program SectionsCJ-series programs have special program sections that will control instruction conditions. The followingspecial program sections are availableProgram section Instructions Instruction condition StatusSubroutine SBS, SBN, and RET instructions Subroutine program isexecuted.GSBS, GSBN, and GRETinstructionsThe subroutine program sectionbetween SBN and RETinstructions is executed.IL - ILC section IL and ILC instructions Section is interlocked The output bits are turned OFFStep Ladder sectionSTEP instructionsand timers are reset. Otherinstructions will not be executedand previous status willbe maintained.FOR-NEXT loopJMP0 - JME0 sectionBlock program sectionFOR instructions and NEXTinstructionsJMP0 instructions and JME0instructionsBPRG instructions and BENDinstructionsBreak in progress.Block program is executing.LoopingJumpThe block program listed inmnemonics between the BPRGand BEND instructions is executed.Instruction CombinationsThe following table shows which of the special instructions can be used inside other program sections.SubroutineIL - ILC sectionStep laddersectionFOR - NEXTloopJMP0 - JME0sectionBlock programsectionSubroutine Not possible. Not possible. Not possible. Not possible. Not possible. Not possible.IL - ILC OK Not possible. Not possible. OK OK Not possible.Step ladder section Not possible. OK Not possible. Not possible. OK Not possible.FOR - NEXT loop OK OK Not possible. OK OK Not possible.JMP0 - JME0 OK OK Not possible. Not possible. Not possible. Not possible.Block program section OK OK OK Not possible. OK Not possible.Note Instructions that specify program areas cannot be used for programs in other tasks. Refer to 5-2-4 DesigningTasks for details.5-108 <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!