Is it possible to program this onto a Click PLC? If so, I need help anyway.

I thought the pressure switch works like this. You set it at a certain pressure and when it reaches that pressure it will send a basic signal notifying that it reached the pressure. I will use the pressure transmitter for getting the pressure to 200 psi. The switch will be for an overload of pressure. Say I set the switch to 205 psi, if the system goes over 200psi all the way up to 205psi the system will detect a overload and open the solenoid valve to prevent damaging other parts. The pressure needs to be exactly 200 psi so it will be a bit challenging to do this.
 
Well, you could still use the pressure sensor but that is not failsafe, so yes have an over pressure switch for safety is a good idea
I'm not aware of a pressure switch that has an analog setpoint most are just setup on buttons or a screw on the part itself, however, have been out of the game a couple of years, so it may be you have to rely on a non remote adjustable switch or just set it to the value & hope it does not change, you could also have another setpoint on the HMI which is an alarm limit should your pressure sensor goes above that limit it alarms & stops the process.
Getting to the exact pressure is probably not too difficult but that will depend on the pump, if it is a diaphram pump then you will struggle, why not use a pressure reducing valve controlled by the 4-20ma so you set the value i.e. 200 psi, open the outlet of the presure control valve and wait, it will limit the pressure to what you set it at.
 
I thought the pressure switch works like this. You set it at a certain pressure and when it reaches that pressure it will send a basic signal notifying that it reached the pressure. I will use the pressure transmitter for getting the pressure to 200 psi. The switch will be for an overload of pressure. Say I set the switch to 205 psi, if the system goes over 200psi all the way up to 205psi the system will detect a overload and open the solenoid valve to prevent damaging other parts. The pressure needs to be exactly 200 psi so it will be a bit challenging to do this
 
Parky is right about the pressure switch, you will physically set it to the value at which you want it to operate. Pressure switches are not always exactly repeatable, have a hysteresis (some movement of the pressure has to occur for it to switch back) and in your case, might be best set up hardwired to open your dump valve, although you could do that through the PLC so it "knows" that it needs to also stop supplying air. I would lean toward running the pressure switch to a relay with two contacts, one wired to the dump valve and the other to a PLC discrete input.
 
Sorry for sending the message twice, my bad. Okay all makes sense now, I understand how everything will work together and know what each thing is meant to do. Also all of the questions of should I add this here?

Now going on to start coding this I have no idea where to start, I took the online course and am now done with it. I took as many notes as I could on each page and yet, I have still no clue where to start.
I know I need to start off with the hmi, but that is another programming tool that I don't know how to use and getting that linked up into the PLCs click programming code I am overwhelmed.

How does one even send what was input into the hmi (say 200psi and 10 minutes) convert it to decimal or analog, then send it to PLC. Or send it then convert. Then on the PLC the program will need to use what was inputted into hmi for timers and also pressure.

This is a really big project given to an intern engineer that knows nothing about PLCs. I have like 4 months left here and I just started, so hopefully by month 3 I will have a good understanding of what to do and can start buying parts. I have my whole parts list set up already and know what to buy, but actually putting them together into a program is a little too far from me right now.
 
With the PLC, you'll want to configure the I/O and the communication channels first, before you do any logic programming.

With the HMI, you will tell it how to communicate with the PLC and create "tags" that are assigned to PLC addresses and it will take care of the sending and receiving as needed.

Before doing any of that, I'd recommend drawing up the electrical plan...how is everything going to be wired?
 
