Example: How to create an HSC program

This example shows how to create an HSC program that uses a quadrature encoder and includes a Programmable Limit Switch (PLS) function.

Quadrature encoder used in the example

The HSC program example uses an HSC function block and a quadrature counter with phased inputs A and B. The quadrature encoder determines the direction of rotation and the position for rotating equipment, such as a lathe. The Bidirectional Counter counts the rotation of the quadrature encoder.
The following quadrature encoder is 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.
Quadrature encoder example
Quadrature encoder example

Create an HSC program

Perform the following tasks to create, build, and test the HSC program, and then add a PLS function.
Steps to create an HSC program
Step
Task
1
2
3
4
5
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal