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 ProgrammingScheduled Interrupt TasksTasks are executed at specified time intervals by using the timer in the <strong>CPU</strong> <strong>Unit</strong>. Up to two interrupttasks (interrupt tasks 2 and 3) can be used for scheduled interrupts 0 and 1.Cyclic taskMSKS4&100ENDInterrupt number 4 (Scheduled interrupt task 0)will be executed at an interrupt interval (100 ×10 ms)Scheduled interrupt time unitin PLC Setup = 10 ms (0.01 s)Every secondCyclic taskInterruptScheduled interrupt task(Interrupt task No. 2) isexecuted once per second.Scheduled interrupt task 2ENDEND55-2 Tasks Interrupt Task Numbers and Interrupt NumbersInterrupt task No.Scheduled interrupt 0 2 4Scheduled interrupt 1 3 5Interrupt number(MSKS(690))5-2-3 Interrupt Tasks Executing Scheduled Interrupt TasksScheduled interrupt tasks are disabled when the <strong>CPU</strong> <strong>Unit</strong> operation is started. They can beenabled by using the MSKS(690) (SET INTERRUPT MASK) instruction. The time interval for scheduledinterrupt tasks is determined by setting of the scheduled interrupt time unit in the PLC Setupand setting for the scheduled interrupt time specified with the operand when MSKS(690) is executed.• Setting the Scheduled Interrupt Time <strong>Unit</strong>Set the unit for the interrupt time that is set with MSKS(690) using the “Scheduled Interrupt Interval”setting on the Timings/Synchronous Tab Page in the PLC Settings Dialog Box of the CX-Programmer.The unit can be set to 10 ms, 1.0 ms, or 0.1 ms. The default is 10 ms.• Setting the Scheduled Interrupt Time Using MSKS(690)Set the interval at which the scheduled interrupt task will be executed.The unit can be set to between &1 and &9999 decimal (#0001 to #270F hex).Example: If the scheduled interrupt time unit is set to 0.1 ms and the scheduled interrupt time is setto &5 decimal, the time interval is 0.1 x 5 = 0.5 ms.The minimum time intervals that can be set for scheduled interrupt tasks are as follows:• <strong>CJ2</strong>H <strong>CPU</strong> <strong>Unit</strong>s: 0.2 ms• <strong>CJ2</strong>M <strong>CPU</strong> <strong>Unit</strong>s: 0.4 ms<strong>CJ2</strong> <strong>CPU</strong> <strong>Unit</strong> <strong>Software</strong> User’s <strong>Manual</strong>5-23

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

Saved successfully!

Ooh no, something went wrong!