You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 12th, 2023, 01:50 PM   #16
Aljubovic
Member
United States

Aljubovic is offline
 
Join Date: Jan 2023
Location: Louisville, Ky
Posts: 58
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.
  Reply With Quote
Old January 12th, 2023, 02:01 PM   #17
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,659
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.
  Reply With Quote
Old January 12th, 2023, 02:03 PM   #18
Aljubovic
Member
United States

Aljubovic is offline
 
Join Date: Jan 2023
Location: Louisville, Ky
Posts: 58
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
  Reply With Quote
Old January 12th, 2023, 02:14 PM   #19
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 11,431
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.
__________________
You've been taken, but you don't know it yet.
  Reply With Quote
Old January 12th, 2023, 02:33 PM   #20
Aljubovic
Member
United States

Aljubovic is offline
 
Join Date: Jan 2023
Location: Louisville, Ky
Posts: 58
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.
  Reply With Quote
Old January 12th, 2023, 03:37 PM   #21
OkiePC
Lifetime Supporting Member
United States

OkiePC is offline
 
OkiePC's Avatar
 
Join Date: Mar 2005
Location: ENE of Nowhere Oklahoma
Posts: 11,431
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've been taken, but you don't know it yet.
  Reply With Quote
Old January 12th, 2023, 03:54 PM   #22
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,659
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.
  Reply With Quote
Old January 12th, 2023, 04:03 PM   #23
Aljubovic
Member
United States

Aljubovic is offline
 
Join Date: Jan 2023
Location: Louisville, Ky
Posts: 58
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.
  Reply With Quote
Old January 12th, 2023, 04:15 PM   #24
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,659
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.
  Reply With Quote
Old January 12th, 2023, 04:49 PM   #25
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,147
@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.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old January 12th, 2023, 05:10 PM   #26
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,147
Quote:
Originally Posted by Aljubovic View Post
...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?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old January 12th, 2023, 08:20 PM   #27
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 6,147
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.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (∞).
vi) Hakuna matata.
  Reply With Quote
Old January 13th, 2023, 06:48 AM   #28
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,659
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.
Attached Images
File Type: png HMI 1.png (117.9 KB, 8 views)
File Type: png HMI2.png (125.9 KB, 6 views)
Attached Files
File Type: pdf Pressure Test.pdf (103.9 KB, 9 views)
  Reply With Quote
Old January 13th, 2023, 07:33 AM   #29
Aljubovic
Member
United States

Aljubovic is offline
 
Join Date: Jan 2023
Location: Louisville, Ky
Posts: 58
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
  Reply With Quote
Old January 13th, 2023, 07:43 AM   #30
parky
Member
United Kingdom

parky is offline
 
parky's Avatar
 
Join Date: Oct 2004
Location: Midlands
Posts: 4,659
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
plc program omron errors ngoclan LIVE PLC Questions And Answers 0 October 14th, 2014 07:03 AM
Plc suggestion aec LIVE PLC Questions And Answers 36 January 2nd, 2012 02:56 AM
Mitsubishi GX Developer - uploading/downloading program from PLC mkac LIVE PLC Questions And Answers 7 June 17th, 2010 06:31 AM
SLC 500 Ethernet Setup JSPLC LIVE PLC Questions And Answers 3 June 1st, 2010 06:15 PM
Simulator, Simulation, Shadow Code Terry Woods LIVE PLC Questions And Answers 1 January 2nd, 2005 03:40 PM


All times are GMT -4. The time now is 03:45 AM.


.