Micrologix 1500 counter help

Dorrance

Member
Join Date
Feb 2012
Location
Michigan
Posts
39
Rite now I am playing I do have a goal in mind but unsure how to get there. I have attached a Doc. Could anyone tell me why it doesn’t work. I am really confused.
 
I do have a goal in mind but unsure how to get there.
Please state your goal: a good descriptive goes a long way in writing and trouble shooting your program
on the logic side Try starting with using your timer only once
 
bce123, the last picture is just the bottom half of the second to last picture. So the timer
appears to be only used once.

As bce123 said we don't know what the program is trying to control.

You have latched some bits, you will need to unlatch them at some point.
 
It appears that Dorrance is trying to count the pulses from a prox switch, based on the settings of 6 auxiliary switches - "Silicone Project" to extrude silicone and measure the speed from 0 to 60?

It is unlikely that the elaborate rung logic is needed. Probably this program can be severely condensed into about 10 rungs of logic --- if we only knew what it is supposed to do and what is available to make it work! As usual there are absolutely no rung comments explaining how it is supposed to work.
 
Last edited:
Thanks for the great responses. To answer a little better I am trying to use a PNP prox to count a roller going around at different speeds and out put a voltage from 0 to 10 volts to control a drive. It doesn’t have to be real precise but must change with a speed change. I am new to programming and am self taught so it is challenging for me. The program I downloaded in a word doc. Is one I didn’t like and have since moved on. I wouldn’t mind sharing with you guys but I have a question first. (Maybe a couple). I sent the first Doc. with word because my company has full licensed version of almost all AB software, but it is on a laptop and the company restricts the use of the internet on it. So my question is if I load a RSS file to a flash drive and then load that here at this site will you guys be able to see it? My second question if the first one doesn’t work is what is a better way to send a diagram of the program?
Thanks for all the help.
 
So my question is if I load a RSS file to a flash drive and then load that here at this site will you guys be able to see it?

Yes, but you must zip the file first. Then post it. The forum will not accept a .RSS file but will accept a .ZIP file.
 
Thanks for the great responses. To answer a little better I am trying to use a PNP prox to count a roller going around at different speeds and out put a voltage from 0 to 10 volts to control a drive. It doesn’t have to be real precise but must change with a speed change.

So my take on this is that you want to use the prox on one line to control the speed of a drive on a second line.

Is that correct?

If that's the case, use the not condition of the prox to run a timer. When the prox gets flagged (sees metal), use the accumulated time to calculate the speed that you need the second drive to run.

Obviously the more frequently you see the prox, the faster you will want to run the second drive.

I'm not sure what all of the "Switch controlled bits" are for... Enlighten me! :)


So here's the caveman version of how I would program it:

Code:
   Line #1 running       Prox
-----] [-------+----------]/[--------------RTO Timer-------------
               |       
               |
               |         Prox
               +---------] [-------------MOV ACC to variable-----
               |
               | 
               |         Prox
               +---------] [--------------Reset RTO timer---------

Now use what is stored in "variable" to determine how fast you want the second drive to run.

You might want to average what you get in "variable" to dampen out any speed spikes.

Forgive the crude diagram, I'm all out of Internet Capable ****tail Napkins (and too lazy to drag out my work laptop to do this properly).
 
Last edited:
To answer a little better I am trying to use a PNP prox to count a roller going around at different speeds and out put a voltage from 0 to 10 volts to control a drive.
"Output a voltage from 0 to 10 volts" implies that you have a Compact I/O expansion 1769-OF2 Analog Output Module added on to your MicroLogix 1500. If so, then you should use a PID Output block to create an output that is proportional to your calculated roller RPM.

On the other hand, your "Silicone Project" program shows only digital outputs (no analog), so I have worked on that assumption, not your first statement. Here is a program that will produce 6 Preset Speed Outputs that can be used to set the speed of a VFD that has 6 predefined Preset Speed digital inputs.
 
Last edited:
Thank you to everyone that has helped me along with this project. I do have it finished and bench tested and it works great. I don’t mind if you have any questions or constructive criticism about the program, that is how I learn.
I do have a 1769-OF2 board on my PLC and that’s how I am controlling 0 to 10 volts. I am running that through a 5k 1 turn pot. For a finer adjustment so they don’t have to always go from 0 to 10 volts. That voltage is going into a SI 5 board from KB enterprise that sits on a KBIC 120 drive board which will control my 90V DC motor.
Once again I can’t thank you guys enough I couldn’t have done this without your help.
View attachment Silicone (1).pdf final.pdf
 
Congratulations on getting your project to work. I am sure that using 6 counters (instead of 1) and 36 rungs instead of 15 still leaves room for a feeling of lofty success.

To make it more efficient and logical, calculate your roller RPM by counting pulses over some short time period (3 rungs), then use LIM comparison instructions in 6 rungs (your Rungs 27 to 32, instead of the B3 bits), for a grand total of 9 easy-to-understand rungs.

An alternate is to count the pulses, calculate the RPM (3 rungs), then feed the RPM to a PID block, which calculates your drive speed setpoint and sends it to your analog output O:1.0, for a total of about 4 rungs.
 
Last edited:
Hi Lancie.
Thanks for the feed back, I have seen you on other threads I have started and you have always been a help.
With that said I hope you remember me. I am really new to programming and don’t quite understand all of the ins and outs. When I am told I should use things like LIM comparison or/and PID block I really don’t know what these are. I usually research and can figure them out but a lot of times I give up. I know that isn’t the best way to learn, but my company wants results. I tried using scale with parameters but couldn’t figure it out. I also tried to use a high speed counter and was also unsuccessful. On this program I had to learn how to use an analog output. I had never used this before; I also learned how to use integer files and MOV files. I’m not even sure I am calling things the rite name. But with all the help I have received on this site I am sure I’m on the rite track.
My point is thanks for all the help I do like learning and have time to commit. The problem I have found is someone willing to teach. I don’t make enough money to pay and support my family all at the same time. But my boss is really understanding and allows me to try but I still cant take forever.
Once again thank you.
 
Your approach, with strictly a ladder style is the long way to grandma's house if you are simply trying to rescale a rate from one measurement at an analog input to another value at an analog output.

As soon as you encounter analog values, take off your electricians cap, and put on your math hat.

In any PLC you will have access to multiply and divide commands that can get you there cleanly. If you need it stepped at 10% intervals, you can still do that with one more divide and a multiply.

So, use available user data and data types to compute these things rather than build relay panels to select them from a potentially infinite list.

Paul
 
Last edited:

Similar Topics

Hello my name is Dorrance I am very new to plc programming. I am capable to make simple programs like inputs that trigger outputs but never worked...
Replies
11
Views
3,830
Hi, does any one know how to activate the high speed counter on micrologix 1500 serie B. Tnks for your knoledge
Replies
2
Views
5,154
Hello, I am running a Micrologic 1500PLC (has 2 high speed counters) and I am using the HSC1 function. How do I specify which input (4-7) to use...
Replies
2
Views
6,027
I need to calculate the rpm of an object that has an encoder on the the shaft and will interface with the 1500. What is a good formula? And also...
Replies
5
Views
6,536
I had a fellow programmer call me the other day with a problem he was having on an AB Micrologix 1500. He had just written the code and had a...
Replies
8
Views
8,447
Back
Top Bottom