Again and again. How to start?

Alex Pel,

I think you are almost ready for the next step, which is to get your hands on a PLC Programming software package. The best is to have a PLC sitting next to your computer, so that you can write a program, download it, and then run it on the PLC. However, if you don't have a PLC available, I recommend that you consider a programming package with an "Emulate" mode. This is a program which allows your computer to simulate a PLC. In this way, you can not only write PLC programs, but you can run them and see if your code works as expected. Many brands now have Emulators. ProLogix is a good one for the Allen-Bradly RSLogix500 programming software. There is als0 RSEmulate available directly from Rockwell Software. Omron has some PLC/Emulator 30-day free trial software also.
 
My first code

I've got RSLogix 500 and I am going to borrow a ML 1000 pretty soon. Unfortunately it will be without analog. But anyway it will be better then nothing.
As far as I understand, my flowchart is useless. Allen Nelson gave me a clue how to start writing a ladder. But I am still not sure. Am I on the right direction? Because I still don’t have any real life example.

To refresh my learning project what is about:

A 2 miters wet well continuously filled by waste water.
Than water rising:
At the 0.6 m – start the Mixer.
At the 0.8 m – start FIRST PUMP
At the 1.2 m – start SECOND PUMP
At the 1.4 m – HIGH LEVEL ALARM, PLC FAILURE MODE
Than water goes down:
At the 0.5 m – stop the MIXER
At the 0.3 m – stop both Pumps

In attachment there are ladder and wiring. I understand it is not ready for real implementation. I think the motor start should be more sophisticated than just one bit control. Also, I still need pumps alternation. Also, I have no idea how to send a message to the city department. What hardware to give a call?
Any comments highly appreciated.
Thanks for consideration.
 
Since you are going to practice with a non-analog ML1000, you could run your process based on level switches.
Assume you have a level switch at each of the levels. Based on your previous post you would need a total of six switches, Plus these will be easy to simulate in the ML1000.

I took a quick look at your logic, and I don't believe it will work as you expect. However, since this is a learning experience, I don't want to give you to much help in the beginning.
Once you load you logic on the ML1000, you will be able to see your logic run and then if you can't figure out any problems, repost your code.



Ken
 
Last edited:
Finally I’ve got the ML1000 and ran my logic. I was surprised, why PHASE LOST LIGHT isn’t ON after POWER MONITOR is ON. I removed rung #1, where I tried to energize shortly the fault lights by ALARM RESET button.
Rest stuff looks like Ok. Isn’t it?
The next, I am going to figure out how can I call to city? I don’t know any device to work for and how to program it?
Also, I would alter the pumps.
And I still assume, that my logic far from the real one, so any suggestions are highly appreciated.
 
Alex Pel,

To make a call to the city, you need a simple electronic device called a Telephone Dialer, about $150 US. These can be pre-programmed with different recorded messages. There is a list of numbers that the Dialer calls in order, either until someone answers, or it completes the entire list. Using input switches on the Telephone Dialer, the PLC decides, based on your logic, which input and which message to play. Dialers come with different numbers of inputs and varying other functions.
 
Alex,

I agree with Lancie1, the auto dialers are good if you have a phone line at the pump station. I've seen them a cheap as $50.00, I think they were at MCM Electronics.


Are all your level sensors normally open?
 
Thanks Lancie1 and Martin T.
I understood about telephone dealer. All I need to do, it just set the discreet output to start the dealer with a pre-programmed message. Or something like this, depend on the particular device.


/ Are all your level sensors normally open?/

Yes. I am going to use a level switches that are NO when water level below and they became closed when water has reached specified switch.
 
Alex Pel said:
/ Are all your level sensors normally open?/

Yes. I am going to use a level switches that are NO when water level below and they became closed when water has reached specified switch.

I'm sure Martin asked this because, when you implement this in the 'real world', you have to consider failure modes.

Think about this question:
"If the wire to the 1.4m sensor breaks, becomes disconnected, etc., what can happen?...
17.gif


beerchug

-Eric
 
