Sign in to follow this  
Followers 0
learning engineer

HSC on ML1100 how do you set up?

12 posts in this topic

I am trying to count pulses from an encoder, via an Optocoupler at a frequency of 50 Hz. can a counter read that fast on AB ML1100? I receive it via a high speed input (I:0/0). I hope that I don’t need to use the high speed counter, since there is only 1 on the 1100 and I really need to read 2 encoders. If I need to use the HSC, can some explain how it works? I don’t understand the low and high preset values. Thanks Thanks, i have been trying to use the HSC on the ML1100 (using RsLogix500), but could not get any count. Can someone shoot me a sample program? I am trying to read from 2 different input; I:0/0 and I:0/1. the frequency is 50hz, and the max count is 50,000. thanks Edited by learning engineer

Share this post


Link to post
Share on other sites
If the on and off times of the signal are equal then that gives 10ms on and off. if your program scan is less than that then an ordinary counter should do well. Be sure to set the input filtering on the inputs to less than that time. probably 1 millisecond should do. (Under I/O Configuration click on the CPU, Choose the Adv Config button, Use the 'Embedded I/O' tab. Open the 'input filter' for the points you will use and set the filtering.

Share this post


Link to post
Share on other sites
To understand the High Speed Counter function in MicroLogix 1100 controllers, start with the User Manual: http://literature.rockwellautomation.com/i...um001_-en-p.pdf There is also a good "Quick Start" document on HSC functions for MicroLogix 1100/1200/1500 controllers in the RA Knowledgebase as document 17447. If you have a 50 Hz square wave incoming signal, that means that the input pulse lasts 1/100 of a second. To accurately count any signal, you need to sample twice as fast as the shortest input signal, so you need to be able to sample the Input every 1/200 of a second. That's 5 milliseconds, which is a pretty low scantime, even for a MicroLogix. What I have done in similar applications is to configure the fast-acting inputs 0 and 1 to run two of the four available Event Input Interrupt (EII) functions. Just perform your counting (or adding, which is sometimes simpler) in those EII-triggered subroutines. Again, check out the User Manual for the structure and function of the EII function file. Also very important; go into the Advanced I/O configuration and change the Input filtering for your fast-acting inputs to 100 or 200 microseconds. The default value for DC inputs is 8 milliseconds, which is almost too slow for your application. First the Cougars win the Apple Cup, then Bernie and I start agreeing..... what is the world coming to ?

Share this post


Link to post
Share on other sites
I Don't know but I would watch that big hill to your south, she might blow any day now!

Share this post


Link to post
Share on other sites
I am trying to count pulses from an encoder, via an Optocoupler at a frequency of 50 Hz. can a counter read that fast on AB ML1100? I receive it via a high speed input (I:0/0). I hope that I don’t need to use the high speed counter, since there is only 1 on the 1100 and I really need to read 2 encoders. If I need to use the HSC, can some explain how it works? I don’t understand the low and high preset values. Thanks Thanks, i have been trying to use the HSC on the ML1100 (using RsLogix500), but could not get any count. Can someone shoot me a sample program? I am trying to read from 2 different input; I:0/0 and I:0/1. the frequency is 50hz, and the max count is 50,000. thanks

Share this post


Link to post
Share on other sites
i have been trying to use the HSC on the ML1100 (using RsLogix500), but could not get any count. Can someone shoot me a sample program? I am trying to read from 2 different input; I:0/0 and I:0/1. the frequency is 50hz, and the max count is 50,000. thanks

Share this post


Link to post
Share on other sites
Here is a program I am in the process of re-writting. I am using a slot count photoeye on a rail that has a hole cut every 1/2". So each on/off on the photoeye is 1/2". I did get the high speed counter to work. I don't have all my ENABLE bits and such working, so what I have right now is I go into the function file HSC, and I toggle the bits manually. Normally you have to do this in program mode, toggle your bits, then go into run mode. For example to get the function to run I have toggled: FE - Function Enable = 1 AS - Auto Start = 1 CE - Counting Enabled = 1 Ladder 10 had the counting. I am not really using Ladder 11, but you have to define a ladder in the HSC. The way I see it, you can set it up two ways. Set your HIP - High Preset to your count - then when the ACC - Accumulator hits this, it will excute your code in ladder 11. In an interrupt style fashion. I set my HIP to 10,000, and scan normally and watch the ACC in normal scan. Ladder 10. My scan time is fast enough to read the a count, and I am only using the high speed for counting. I also when into advance I/O and changed the update input speed time. If your scan time is not fast enough, I recommend you set your HIP to your count, and excute ladder on an interrupt bases in ladder 11. Basically when your HIP his pre-set, the scan jumps to ladder 11, resets your HIP, resumes to scan where it jumped from, then counts again. high_speed.zip

Share this post


Link to post
Share on other sites
I am really confused; I have never used the high speed counter. I am not sure how you set up the input to trigger a count. From what I have gathered, you set it up in the control file. I suspect that thas where you enter your input address code, but I don’t know to which parameter. Then when you want to count you trigger to go the file that that action takes place. Can someone get more into details, and possible to shoot me a sample program? Again, I want to read from 2 independent encoder (the inputs will be I:0/0 and I:0/1). I will really appreciate it, since I am stuck, and the project falls behind. Thanks

Share this post


Link to post
Share on other sites
Please don't start or post MULIT topics on the same topic. I have merged all your topics together in one. I have also supplied a SAMPLE program in your topic #3 above. Please look at it.

Share this post


Link to post
Share on other sites
MicroLogix controllers use hardware counters configured by several HSC-related instructions and interfaced with using special Function Files, HSC:x. MicroLogix 1000, 1100, and 1200 have one High Speed Counter, the MicroLogix 1500 has two. Since you need two independent counters and are using a MicroLogix 1100, the actual hardware feature, HSC-related instructions, and HSC function files are not applicable. If you want to try using the Event Input Interupt (EII) method I described above, have a look at the attached example. LEARNENG.zip

Share this post


Link to post
Share on other sites
HI KEN I wonder if you can post the program in PDF file. Thanks a lot

Share this post


Link to post
Share on other sites
Sence Ken is no longer viewing the site (see post below) http://forums.mrplc.com/index.php?showtopic=13516 Here is the PDF version LEARNENG.pdf

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