Vinicius Santos

Problem to read pulses (encoder) of VHSC24/C Card using CompactLogix

12 posts in this topic

Hello guys,

I am running an application for packaging measurement using a sick DFS60B incremental encoder (programmable from 1 to 10000 PPR). In more detail, it passes packaging on a conveyor belt and we have created an inspection station and an expulsion station (defective packaging), so we use the encoder to check at specific points of the packaging for defects (we use special sensors to check defects). ) (there are four in total). However, the problem we are having is the following: When reading the encoder in the PLC, the same means that performs "jumps" and does not enter the windows (GRT and LES) created on the ladder, ie, as if it were not continuous. .

I understand that because the VHSC24 card works at 1 MHz in counter mode, this type of problem should not occur according to our application is not even 100 KHz. For example, our case: Using 1000 PPR and the motor speed (coupling output) is 3600 RPM (in practice it is around 1750 RPM) the frequency is calculated as follows: F = (PPR X RPM) / 60. : F = (1000x3600) / 60 = 60 KHz, ie 60 KHz is much less than 1 MHz, I think this kind of problem does not occur.

Application Info:

. Studio 5000 V31
. PLC Model: Rockwell 1769 - L19ER-BB1B CompactLogix 5370
. Encoder Card: 1734-VHSC24 / C
. Incremental Encoder: Sick, DFS60 up to 10,000 PPR and HTL Electrical Interface. Using a 200 mm circumference / perimeter wheel.
. Motor Nameplate Data: 1670 RPM, 0.37 kW / 0.5 HP, 60 Hz
. Inverter: Weg CFW500, Output Frequency 62 Hz.

Card Settings we use
RPI: 2 ms
Type: Counter, but we already use it as Encoder X1
Store Count Mode: Disabled
Filter: No Filter, but we use 50 KHz and 5 Khz filters in our tests.
Counter Attenuator: 1

Wiring Diagram VHSC24
We turn on encoder A at input 0 and encoder Aret at input 1

In logic
(Structured Text) Using the PMUL instruction to convert encoder (Pulse) data to mm scale.
(Ladder) The window comparisons part (GRT and Les) and other part of the process. We emphasize that we performed the tests also only with the reading and comparison part of the data, excluding the other parts, precisely to verify the issue of Scan, but the problem persisted.

If anyone here in the forum has some information that can help us, I would appreciate it.

Share this post


Link to post
Share on other sites

Posted (edited)

60Khz is a 16.66 microsecond per pulse period. What is your scan time? At an rpi of 2 ms you get about 120 pulses per update. Is that ok?

Edited by b_carlton

Share this post


Link to post
Share on other sites

120 pulses is a big loss.  Since, since the encoder is 1000 PPR and a 200mm circumference / perimeter wheel, I will have a loss of 24mm, do you agree?  What would be an alternative for me to have a resolution of 1 mm?  If not, a resolution of 3 to 5 mm would work for my process as well.  Would lowering the encoder PPR (it's programmable) help?  Is there any other setting on the VHSC24 card that could help?

Share this post


Link to post
Share on other sites

You didn't mention your program's scan time. You would still have to deal with that. The number of pulses between actions on them will depend on the greater of the rpi or the scan time. You may have to do more research on high speed processing.

Share this post


Link to post
Share on other sites

Scan time is around 2 ms or less.  I've already researched it, but what intrigues me is the fact that the card is 1 MHz and has this kind of problem.

Share this post


Link to post
Share on other sites

It will count and keep track of each pulse but the rpi will control how often the total is reported to the CPU. Your scan time will control how often your program can act on the total as reported.

Share this post


Link to post
Share on other sites

With the hardware I have on hand, what is the alternative to my problem?  I tried to use the windows in Output Configuration, but couldn't.

Share this post


Link to post
Share on other sites

I'm sorry that I can't help further. The only applications I worked on were much slower. I don't know if there is a module with PLS (Programmable Limit Switch) capabilities such that processing of counts is done in the counter card itself and directly controls it's own high speed outputs. Good luck.

Share this post


Link to post
Share on other sites

Thanks so much Carlton.  I will continue to look for a solution.  When you find out I'll post here.

Share this post


Link to post
Share on other sites

I've never used high speed counter modules either, but I think there's a way to set up a hardware interrupt so that the high speed counter module can break into the PLC scan when it needs to. I don't know how to set that up or if the windows can be set up in the module or not. It's worth investigating, though.

Failing that, it may be possible to use a different PLC that supports motion control commands. A quick look in Proposal Works shows the -L18ERM-BB1B that supports CIP motion and 1734 I/O, but it has less memory (512KB instead of 1MB).

Share this post


Link to post
Share on other sites
On 5 January 2020 at 10:41 AM, Vinicius Santos said:

Thanks so much Carlton.  I will continue to look for a solution.  When you find out I'll post here.

To elinate time issues I have used a lower end Plc (I/o) wise to perform the encoder interrogation and passed a signal to the main processor. Hope you reach a solution.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now