Thanks Eric and Martin, I have replaced the 1.4m sensor with NC contacts.
In normal condition it closed when water below 1.4 m, T1 energized and opens its NC TC contacts. When water has reached 1.4 m or wire has broken, T1 de energized and after certain time it closes its contacts and PLC FAILURE MODE activated.
Also in my ladder logic, I have replaced XIC with XIO of my HIGH LEVEL instruction in rung 0.
Also I added the TD (Telephone Dialer) in rung 1.
And also I added the PUMP ALTERNATION in rungs 4, 8 and 9.
I didn’t find any error by running on my ML1000.
I still have unused inputs AUTO and RUN. No idea, what are those for?
 
I would guess that if you have inputs for Auto and run, that the pump can be started when the level is not high enough via a pushbutton, and the run input is feedback? Just a guess.

I've attached a program that show's the way I generally do discrete device control. I don't know if it is applicable to your application, but you can look at it and decide. It's not the most efficienct way of doing things, ( it uses one extra word of memory per device) but it has worked for me. By using the N7:0 word mapping, you can latter add an HMI or SCADA and use the value of the whole word to determine screen colors. I always use this method, so that even if a HMI isn't used, it can be added later without much hassle.
If this was something other than a ML1000, I would have created an "N" file just for devices, such as N17 or N27.

This is just one way of doing a thing, all the extra code would not be required if you did not have device feedback.


Ken
 
Alex Pel said:
Hi, All!
Great forum, I enjoy reading for almost one year.
I am an electrician, PLC panel builder. Also I participate in start-up of water/wastewater projects by setting VFDs and instruments, and I do as-built drawings.
The next step in my professional growth I consider as a PLC programming. Unfortunately our company doesn’t do this job. We receive already designed projects and that engineers do the programming too. Sometimes I even didn’t see the programmer who uploads the code on-line. I would like to say my boss: - “I can program the PLC. Include RSLogix 500, RSLinx and programming time in your next bid” but I am not ready yet.
AB instructions are not problems for me, but as someone mentioned here: - “The problem is – to bring all of them together”. I understand how everything works in our projects, theoretically I can design and write the program but I have never seen any real world program. I suspect there are lots of details like: safety, reliability, etc.
So, Ladies and Gentlemen all I need to start, as I think, is a real world water or wastewater project to learn. I have RSLogix 500 Starter 10pt but very soon I am going to get the real RSLogix 500. I will be highly appreciative for any suggestion. Thank you very much All.

Sounds like you work at a panel build only shop. It can be hard to step up to the programming phase if its not done at your work (at all).

This may be a little extreme, but have you considering looking for employment at a shop that does design and build? Say, like a local machine builder or similar? Some place that supplys turnkey projects. Your resume and interview could emphasis the fact that you are persuing the programming of PLCs and desire some programming exposure.

just a thought FWIW.
 
Thanks Ken, you spent your time to adapt your logic for my small controller.
Now I know, at least one way to use AUTO input. It is to select deferent colors in HMI:
- COLOR 1 = RUNNING IN MANUAL;
- COLOR 2 = RUNNING IN AUTO.
And I know how to use RUN input to detect a motor start fault. In my logic, if circuit breaker has disconnected, the VFD is not going to generate FAULT command and my PLC will never knows that the motor does not start.
Using the N word mapping, it is a good advice for me to gain a good habit at once.
I need more explanation how can I use it in my particular application. We can be free to modification. On my wiring I have:
- I:0/10 PUMP#1 AUTO from H O A selector switch;
- I:0/11 PUMP#1 RUN from VFD;
- I:0/12 PUMP#1 FAULT from VFD.
I have to load my inputs:

