CompactLogix HSC Issue

daba

Lifetime Supporting Member
Join Date
Jul 2004
Location
uk
Posts
5,401
I have a problem with a 1769-HSC module...

Occasionally the internal counter counts the wrong way !!

I have a rung which asserts the correct setting of the direction bit in the Local:4:O tag, and the picture shows that this does re-assert the direction to the correct one, as the direction changes abruptly (which wouldn't be the case if the machine did actually move in the wrong direction first).

The wiring is correct - differentially connected - encoder A to A0+ and A0-, B to B0+ and B0-, and the HSC modules (3 of them), sit immediately to the right of the CompactLogix power supply, so it's not a distance issue.

Has anyone ever seen this happen ?

As the whole panel is fed from a generator, I'm thinking this may be a supply noise problem, possibly corrupting the data sent to the module, or it is internally being hit with RFI.

The site is currently providing a cleaner mains feed to supply the CompactLogix, and the next step after that may be some form of Line Conditioning...

In the picture I was using manual controls, alternately going forwards, then backwards....

2015-07-23 16.27.04.jpg
 
I thought that an AB differential encoder did not need to have the direction set
The Phasing of the A pulse compared to the B pulse determined the direction (only in a quadrature encoder)


What are the HSC configuration settings? (for a ABZ Quadrature encoder I would be using 4x - (counts every edge so a 1024 pulse encoder gives 4096 counts per rev))
What is the encoder connection that you are using?
What is the encoder part number?

Can you get an oscilloscope to monitor encoder waveforms?
The specifications of the HSC will have a limitation on when the B phase changes state compared to the A phase
It will also assist you to confirm that your wiring is correct (If a new install it could be incorrectly marked and not you)

Link to a bad and a good waveforms from a quadrature encoder
http://tmi.yokogawa.com/technical-library/application-notes/motor-encoder-rotational-jitter-encoder-slit/

My experience with noise is that it causes irregular counting when moving at a fixed speed and moving while stationary - your trend does not show that
 
Last edited:
I thought that an AB differential encoder did not need to have the direction set
The Phasing of the A pulse compared to the B pulse determined the direction (only in a quadrature encoder)

We have six encoders on this machine - and we kept the external wiring standard (Encoder A to HSC A etc.). We then found that 3 of them gave a count in the wrong direction - I therefore wrote a rung of code that OTLs the "Reverse Direction" bit in the Output tags for the channels that needed reversing. It also OTUs those that don't. I believe the trend trace I posted shows that the HSC has "forgotten" it's configuration until the output tag is again sent to the module, because the count reversal is immediate...


What are the HSC configuration settings? (for a ABZ Quadrature encoder I would be using 4x - (counts every edge so a 1024 pulse encoder gives 4096 counts per rev))
What is the encoder connection that you are using?
What is the encoder part number?

The encoders are not Allen-Bradley encoders. We have checked with the encoder manufacturer that everything is wired correctly. We do not need the resolution given by quadrature configuration, they are set up as Ring Counters, and the Operation mode as Encoder x1. The encoders are 2000 ppr, and I scale the encoder count in the logic to distance.


Can you get an oscilloscope to monitor encoder waveforms?
The specifications of the HSC will have a limitation on when the B phase changes state compared to the A phase
It will also assist you to confirm that your wiring is correct (If a new install it could be incorrectly marked and not you)

The channel behaves perfectly "most" of the time. The counting is OK, so we are not seeing noise on the encoder inputs, or the positioning would be off every time. We have this problem occasionally when the axis starts. This axis has an electromagnetic brake release driven by a contactor in the panel, and I believe this is corrupting the HSC card.

I just wondered if anyone else had had this problem with the HSC configuration and could suggest the levels we may have to go to to stop the HSC from misbehaving...

My experience with noise is that it causes irregular counting when moving at a fixed speed and moving while stationary - your trend does not show that

Yes, agreed, the trend shows the count going in the wrong direction, until the Local:3:O tag is again sent to the module. If this fault didn't happen, the axis would be behaving admirably
 
DISCLAIMER:

I have ZERO experience with HSC on a CompactLogix system – so this might well be a wild goose chase ...

but ...

every time someone has any type of HIGH-SPEED "input/output" issues on a COMPACT-Logix system (not CONTROL-Logix) my mind instantly starts to wander along the lines discussed in the "cricket" experiment detailed in the following link ...

http://forums.mrplc.com/index.php?showtopic=26162&p=125399

just listen to the first .WAV file and see if you think that this COULD be part of your problem ... if so, check the Priority settings of any Periodic Tasks that you might be using – and if those Priorities are set for anything LESS THAN 7 – then maybe the COMPACT-Logix "Dedicated I/O Task" is part (or all) of your problem ...

good luck with your project ...
 
DISCLAIMER:

I have ZERO experience with HSC on a CompactLogix system – so this might well be a wild goose chase ...

but ...

every time someone has any type of HIGH-SPEED "input/output" issues on a COMPACT-Logix system (not CONTROL-Logix) my mind instantly starts to wander along the lines discussed in the "cricket" experiment detailed in the following link ...

http://forums.mrplc.com/index.php?showtopic=26162&p=125399

just listen to the first .WAV file and see if you think that this COULD be part of your problem ... if so, check the Priority settings of any Periodic Tasks that you might be using – and if those Priorities are set for anything LESS THAN 7 – then maybe the COMPACT-Logix "Dedicated I/O Task" is part (or all) of your problem ...

good luck with your project ...

I'm quite confident it's not an I/O issue Ron, but thanks for the suggestion...

The point is the Count goes the wrong direction, until the standard I/O exchange rewrites the output tag, which contains the desired setting of the "direction" bit.

Here's another screen shot zoomed in to the point at which the axis starts moving in a negative direction, and the counts appear to start to count down, and then flips to counting UP.... Then a short time later (which I am assuming is when the "O" tag gets rewritten), the counter immediately flips back to counting down, there was no change in the direction of movement of the axis.

I can't think of any I/O priority issues that could cause this counting behaviour, the trend demonstartes that it is counting regularly and cleanly. I'm putting it down to the HSC configuration being attacked by noise - perhaps it's generated in the panel by the brake or initial motor current.

It can't be anything mechanical either, the encoder is driven directly by a very simple pinion gear on a linear rack.

Interestingly, I've just spotted that this axis is one of the 3 that the "DirectionInvert" is written to 0, ( OTU Local:5:O.Ctr0DirectionInvert ), not one that is written to a 1

2015-07-23 16.14.51.jpg
 
here's the reason that I mentioned the I/O thing ...

my understanding (subject to being corrected) is that the "direction" is derived from which one (of two) inputs goes "high" first ... A-then-B signifies ONE direction ... B-then-A signifies the OTHER direction ...

so my thinking was that anything that might alter the "which comes on first" determination could make the direction of travel appear to "reverse" ...

as I said earlier – this is probably a wild goose chase – but I've seen other systems cause a great deal of grief when this COMPACT-Logix I/O Task effect hadn't been considered ...
 
here's the reason that I mentioned the I/O thing ...

my understanding (subject to being corrected) is that the "direction" is derived from which one (of two) inputs goes "high" first ... A-then-B signifies ONE direction ... B-then-A signifies the OTHER direction ...

so my thinking was that anything that might alter the "which comes on first" determination could make the direction of travel appear to "reverse" ...

as I said earlier – this is probably a wild goose chase – but I've seen other systems cause a great deal of grief when this COMPACT-Logix I/O Task effect hadn't been considered ...

This is all happening inside the HSC module, Ron, the normal I/O task just reads the "Current Count" in the Local:5:I tag, which is then fed into a "SCP" AOI.

In the HSC, if A->B, then the counter counts UP, and if B->A the counter counts DOWN. This action can be reversed by setting a bit in the Local:5:O tag called Ctr#DirectionInvert.

My code continually asserts this bit low with an OTU, which is sent at the module RPI (set at 10mS)

I'm surmising that some electrical noise is corrupting tha data in the HSC, or the "backplane" comms, and setting this bit inadvertantly...


PS. Having thought about this some more, with the RPI at 10mS, there wouldn't be enough time for the amount of counts in the wrong direction that I've seen.

They'll be installing a "clean" supply to power just the CompactLogix next week - hopefully this will cure the problem, but if not, I'll be taking my oscilloscope to look at the pulses....

Of course, I've not ruled out a faulty module yet... I've got 3 of them in this job, so can swap them around and see if the fault moves with the module, or stays on the same axis...
 
This is all happening inside the HSC module,

I had GUESSED that to be true - thank you for confirming it ... as I said at first, I have ZERO experience with the CompactLogix HSC - none of my customers have needed anything along those lines (yet) ...

I had a hunch that this would turn out to be a chase of the wild goose - but that "Dedicated I/O task" feature is so weird that I thought that I'd mention it "just in case" ...

good luck with your project ...
 

Similar Topics

Hi everyone, this is my first time trying to setup encoder counts and track the traveled distance and speed i am using L27ERM QBFC1B processor...
Replies
12
Views
382
Hello all. I am trying to get an encoder connected to an embedded HSC on a 1769-l24er-qbfc1b. This is how I wired it in but it isn't working at all.
Replies
11
Views
946
Team, I have an encoder (Encoder Products TR1)that has a wheel attached to it and rides on material in my machine. I need to calculate In/Min as...
Replies
9
Views
2,179
Do you have to use a Allen Bradley encoder with the Embedded HSC on a CompactLogix L23E
Replies
1
Views
1,758
cutting my teeth on rs5000 and need help programing a 845t encoder.
Replies
14
Views
4,734
Back
Top Bottom