Counter Instructions Lab M3
Counter Instructions Lab M3
Objective: Upon completion of this lab exercise, the student should be able to:
1. Explain the operation of the CTU and CTD instructions.
2. Explain the operation of the Allen Bradley Counter instruction status bits.
3. Explain how the RES instruction affects the Counter data values.
4. Identify one application for a CTU instruction in an industrial environment
5. Change the data values of a CTU/CTD instruction while online.
Counter Instruction:
CTU stands for Count UP. The CTU instruction when energized will increase the accumulated value
of the counter address by one.
CTD stands for Count Down. The CTD instruction when energized will decrement the accumulated
value of the counter address by one. CTD are seldom used, but are usually used with a CTU in a pair.
RES stands for Reset. The RES instruction when energized will reset the Accumulated value and status
bits of a Counter.
Status Bits:
DN – Done Bit – This bit is “on” when the Acc value is equal to or greater than the PRE value.
CU – CTU Enable – This bit is “on” when the CTU instruction has power on it.
CD – CTD Enable – This bit is “on” when the CTD instruction has power on it.
OV – Overflow Bit – This bit is “on” when the Acc value of the counter goes greater than +32767.
UN – Underflow Bit – This bit is “on” when the Acc value of the counter goes less than –32,768.
PROCEDURE:
1. Key in the following PLC program using either the RSLogix500 and save it to a local
drive. Download the new program into the SLC-500 processor. Put the PLC into the
RUN mode and go Online to it with the program panel to complete the following
procedure.
Page 1 of 6
HOME4TECH, 12/30/15
An NSF Funded Project
Page 3 of 6
HOME4TECH, 12/30/15
An NSF Funded Project
10. Key in the following PLC program using either the RSLogix500 software and save it
to a local drive. Download the new program into the PLC processor. Put the PLC
into the RUN mode and go Online to it with the program panel to complete the
following procedure.
Page 4 of 6
HOME4TECH, 12/30/15
An NSF Funded Project
QUESTIONS:
1. Why is the Accumulated value in both the CTU and CTD instruction in the lab always
the same?
6. What happens to the Accumulated value of a counter with a CTD of that address is
energized?
DOL DISCLAIMER:
This product was funded by a grant awarded by the U.S. Department of Labor’s Employment and Training
Administration. The product was created by the grantee and does not necessarily reflect the official position of
Page 5 of 6
HOME4TECH, 12/30/15
An NSF Funded Project
the U.S. Department of Labor. The Department of Labor makes no guarantees, warranties, or assurances of any
kind, express or implied, with respect to such information, including any information on linked sites and
including, but not limited to, accuracy of the information or its completeness, timeliness, usefulness, adequacy,
continued availability, or ownership.
This work is licensed under a Creative Commons Attribution 4.0 International License.
Page 6 of 6