You don't send or recieve from HMI to PLC that is done by it's own I/O driver, all you do is select the correct driver for the PLC i.e. Klick xxx type, set the parameters (this will depend on the type of link) i.e. 232 ethernet etc.
Once this is done you drop the required fields on the screen for example the pressure set point would be an input field and then tell it the address of the plc register i.e. D20, and the type of field integer, real (or float) how many places & decimal places. same for things like buttons but these would be bits rather than registers, the type of operation etc.
When you run the HMI it will automatically send & recieve data as required.
if the PLC is connected, I had a quick look at the free software manuals, seem a little sparse, suppose you get what you pay for, perhaps others here could give you better pointers, I will try to post some code (not in click) but give you some idea how to start. I prefer using a sequence variable, this is just an integer word that you force to each stage then use compares i.e. seq.val 0 is idle nothing happening, 10 is for example start the test (close the relief valve, run the pump & check the pressure against the setpoint),
20 is up to setpoint, start the pressure test, 30 is say test complete, 40 open the relief valve, 40 test complete.
This way you can (if the HMI has text lists based on a value in a register) for example in a text field you write in the text for the value of the register i.e. 0 =IDLE 10 = Pumping to pressure, 20 = running test, 30 is test complete 40 = reset back to idle.
on the HMI you then have information of what it is doing.
First of all, in the PLC programming software set up the type of PLC, start by giving your registers/bits names, we often call the registers/bits tags so each tag will have a symbol or name easy to see then what each one does. start writing your program, when you need extra tags then just add the symbol to the tag. when you have done this you can use the tag database as your reference for the HMI coding. Try to keep tags that will be on the HMI in contiguous blocks this makes the communication more efficient.
 
How it's wired is also something I need to work on. I figure I will just watch some basic YouTube videos on PLC wiring because the stuff offered on this website did not make much sense. And also all of the symbols on the click PLC or any PLC for that matter gets me confused. The x, y, numbers and v. I will do more research tommorow on wiring and try to make a diagram. I will update you later on how it's going. Thank you parky and okie for trying to help me learn, I literally knew nothing about 2 weeks ago and now I know what needs to be done. Time to learn more and execute the hardest part. Putting it all together. I will download clicks PLC software and start coding soon. First need the wiring diagram done and to ask questions.
 
Yes different PLC's have their own specific way of addressing, for example Mitsubishi use X as input Y as output, D as registers, M as internal bits, there are others but that is the bulk of them.
so in mitsubishi although 16 bit addressing for registers the inputs are for the small PLC's X0-X7 (8 bits) X2-X27 (8 bits) the outputs are the same but use Y so a little confusing.

The larger ones use Hex 16 bit so X0-XF i.e. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Then go on to X10,11,12,13,14,15,16,17,1A,1B & so on.
There are also special bits like timing tags, in Mitsubishi the standard bits are M0 - M799 the special bits start at 8000-9999 these some are read only i.e. M800 is always on, M812 is one second clock etc., in the higher end ones these specials are numbered SM4xxx i.e. SM400 is always on, SM401 is always off, SM412 is one second clock.
Siemens use I for input, Q for output (in german that is E & A) so many different ones are out there.
I will try to post some logic that may get you started, although not Klick I will try to mane it sort of ladder as much as possible.
 
@Aljubovic:

You are new to PLCs, so a few things might be in order (this also applies to the other thread about free PLC software with simulators).

1) What is your level of programming experience? Could you execute this program, assuming any I/O issues could be resolved, on any other platform in any other language (Python, Perl, Pascal, Javascript, C, C++, C#, bash, awk/gawk, excel, Fortran, COBOL, APL, Java, etc.)?

2) If you want to go with ladder, I suggest two beginner resources:

  • This video series by @Ron Beaufort; pay particular attention to the PLC scan cycle
  • This collection of ladder patterns; from the little information provided so far, it looks like your pressurization-via-pump-and-timer application could be done with the Step pattern, which is mostly a sequence of Start/Stop Circuit patterns.
 
...The pressure needs to be exactly 200 psi so it will be a bit challenging to do this.


Please define "exactly 200 psi," because


(i) measurement is hard, and
(ii) all measurements have errors, and those errors have characteristics.


e.g. 200psi ± 0.5psi, 200psi ± 0.1psi, 200psi ± 0.001psi, 200psi -0.0/+0.3psi?
 
What is the fluid that is being pressurized to 200psi? Air? Hydraulic fluid? Water? Oil?

Is this test process one where each step has been done by hand?

Because if an operator can do it manually, then it may be possible to automate it. If it cannot be done manually, then it is unlikely it can be automated.

It sounds like the difficult part will be getting to "exactly" 200psi. It is not clear to me if that is an analog or a bang-bang controlled target.
 
