The Omron CP1H series of programmable logic controllers are capable of having 4096 timers. There are twelve different timing instructions in the PLC. Six binary and six BCD instructions for the set values of the timers separate the six basic instructions. The memory area for timers have separate areas for the Timer PVs (Present values) and the Timer Completion Flags. We will be looking at the timer instructions in the CP1H along with some programming examples.
The secret to using timers is a post that will go over timing charts. It is a good place to understand how timing charts can assist you in programming timers. The Secret of Using Timers
We will be covering the following instructions:
TIM – Timer – This is a decrementing timer (0.1 sec base)
TIMH – High Speed Timer – This is a decrementing timer (0.01 sec base)
TMHH – ONE-MS Timer – This is a decrementing timer (0.001 sec base)
TTIM – Accumulative Timer – This is an incrementing timer (0.1 sec base)
TIML – Long Timer – This is a decrementing timer (0.01 sec base)
MTIM – Multi-Output Timer – This is an incrementing timer (0.1 sec base)
All of the instructions above have a set value in BCD (Binary Coded Decimal). If you put an ‘X’ behind each of the above instructions you will indicate the same operation with a set value in binary.
The following table show the specifications of the timers:
Let’s take a look at a sample of an on-delay timer. We can use any of the following timer instructions. TIM / TIMH / TMHH will all work the same way except for the timing base rate.
Our sample will use TIM. The SV (set value) will be in BCD as the instruction specifies.
When bit 21.00 is turned on, Timer 0000 will start to decrement from the set value of #100.
100 X 0.1 seconds = 10.0 seconds
After the timer expires the bit T000 will turn on. This will then turn on the output 100.00
The timer will reset to the set value of #100 once bit 21.00 turns off. This timer is not memory retentive.
When bit 21.01 is turned on, output 100.01 will be turned on. This output is sealed on by itself and will only turn off when Timer T0001 turns on.
When bit 21.01 is turned off, the output remains on and the timer T0001 will start to decrement from the set value of #100. After the timer expires the bit T0001 will turn on. This will then reset the output 100.01.
When bit 21.02 turns on, it will go through the normally closed timer T0003 bit and start timer T0002. Timer T0002 will decrement until it expires. When T0002 turns on it will start T0003.
Output 100.02 will turn on when T0002 is on and T0003 is not on. When T0003 expires it will reset T0002 and the output 100.02 will turn off. The cycle will not repeat itself.
Output 100.02 will be off for as long as T0002 an on for T0003. When Bit 21.02 turns off the circuit will stop flickering the output and the timers reset.
TTIM – Accumulative Timer
As the name implies, the accumulative timer will count up to the set value. In our case the SV value is #200. (20 seconds) When bit 21.03 turns on the timer starts to time. Timing stops when bit 21.03 turns off but the present value (PV) remains the same until a reset is done. The reset is a separate input to the timer with bit 21.04. The reset bit will override the enable bit.
When the PV is greater than or equal to the SV, output 100.03 will turn on.
TIML – Long Timer
The long timer can be used to set a maximum time value of #99999999. This would translate to 9 999 999.9 seconds, which is just over 115 days long. When bit 21.05 turns on, the timer will decrement from the SV down to 0 and the first bit of the completion word specified will turn on. In our case this will be H0.00.
MTIM – Multi Output Timer
The multi output timer will allow you to set up to eight outputs off of a single timer. We specify the completion flags (Channel 300 – 300.00 to 300.07) to trigger when the corresponding SP value is reached for each of the outputs. (D210 – D217). The reset bit for the timer is bit 8 of the completion flag word. (300.08)
This timer may be memory retentive if the PV value is stored in a memory retentive area. See the operation of this timer in the YouTube video below.
The CP1H PLC comes with a series of internal clock bits. 0.02s, 0.1s, 0.2s, 1s and 1 min clock bits are included. These will turn on and off at 50% duty cycle.
Call these bits up by their respective names in CX programmer.
All CP1H controllers also have a real time clock. (Calendar / Clock)
The address to access values are in the following table:
Setting the real time clock can be done with CX programmer. You can also set this area with instructions in the PLC.
See the YouTube video below on timers in the Omron CP1H PLC.
The following is a list of manuals associated with the CP1H programmable logic controller. See the descriptions for each of these manuals in the first post: Omron CP1H System Hardware
W450 – SYSMAC CP Series CP1H CPU Unit Operation Manual
W451 – SYSMAC CP Series CP1H CPU Unit Programming Manual
W342 – SYSMAC CS/CJ series Communications Commands Reference Manual
W446 – SYSMAC CX-Programmer Ver. 6.1 Operation Manual
W447 – SYSMAC CX-Programmer Ver. 6.1 Operation Manual Function Blocks
W444 – CX-One FA Integrated Tool Package Setup Manual
W445 – CX-Integrator Operation Manual
W344 – CX-Protocol Operation Manual
You can download the PLC program as discussed above here.
Next time we will look at counters in the Omron CP1H PLC.
Watch on YouTube : Omron CP1H Timers
If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.