1. I:0/10 (PUMP#1 AUTO) >>> N7:0/0 (PUMP 1 IN AUTO)

2. ? >>> N7:0/1 (PUMP 1 AUTO RUN)

3. ? >>> N7:0/2 (PUMP 1 MANUAL RUN)

4. I:0/12 (PUMP#1 FAULT) >>> N7:0/3 (PUMP 1 FAULTED)
- but I’m afraid you think another as assigned this bit in rung 0003.

5. ? >>> N7:0/4 (PUMP 1 INTERLOCK)
- should I use O/L contacts and add PLC inputs or may be it is my I:0/12 PUMP#1 FAULT? The VFD provides integrated FAULT: - O/L or over current or phase lost or etc.

6. . ? >>> N7:0/5 (PUMP 1 DISABLED)
- I guess it is an auxiliary contact block from the circuit breaker that protects the VFD?

7. And finally, I guess I have to load my NC contacts of ALARM RESET push button to FAULT ACKNOWLEDGE?
I:0/00 (ALARM RESET) >>> B3:0/0 (PUMP 1 FAULT ACKNOWLEDGE)


I am not sure what does it mean, the branch of rung 0002:

PUMP 1 OUTPUT PUMP 1 RUNNING
O:0/0 I:0/0
------------]/[------------------------------[ ]----------

No OUTPUT command and motor still running, it is look like a fault detection in case the motor never stop?

One more question about programming style. How professionals use a subroutine? Is it possible to use one subroutine, for example DEVICE to serve several motors by sending different parameters?
 
Re: Re: Again and again. How to start?

/Sounds like you work at a panel build only shop. It can be hard to step up to the programming phase if its not done at your work (at all)./

jstolaruk, not at all but 90% of my working time I spend far away from PLC programming. Only during commissioning I am working close with programmer. I help him to check I/O.
In Vancouver not to much industry, and engineers are separate from contractors. Engineers basically contact to my electrical supervisor who doesn’t need any PLC programming.
 
Alex,

I believe Ken just posted the logic to show you how he goes about programming discreate I/O's. Looking at it it's just a general way he programs to allow for connections to a HMI later. Correct if I'm wrong Ken.

For your VFD loose of power, does it have a extra set of contacts(most I've worked with do)??

Maybe I'll have time to post more later. Got to get my kid ready for bed.
 
Correct Martin T.
I was just showing my way of doing things.

Alex,
I did not mean that you should use the same methodology. Just something to look at. It does show some of the things you MIGHT want to consider when controlling discrete devices. Feedback, interlocks, etc....
Only you can decide what is needed in your applicaiton. Does it matter if the pump does't start? Will a pump ever be run outside of your "normal" logic? Is there a way to take a pump "off line" for maintenance?
Just a few questions to think about.

Another topic:
You have several nested rungs all branching from I:0/0. If you were to redo it and use the I:0/0 for new rungs instead. You could then comment ALL you rungs. I noticed you do not have any rung comments. You should comment every rung with the assumption that someone else that is less knowledgeable than yourself will be able to understand your logic. In my opinion comments in ladder logic are just like cash, can't have to much.
I think program documentation is one of the things most beginners overlook. When you're in the middle of your project, you know exactly what everything is supposed to do, and don't need the comments. But, months or years down the road you come back to the project and you scratch your head and wonder "What the heck was I doing". Yes it has happened to me, I've looked a code I wrote a few years ago and had a hard time following my own code. I have to work on several systems that have had several owners over the years, most didn't document the code they changed. As a knee jerk response, I probably over document now, (if that's possible).

Just my 2 cents worth.
 
Last edited:

Similar Topics

When I connect to the site PLCS.NET is checking to see if the connection is secure. I click on a topic and it does it again. Click back and it...
Replies
20
Views
1,270
This old chestnut again... Our clocks (UK) went back an hour yesterday. Now the time displayed on the HMI is 1hr behind what it should be. In...
Replies
24
Views
2,026
My Lenovo P50 has served me well. it is still working, but I want to get something newer before I can no longer get a laptop w/ windows 10. I was...
Replies
23
Views
6,681
Wizards, I have been gone from my plant for a while and upon returning I have two, 480vac-24vdc power supplies on my desk with DEAD written on...
Replies
4
Views
2,274
Hey Folks. I'm having a little issue with a Kinetix350. Long story short. I have burned 2 2097-V34PR5-LM in the past few months on the same...
Replies
6
Views
2,767
Back
Top Bottom