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

Aljubovic

Member
Join Date
Jan 2023
Location
Louisville, Ky
Posts
88
I will be designing an automated hydrostatic system. The system on paper works like this, a plc like the click will get information from an hmi, this information is a pressure and time. I want the PLC to be connected to an electric to pneumatic transducer that will slowly start pumping the pump. There will be a pressure transmitter in the system that will keep monitoring the pressure, and once the desired pressure is met (the one that was input into the hmi) the timer will start counting down (time that was input into hmi), once this timer is over the hydrostatic test is done and the system will start to release pressure using a solenoid valve. There will be other safety features that I will implement too like manual relief valves and more. Will this be possible on a click PLC or should I look into other options? I am very new to ladder programming and also PLC devices, so this project will probably take me a few months to a year to complete, and I have many more questions. I want to try and simulate this on a program or to find one that uses pumps and transducers. If anyone has any tips and information for what videos to watch or what to read for me to learn about this quick that would be amazing. Right now I am going through the free tutorial on this website and next I will watch some of ACC Automation videos. If anyone could recommend me a video of someone controlling a pump with a PLC that would be great.
 
The generic answer is yes, the Click can do that. The Click supports analog I/O quite nicely and has a PID controller that works well, but that might not apply if you are pressurizing a closed vessel.
 
In a word yes, however, as you need analog input & output you need to choose the correct processor, the very simple basic types do not have analog as standard but you can add analog cards. the others do, many HMI's should be able to talk to the Klick but it would probably be better to use the ones they sell i.e. the CMore, however, never used them so perhaps others here will have a better idea.
Things to think of
Type of analog inputs/outputs i.e. 0-20ma, 4-20ma, 0-10v etc. it is important that the sensors and perhaps I/P converter if used and the analog input/outputs of the plc are capable to drive the feed valve so if for example the sensor and I/P converter are 4-20ma then the analogs must be capable of either be the same standard or at least configurable to match.
Think about the communications the basic unit does not have Ethernet so may be difficult to go on-line as well as the HMI connected unless the HMI has passthrough so a little research is required to select the important things like communication between HMI & PLC & to go on-line at the same time
 
I would also say yes. I have used click PLC and Cmore HMI's The software for the click takes a bit to get used to. The weird part is when you have to draw branches, but once you get the hang of it, its not bad.
 
That's the problem. I just started to learn how to code. I am not sure how to code a transducer to control a pump.


Is the that transducer the pressure signal input, or does it the send pump speed output? to the pump as a signal (0-10V voltage, 4-20mA current, etc.)? Or is it both?



Look for one of these posts by @James McQuade. Look at each of the steps, and fill out as many as possible, and post the results here.

Also, do you want to ramp the pump speed from 0 to some value, or do you want the pump to either run at a fixed speed or be stopped? If a ramp is desired, what determines the rate of the ramp?

What should the pump be doing after the timer starts and before the solenoid valve releases the pressure?

Do you have a sense of proportion? That is, do you understand how a transducer takes a physical effect being measured, such as pressure, converts it to an electrical signal (e.g. 0-10mV or 4-20mA), and then how the PLC analog input channel takes that electrical signal as an input and converts it to a binary integer number (e.g. 0-4095 or 0-16383)? Do you understand how to convert that binary integer number to a floating point value in engineering units (e.g. kPa or PSI)? Do you understand how to go in the other direction for an analog output channel e.g. start with a desired speed of the motor as a floating point value in engineering units (e.g. rpm or radian/s), convert that to a binary integer in the range (e.g. 0-4095) so that an analog output channel would output an electrical signal (e.g. 0-10V; 4-20mA) to the speed control of the pump? Because if you do have a sense of proportion, coding the PLC will be the easy part of this project.
 
As Brian posted, first of all, find out if the click analog has the ability to do the conversion for you, for example: assume 4-20ma for a 150 psi pressure sensor and the card or in-built analog is 4-20ma (or can be configured) then the card should have some parameter settings these would be type of input , possible resolution, raw engineering values & the scaled output values, if so then you would set the relevant mode i.e. 4-20ma, raw values will have a default for example 0-4096, the scaled output can be set at anything you want if it was 150psi then depending on the type of register it will be stored in (could be an integer or a floating point) you could set it at say Min as 0 max as 10.00 (if only integer then set it at 1000 then convert it to a float & divide by 10).
This will then give you a tag in the PLC with the scaled value of the transmitter output. If there is no scaling on the analog then you will have to do it yourself
(((Scaled Max-Scaled Min)/(Max Raw Input-Min Raw Input))*(Raw Input-Min Raw Input))+Scaled Min = Scaled Value.
Or if the raw is 0-4096 then divide that by by 150 then multiply the the actual raw with the result.
i.e 4096 / 150.0 = 27.3 lets say the actual pressure is 75psi then that means the the raw value would be 2048 so 2048 / 27.3 = 75 (near as damm it).
So now you have a scaled analog value that is a true representation of the pressure, Next to turn a digital value into an analog again it is possible the card has a built in scaling, or it's just the reverse of the above, it depends on what you need to do to control a pump for example turn it on (or off) at pre-set pressures or control it's speed to a particular pressure, on/off is just comparing the scaled value with setpoints on say an HMI. The pump I assume will be controlled by a VFD so you could just use the ramp up time, however, if you need to ramp up the pump then control the pressure for a time at the pre-set then you will need a PID function in the PLC.
 
