ML1100 and HSC

I just got off of a job that has a Micrologix 1500 with some severe accuracy problems. I didn't notice until a few minutes ago while looking through the guys program, but it mixes the RAC instruction along with MOV instructions to set the HSC accumulator. I always thought the RAC was the only way to set the HSC's accumulated value
According to the help, the RAC instruction...
Use this instruction to write a value to the hardware accumulator and image accumulator.

Wouldn't the MOV instruction just change the image accumulator value which would then be set back to the hardware accumulator at the beginning of the next scan?
HSCReset.JPG
 
I don't understand

timbo_uk said:
Apparently although the ML1100 has 4 high speed inuts, there is only 1 HSC that can be allocated to any of them! I dont know for sure (not used one yet) but more than one person has said this!
I don't see how one can have an encoder with just one input. There would be no noise immunity or the ability to tell which direction the encoder is moving.

Four high speed inputs for 1 encoder makes sense to me. A+ A- B+ B-. I wonder, but not too much, why it isn't 6 Z+ Z-.
 
Actually the Micrologix doesn't use the A- and B-, only A and B. Never had trouble with noise immunity but not having the complements is definitely a con. They are 24VDC inputs so I guess that helps.

The high speed inputs can be setup in several ways. Depending on the HSC mode it requires between 1 and 4 inputs. Here is the rundown of configurations
0 - Up counter
1 - Up counter with external reset and hold
2 - Counter with external direction
3 - Counter with external direction, reset, hold
4 - 2-input counter (up/down)
5 - 2-input counter (up/down) ext, reset, hold
6 - Quadrature counter (phased inputs A, B)
7 - Quad count (phased in A,B) ext, reset, hold
A simple counter (1) requires 1

A counter with external direction, UP/Down Counter, and Quadrature counter all require 2

A Counter with external direction/reset/hold and a Quadrature Counter with external reset/hold both require 2

High speed inputs can be used for other things such as EIIs
 
TWControls said:
Wouldn't the MOV instruction just change the image accumulator value which would then be set back to the hardware accumulator at the beginning of the next scan?

Yes

I have fixed a 5/03 programmed by that dude! I inherited a buggy program in which they thought they were resetting a 1746-HSCE with a similar operation.

No, seriously, it looks like it could be one of two things:

1)They want to ignore first 5800 pulses in software. Maybe the first 5800 pulses from the device are a deadband or backlash of some sort, and the SLC doesn't need to care about them, but needs an accurate count of all pulses including them once that deadband is breached.

Notice this only happens in Auto mode. Perhaps a particular HMI object is affected by this logic? They had a reason, once your comment for B3:4/1 is filled in it may make more sense.

EDIT: This probably should have been done with a copy of the ACC value.

2)A simple programming mistake, an attempt to reset that was abandoned, but never deleted after the real reset logic was inserted.

Since there is a valid method for reset, I lean toward #1 until it could be investigated.

Paul
BTW: Is that comment for Mode with "3=???" your note? It is funny that I use the exact same "???". I put it in address & rung comments and even autocad drawings. Then when I want to search for undocumented addresses...great minds... ;)
 
Last edited:
Peter Nachtwey said:
I don't see how one can have an encoder with just one input. There would be no noise immunity or the ability to tell which direction the encoder is moving.

Four high speed inputs for 1 encoder makes sense to me. A+ A- B+ B-. I wonder, but not too much, why it isn't 6 Z+ Z-.

Before I ever worked with PLC connected encoders, I was exposed to them on Max control and S-Class GML family motion controllers "where all the wires were hooked up"...

Then when I was fixing some conveyor logic in a SLC with encoder HSCE feedback. I missed having a bit for "Encoder Loss", but that was detectable.

The "Encoder Noise" fault can't be done without the falling edge pulses so is definitely a weakness. We had to troubleshoot for noise with a scope.

Paul
 
OkiePC said:
Yes

I have fixed a 5/03 programmed by that dude! I inherited a buggy program in which they thought they were resetting a 1746-HSCE with a similar operation.

No, seriously, it looks like it could be one of two things:

1)They want to ignore first 5800 pulses in software. Maybe the first 5800 pulses from the device are a deadband or backlash of some sort, and the SLC doesn't need to care about them, but needs an accurate count of all pulses including them once that deadband is breached.
Notice this only happens in Auto mode. Perhaps a particular HMI object is affected by this logic? They had a reason, once your comment for B3:4/1 is filled in it may make more sense.

EDIT: This probably should have been done with a copy of the ACC value.

2)A simple programming mistake, an attempt to reset that was abandoned, but never deleted after the real reset logic was inserted.

Since there is a valid method for reset, I lean toward #1 until it could be investigated.
Actually it was used extensively in the program. He added prox switches to "correct" the length every so often since it was getting off. First this is BS, duct tape for mechanical problems or in this case a faulty program. I have removed all of these "correcter" proxes and trashed his program. It seems to be very accurate and repeatable so far

HSCReset2.JPG

Paul
BTW: Is that comment for Mode with "3=???" your note? It is funny that I use the exact same "???". I put it in address & rung comments and even autocad drawings. Then when I want to search for undocumented addresses...great minds... ;)
The guy left no documentation, so it's mine while I was trying to make sense of what he had
 
