Sign in to follow this  
Followers 0
stickman47

1746-hsce

8 posts in this topic

Folks, I am stuck on a project using a differential encoder with the 1746-HSCE card. I have a problem with the card not counting after several cycles. In my program a floating register, f8, is tracking pulses at f8:9. This project is tracking end welds in a steel strip operation. The end welds are detected by a luminosity scanner which starts the sequence. This input resets f8:9 to zero and counts pulses. After a pre-determined count an output triggers to open a gate. Once the end weld clears the gate it closes and waits for the next end weld trigger. The problem is that SOMEWHERE the counts are accumulating and the HSCE stops counting. The card is NOT faulting, it just stops counting at what ever value it may be. Is there a limit on accumulated counts? If so, how can I reset, or even monitor this? The HSCE card hardware configuration created an input word, I9.0 thru I9.7. I can see the bits changing as I turn the encoder but I don't know which bit I should be using. The ideal set-up would be the Z channel of the encoder since it only pulsess once per revolution, but I have no idea what the 127 bits of this input represent. Can anyone make sense of my ramblings? Help!

Share this post


Link to post
Share on other sites
this is just a GUESS based on what you've posted so far – but using a FLOATING POINT location to "track" pulses is usually not a good idea ... presumably you're doing this "tracking" by adding some small incremental amount to your F8:9 location with each pulse of the signal ... one common problem with that approach is that floating point numbers tend to "round off" and lose precision after a certain value has been reached ... an analogy: if we keep adding pennies to our bank account, sooner or later the bank quits counting the pennies and just rounds off the balance – so the amount in the bank never goes up anymore – regardless of how many pennies we try to deposit ... if this idea doesn't help solve your problem then consider posting your entire RSS file ... maybe we can spot something that you're overlooking ... if you're not allowed to post the program, then tell us HOW MUCH you're adding with each pulse – and HOW HIGH you expect the value to ever climb – and what value you're seeing when the floating point location gets "stuck" ... good luck with your project ... Edited by Ron Beaufort

Share this post


Link to post
Share on other sites
If the module does not flash the fault LED, probably the configuration is fine, however, the count stop could be caused by an application error and/or by an encoder end hardware/circuit malfunction. Starting at Page 5-4 of http://literature.rockwellautomation.com/idc/groups/literature/documents/um/1746-um006_-en-p.pdf you have a few application error scenarios examples. It looks like your issue is similar with the "Counter Value Does Not Change" paragraph; try the suggested channel LED troubleshooting and the proposed corrective actions. Edited by dmargineau

Share this post


Link to post
Share on other sites
if your steel or weld is going to be the same length each time, then why do you not find out how many pules or counts is required for say an inch. Then just add the inches to gather and after a predetermined number of inches open the gate.

Share this post


Link to post
Share on other sites
Thank you for that information. I looked over the section and found that bit I:9.0/13, count overflow, is being set after approx. 3 cycles. This bit can only be reset by re-initializing the program (RUN to PROGRAM and back to RUN). This is not practical as the encoder will be constantly turning as the strip passes under it. How can I prevent this overflow? Is this part of the configuration? The manual does not address this issue.

Share this post


Link to post
Share on other sites
Steve, This is exactly what I am trying to accomplish, and have, in fact, accomplished what I set out to do. Unfortunately, this module has many secrets. It is continuing to acumulate pulses and I don't know how to reset them..

Share this post


Link to post
Share on other sites
There are two major modes of counting, linear and rotary. Linear counts back and forth between limits but doesn't go past them. Rotary counts up to a value then resets so it can start counting up again. Research these two terms in the manual for the counter and decide which better describes your application. Also look for the Gate function 9not the physical gate) which allows you to suspend counting until some event occurs.

Share this post


Link to post
Share on other sites
Good, all you need to do now is set the soft reset bit in the HSC card this will reset the count and allow you to take your new sample. I do believe the bit is bit 7 for the soft reset, look at the manual and on page 27 it tells you how to reset the counter. I would reset the counter after you have moved an inch.

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
Sign in to follow this  
Followers 0