Verifying Encoder Operation
After wiring the encoders, add them to Epson RC+ as described in the previous section. Next, confirm the operation by following the steps below.
Start Epson RC+.
Create a new project called “TestCnv”.
Set up the conveyor, using the information below for reference.
Creating Conveyors in a Project
- Encoder: Controller, Counter 1
- Type: Sensor
Select the encoder according to the actual wiring.
Make sure to perform the calibration, otherwise the conveyor tracking system cannot work properly. When you only check the encoder operation, it is not necessary to calibrate the conveyors.
Now you can use the Cnv_Pulse function to read pulses from Encoder 1 from a program or from the monitor window.
For example, execute this print statement from the monitor window to read the pulses from encoder. Then move the conveyor and execute the command again.
>print cnv_pulse(1)
You can also use a simple program as shown below. Start the program and move the conveyor. When the conveyor starts moving, the value of Cnv_Pulse will be changed.
Function main
Do
Print Cnv_Pulse(1)
Wait .5
Loop
Fend