Here is a modified one (was a vacuum test chamber not pressure) originally, I have just modified it, assumptions here are that there is a shut off valve to isolate the pump (we needed it as it would bleed back you may need the same)
It also has a Normally open breed vent valve (for safety as when not energised it will be closed), the operation is as follows, the HMI has all the variables required (note: the box with the settings, these should be password protected well at least the ones the operator should not touch like the fast/slow pressure etc. perhaps put them on an engineering page that has password protection).
On a start, the sequence is set from 0 to 10, this also resets the the messages (test past or test failed etc., opens the feed valve, closes the bleed valve & starts the pump at 100%, when the pressure reaches the slow changeover pressure setpoint it moves to seq 20, & changes the analog out to this SP, when it reaches the required setpoint then the pump stops, closes the feed valve, waits a few seconds to allow the pressure to stabilise then takes a snapshot of the actual pressure, it then starts the time count up from the settings i.e. 30 seconds or what ever, when the test time is complete it moves on to the next seq step. this then compares the snap shot pressure we took before the test time, subtracts a small amount (this is your tollerance for a test pass, then compares it with the actual, if greater or equal it steps on to set a pass bit to display a message on the screen, if not it sets a pass fail message bit to display on the screen. then opens the bleed valve, when the pressure is below a certain limit then the sequence is set to 0 test complete.
The pumps & valves are controlled by the seq word so it uses compares for equal to or between values to control the outputs, the first two rungs are just to convert the raw analog to meaningful values you may not need this is the cards are configurable.
Note: when comparing an analog with a setpoint with it being a float or real allways use >= or <= not just = comparisons the reason is that floating point numbers have 7 decimal places so they can jump by 0.000001 if you do a compare = with say a setpoint of 150.0 the changing analog may jump from 149.999 to 150.001, this means the PLC will want to see 150.0 it may never happen so always either use >= or <= or perhaps a range as the analog could change by more than 0.00001 or more before the analog is updated in the PLC.
The code in the attachments is not klick but I have tried to make it more like ladder than FBD, also I probably normally would make it more concise, however, put many bits of logic on different lines so it is easier to understand.
Not: I have not put in a PID as I don't think it will work very well, as you are only going to a set point pressure, there in theory should be no leaks (that's what the test is for) so it would be difficult if you got overshoot, it would not fall to the level you want. it is probably better to use just a trickle setpoint (slow mode) when you get within a few psi of the required, this will be found by trial & error.

HMI 1.png HMI2.png
 

Attachments

  • Pressure Test.pdf
    103.9 KB · Views: 12
I talked to my boss and he said it does not have to be exact. It can be +/- 50 psi and the test can still be done. So having the exact value is not a problem to worry about
 
You don't need any PID, I suspect you just need flow control I would use two valves, if you have an air supply one for full & one for trickle so perhaps a half inch bore for full, quarter inch for slow.
just limit the flow so that the pressure climbs at a rate you can cope with.
it does not matter if you use a pump or air via valves, it could be controlled better than +- 50 even down to 1 or 2 PSI.
You will never get the setpoint & result to be exactly the same unless you use integers rather than floats as I mentioned, the float has 7 decimal places even if the conversion from integer (raw) only gives a resolution of 0.001
because for each raw value of 1 will be something like 0.0042 in real.
 

Similar Topics

Hello. I have been trying to crack this one without success and could not find any hint after several search attempts. I wonder if any CODESYS...
Replies
4
Views
3,884
Hello, I'm pretty sure I know the answer to this, but wanted to verify with the experts. Am I able to write a program using the Micro Starter...
Replies
7
Views
3,134
First off, i am new to ladder logic. I do have some experience programming microcontrollers in C. I will try and give a short version and if more...
Replies
7
Views
1,973
This is a CompactLogix L33ERM, version 30 (31 is too unstable on my machine to work with), with a Kinetix 5500 drive. I have a program where...
Replies
2
Views
1,981
Good morning guys! I have a doubt. I uploaded a program from a S7-200xp on the field and took it to the office. Before doing any test I tried to...
Replies
7
Views
2,131
Back
Top Bottom