I won't be using a motor pump. I will be using a current to pneumatic transducer connected to an air driven pump. Someone told me that by just using this I could control the pump. So, I will have to do those conversions for the hmu, when someone types in say 500 psi I have to convert that into the analog value on the PLC to give current to the pressure transducer. I will also have to do conversions for the pressure transmitter because the input will be in analog, and for the input of the pressure switch. I am not 100% sure how a current to pneumatic mechanically works when you give it an input. Say I give the max current of 20mA to the transducer, if the transducers max psig is 150, will that push 150 psi of pneumatic air into the pump, and the pump will do the rest of the work? Or do I have to keep turning the transducer on and off multiple times untill my desired pressure is met. I am not sure how this transducer controls the pump mechanically when you give it a current. Does the pump need to be connected to anything else other than the transducer and the system? It's just an air pump so there are no wires, so I think the transducer will work.
 
I understand most of what you said. This whole week I was studying and taking notes on a basic PLC course which told me how to convert all of the numbers to binary, float, octa, hexa, etc. I understand the transducer takes a current 4-20mA and converts it to a pressure we can calculate that easily. 4-mA would be 0 psig and 20mA would be the max pressure the transducer can produce. My problem comes to the mechanical side of how it works and also the programming side. I took a class and understand all the basic functions like loadbar, coils, timers, counters, etc but I just don't see how I would even start this program. It would start from the hmi, a interger will be sent say 200 psi and it will be stored in a data memory slot. Then the PLC program will use that slot for converting it to analog and sending instructions to the transducer to start the pump. Not sure how I can do that in a program with what I learned. I will take your advice and answer all those questions on that post. I will post the results here when I am done.
 
Think about and write down the machine sequence of operations when it is running in automatic.

Think about whether you will have more than one mode of operation (Hand, Auto, Off).

Think about what to do if anything might everything that will go wrong. For example, you are calling for pressure, but after x seconds, the pressure is still below y psi. What should happen next?

Assuming you use analog current inputs, what should happen if one of your 4 to 20mA analog inputs is out of range?
 
Pneumatic pumps are notorius for stalling at low pressure (unless there are better ones out now) so I believe that controlling effectively will be a challenge, I have never seen a pneumatic pump that can effectively be controlled by a varying air pressure but then I am willing to be advised differently.

The control logic is pretty simple but more information is needed for example, will you be pumping to a pressure then relying on the feedback of pressure to maintain that continuously, or is it to get to pressure, stop the pump & time out to see if it holds the pressure, there is a big difference in how it would work.
 
Okay I wrote it down. I will make questions after and also you can criticize. This is how it will work, not sure if it can be done or how it's done in the programming side.

1. Operator types into hmi the pressure wanted and time the testt will last.
2. The PLC takes this data through serial port and puts it in a specific memory slot, let's say Dm100 and Dm101
3. The PLC converts the integer put into Dm100 (which is the pressure) into an analog value. Say the pressure put was 200 psi.
4. The PLC gets ready to pump the system, it send a analog current to the pressure switch which sets the switch at the desired pressure of 200 psi.
The PLC then send a analog signal to the current to pneumatic transducer to start pumping air into the pump and into the system.
6. As this is happening, the PLC is constantly checking the pressure transmitter and converting it's analog signal to a readable psi pressure, this is then displayed and constantly updated on the hmi screen.
7.Once the PLC detects the pressure has been met, (there will be a input from the pressure switch, and the pressure transmitter will be outputting an analog value that will equal 200 psi if converted) the PLC will stop the transducer and the pump, and start the timer for the pressure test.
8. If all goes well and the pressure does not increase or decrease from 200 psi, and the timer runs down it will either display a message on the hmi saying "pressure test done, please release the pressure manually" or it will send a command to the solenoid valve which will open and release all the pressure from system automatically.
9. Test is done and the program ends, waiting on standby for the next hmi inputs.

There will be off mode (standby waiting for input) and auto mode.

If the pressure does not reach the amount wanted then the current to the pneumatic transducer will get a signal to increase pressure (20 mA) and the pressure transmitter will tell the PLC when to stop.
 
Right, first of all are you sure you can get a pressure switch that you send an analog value to for setting a switch point ?.
There should be no need, you are reading the pressure so you just run the pump until the pressure transducer gives you the value you want then you stop the pump done this many times, however, if you are controlling a pump with an analog signal then it is possible to reduce the pump output slightly so you do not overshoot the set point pressure however, there is another way, assume when you stop the pump the time it takes the pump to stop makes it overshoot too much then you could have another setting that is say 2-3 psi below the setpoint required so the pump actually stops 2-3 psi before the actual setpoint relying on the pump delay to bring the pressure up is there any give in the say 200 psi, for example, would it matter if it overshoots by a psi or 2 ?. It also sounds like you need some sort of PID, however, a variable speed air driven pump is not likely to actually pump at low pressure, so a PID loop does the following: when enabled, as the pressure is low, the PID ramps up the output towards 100%, then as it gets closer to the setpoint it starts to ramp the output down (a little more complicated than that though as it can have other calculations that sort of measure the time it takes to change & either raises or lowers the rate of change hence proportional integral & differential Not going into that or DRBIt will flood this post with a hundred plus posts).
So If you use a PID I suspect that you will have to limit the lower range of the output (instead of 0% perhaps 20% so the pump keeps running.
 
Last edited:

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