Sign in to follow this  
Followers 0
mos89

ML1100 interrupt (EII) performance

14 posts in this topic

Hi I would like to know what is the performance of the interruption task of the ML1100 i would like to use 2 interrupt input to count flowmeter pulses and do a special process in the main task depending of the size of the flowmeter( 0.07 cc/pulse) and the flow rate ( few cc to 10 liters), i do not know if the ML1100 can handle it ? thanks

Share this post


Link to post
Share on other sites
They are theoretically capable of counting up to 40kHz which should be much higher than any flow meter would require.

Share this post


Link to post
Share on other sites
The standard method is to configure the EII to trigger an interrupt when a specific number of counts have elapsed, then use the Routine that is triggered by the EII to calculate the elapsed time, and therfore the flow rate. The fast input circuitry for Inputs 0, 1, 2, 3 can handle, as mentioned, pulses as fast as 40 kHz. You obviously cannot trigger an EII on every single pulse because typical controller routine scan times are in the 1 to 5 millisecond range. Your post left out the crucial measurement of time. Is the flow rate "a few cc to 10 liters" per second, per minute, or per hour ? If your unit of time is seconds, that's 0.07 cc/pulse at 10,000 cc/second. That's about 143 kHz, which is too fast for the MicroLogix 1100 high-speed counters. If your unit of time is minutes, that's 0.07 cc/pulse at 10,000 cc / 60 seconds. That's about 2381 Hz, which is well within the capability of the MicroLogix 1100 high-speed counters. The other factor you need to consider is how often you want to calculate the flow. Many applications do this at 1 second intervals a the midrange of the flow range, but your needs may be faster or slower. The speed of update will vary with the speed of flow, if you use the EII method. If you use the STI and a High Speed Counter, the speed of the update will be constant.

Share this post


Link to post
Share on other sites
Thanks for the explanation my time unit is minute i had some watchdog overflow problem, maybe due to my routine on each interrupt i count (addition instruction and a few othe instructions)

Share this post


Link to post
Share on other sites
What do you have in your EII routine? I usually have a single add instruction to increment a flow counter then I do the calculations in a regular routine.

Share this post


Link to post
Share on other sites
I strongly recommend using the EII feature to do your counting, rather than counting every single pulse with an interrupt. For example, if you are running at 1 liter per minute, that's (1000 / 0.07 cc) / 60 = 238 Hz, so the EII would have to run every 4.2 milliseconds. Because these interrupts take precedence over the ordinary operation of the Micrologix controller, this could cause a watchdog fault. If you set the EII pulse count parameter to 100, then the same 1 liter per minute will interrupt the controller only 2.38 times per second, running the EII routine every 420 milliseconds. You would get an update on the flow rate more than twice per second, yet the controller would have 100x as much time to run the ordinary program. What is the second function that you want to execute rapidly in this system ? You mentioned two inputs, and we know one of them is a flowmeter pulse.

Share this post


Link to post
Share on other sites
the other function executed is an immediate update of 2 output, because i use the counting for mixing material

Share this post


Link to post
Share on other sites
To help me understand, what are the two Input sensors you are using ? To address your output trigger, we need to calculate what the minimum,resolution is for material volume. Your flowmeter will give 1 pulse for 0.07 cc, but how many cc's of error can you have in the amount of material transferred ?

Share this post


Link to post
Share on other sites
i need to guarantee a ratio tolerance of 1% between to component A and B ratio B/A goes from 1% to more than 50%

Share this post


Link to post
Share on other sites
Forgive me if I seem to be asking a lot of questions. An engineer needs to understand the process before he can program a controller to perform it. I understand now that there are two flowmeters, for Component A and Component B. You have expressed the a tolerance of ratios. Let's discuss it as though we were adding a stream of cream to a stream of coffee. At a desired 1:10 ratio of cream:coffee, does this 1% mean that you can tolerate between 0.99 and 1.01 parts cream to 10 parts coffee ? It might help to think of one of the components as the "coffee", so it's the "main component". It will also help to define what the low and high boundaries are for the various factors in this system. You said the low flow limit is "a few cc's"... how many is "a few" ? And you said that the B/A ratio goes to "more than 50%"; how much more ? If you can describe your final control elements (flow controls ? Dosing pumps ? Steins and pitchers ?" that might help down the road as well when you're designing the control loop.

Share this post


Link to post
Share on other sites
:facepalm: I was thinking about the DII, in the modular SLC-500. That has an Accumulator word, which allows it to trigger only every so many counts. The EII in the MicroLogix works as you understand it; it fires every time the input changes state. For this flowmeter application you'll want to use the High Speed Counter (HSC) feature, but the MicroLogix 1100 only has one. The MicroLogix 1400 has four. I apologize for leading you down the wrong path. I'll check my assumptions, next time.

Share this post


Link to post
Share on other sites
Just to add to Ken's request for information. What is pumping the coffee and cream? Are they a metering pump that feeds X amount per pulse or just general motors or air pump or...

Share this post


Link to post
Share on other sites
Hi Guys Thanks for the help the feeding is done by external material out of my control i think standart pump air motor ratio of 1:10 means tolerance of 0.99 and 1.01 you are right the lower limit of the system is about 50cc to 2 liters the final system is a dosing machine which contol some valve to open or close pipe to regulate the ratio

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