
Rockwell Automation Publication 2080-UM002N-EN-E - November 2022
279
Appendix B Quickstarts
Use the High-Speed Counter
To use a HSC device, you first need to establish the HSC counting mode required by your
application. See
HSC Mode (HSCAPP.HSCMode) on page 204
for available modes on Micro800
controllers.
The following sample project guides you through the creation of a project that uses HSC mode
6, a quadrature counter with phased inputs A and B. It shows you how to write a simple ladder
program with the HSC function block, create variables, and assign variables and values to your
function block. It also guides you through a step-by-step process on how test your program,
and enable a Programmable Light Switch (PLS).
This sample project makes use of a quadrature encoder. The quadrature encoder is used for
determining direction of rotation and position for rotating, such as a lathe. The Bidirectional
Counter counts the rotation of the Quadrature Encoder.
shows a quadrature encoder connected to inputs 0 and 1. The count
direction is determined by the phase angle between A and B. If A leads B, the counter
increments. If B leads A, the counter decrements.
Figure 28 - Quadrature Encoder on Inputs 0 and 1
This quickstart includes the following sections:
•
Create the HSC Project and Variables on page 280
•
Assign Values to the HSC Variables on page 283
•
Assign Variables to the Function Block on page 285
•
Run the High-Speed Counter on page 286
•
Use the Programmable Limit Switch (PLS) Function on page 287
Reverse Rotation
Forward Rotation
B
A
1
2
3
2
1
Count
Quadrature Encoder
A
B
Input 0
Input 1