TWControls said:
...First this is BS, duct tape for mechanical problems or in this case a faulty program.
I FEEL YA BRO' LET IT ALL OUT!

TWControls said:
...I have removed all of these "correcter" proxes and trashed his program. It seems to be very accurate and repeatable so far

I spend more time yanking bad skeletons out of other peoples code and inserting better structure, re-using much of their flesh.

TWControls said:
The guy left no documentation, so it's mine while I was trying to make sense of what he had

Gotta love it. Ugly OSR, failure to document, manipulating key variables directly. I wish I could have posted some code from my goodyear days...

Glad you got it knocked out!
 
OkiePC said:
Gotta love it. Ugly OSR, failure to document, manipulating key variables directly. I wish I could have posted some code from my goodyear days...
Oh, besides the fact that the code didn't work, it was probably the cleanest part of the program.:eek:

Never done any work at Goodyear, but I've done lots of work in the tire industry
 
OkiePC said:
Yes

I have fixed a 5/03 programmed by that dude! I inherited a buggy program in which they thought they were resetting a 1746-HSCE with a similar operation.

No, seriously, it looks like it could be one of two things:

1)They want to ignore first 5800 pulses in software. Maybe the first 5800 pulses from the device are a deadband or backlash of some sort, and the SLC doesn't need to care about them, but needs an accurate count of all pulses including them once that deadband is breached.

Notice this only happens in Auto mode. Perhaps a particular HMI object is affected by this logic? They had a reason, once your comment for B3:4/1 is filled in it may make more sense.

EDIT: This probably should have been done with a copy of the ACC value.

2)A simple programming mistake, an attempt to reset that was abandoned, but never deleted after the real reset logic was inserted.

Since there is a valid method for reset, I lean toward #1 until it could be investigated.

Paul
BTW: Is that comment for Mode with "3=???" your note? It is funny that I use the exact same "???". I put it in address & rung comments and even autocad drawings. Then when I want to search for undocumented addresses...great minds... ;)

This is off the topic, but noticed your link to the mixed martial arts fighter. Is that you or someone you know?
Just curious, have a black belt in Ju-Jitsu as well as Tang Soo Do myself, and thought it was good to find someone on here with the same interest.
I always look to see if you and TW have posted anything new, and then read it.
Trying to learn more about using the HSC myself, and the things that you and TW have posted have been very useful.
 
hounddog said:
This is off the topic, but noticed your link to the mixed martial arts fighter. Is that you or someone you know?
Just curious, have a black belt in Ju-Jitsu as well as Tang Soo Do myself, and thought it was good to find someone on here with the same interest.
I always look to see if you and TW have posted anything new, and then read it.
Trying to learn more about using the HSC myself, and the things that you and TW have posted have been very useful.
Now that I know you have a black belt...I better answer your questions quicker :) I still got one PM of yours to answer. I'll try to get to it tomorrow
 
TW
To be honest, most of the time, I hesitate to post. When I read what folks such as yourself, Okie, Peter Nachtwey, and Alaric post, I realize just how much more I still need to learn.

Have a good weekend, just got back from working in Arkansas this morning, and Wife just reminded me I need to take her to the local Steak House, since I was not home for Valentines day.
 
hounddog said:
This is off the topic, but noticed your link to the mixed martial arts fighter. Is that you or someone you know?
Just curious, have a black belt in Ju-Jitsu as well as Tang Soo Do myself, and thought it was good to find someone on here with the same interest.

Just a spectator interest here. I have always enjoyed watching Boxing, MMA, NFL, and pretty much no other sports.

Nog is one of my favorites, and Jens Pulver is my all time favorite figher, but I like the whole lot of 'em with few exceptions.

Now that Minotauro has unified the MMA heavyweight rankings, I just wanted to help him brag since I have watched him for so long, and now he is at the pinnacle. I wonder how Couture will respond to Antonio's challenge?
 
hounddog said:
TW
To be honest, most of the time, I hesitate to post. When I read what folks such as yourself, Okie, Peter Nachtwey, and Alaric post, I realize just how much more I still need to learn...

Just remember, when you read my stuff, comapred to those other names, my perspective is often that of an "agressive student". I hope that comes through in my interactions and you don't take me for the expert because of my guesses and inquiries!


Paul,
Jack-of-all-trades-Mastur-of-....

PiEaCe!
 

Similar Topics

It's been a long day and i didn't need an error code that says "HSC instruction is not valid on the currently selected processor -- 1763...
Replies
16
Views
3,935
Hi all, I need to implement a flow meter via HSC in an existing machine. The flow meter provided is a hall effect NPN unit, which needs to connect...
Replies
3
Views
3,850
I'm looking to implement a low-cost, efficient method of communicating some integer values to an R30iB robot from a Rockwell 1100 PLC. I am not...
Replies
8
Views
1,731
Hello all, I am trying to setup my MicroLogix 1100 as a modbus RTU master for a modbus network containing multiple modbus RTU slaves. I currently...
Replies
7
Views
3,943
We have a machine that keeps losing its program at random intervals; sometimes 2x-3x in a shift, sometimes will go over 1wk without issue. I had a...
Replies
9
Views
2,946
Back
Top Bottom