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.

10 <strong>CPU</strong> <strong>Unit</strong> FunctionsProgramming Example 2This example shows background execution when index register output is specified, as is possible forMAX(182), MIN(183), and SRCH(181). Programming without Background ExecutionAs shown below, the PLC memory map address of the word containing the maximum or minimumvalue is output to an index register.Execution conditionaMAXD0D100D200MOV,IR0D300MAX(182) is executed completely assoon as the execution condition "a" turnsON, and the actual memory map addressof the word containing the maximumvalue is output to IR0The contents of the I/O memory wordindicated by the memory mapaddress in IR0 is copied to D300.10-2 Cycle Time/High-speedProcessing1010-2-5 Background Execution Programming with Background ExecutionWith background execution, the PLC memory map address of the word containing the maximum orminimum value is output to A595 and A596. MOVL(498) is then used to move the PLC memory mapaddress to the index register.CommunicationsExecution Port Enabledcondition Flaga A202.00MAXD0D100D200MAX(182) execution is started if executioncondition "a" is ON and the CommunicationsPort Enabled Flag is ON. The actual memorymap address of the word containing themaximum value is output to A595 and A596.SETbExecution condition "b" is turned ON toexecute MOVL(498).RSETa"a" is turned OFF so that MAX(182) will notbe executed in the next cycle.ExecutionconditionCommunicationsPort EnabledFlagb A202.00MOVLA595IR0When execution condition "b" is ONand the Communications PortEnabled Flag is ON, MOVL(498)copies the actual memory mapaddress in A595 and A596 to IR0.Extraprocessingrequired tomoveaddress.MOV,IR0D300The contents of the I/O memory wordindicated by the memory mapaddress in IR0 is copied to D300.RSETb<strong>CJ2</strong> <strong>CPU</strong> <strong>Unit</strong> <strong>Software</strong> User’s <strong>Manual</strong>10-17

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

Saved successfully!

Ooh no, something went wrong!