Announcement

Collapse
No announcement yet.

HELP - Click PLC Analog input to Analog output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • HELP - Click PLC Analog input to Analog output

    Hello, I am incredibly new to the world of PLC's and have ran into issues beginning my first project.

    Goal: My goal is to take the 4-20mA input from a MJK pH probe (Model 203106), scale it, and output this to an air diaphragm pump controller. The pump controller works linearly with the input of the pH probe. For example, a higher pH would correlate to a faster pump speed, which would then decrease as the pH decreased to the lower limit. Once the pH reaches the lower limit, the pump stops. This system works well as it is, my problem is listed below.

    Problem: My pump controller limits the lower limit (pump shutoff) to 10mA, which equates to a pH of about 5. I would like the pump to shut off at a pH of 9, which equal about 14.5 mA. Currently, there is no way to raise the shutoff point above 10mA to 14.5mA, and the manufacturer has proven to be no help.

    My Solution: My solution is to use my Click C0-02DR-D PLC to scale the 4-20mA input. Basically, I would like to take the input value from the pH probe and equate a 14.5mA input to the PLC and output that as 10mA to my pump controller.

    I am confused by the ladder logic/coding of this. I am able to complete the physical wiring of the PLC and sensor into my system.

    I am in no way certain that this is even possible. If anyone knows of another way to easily accomplish this, feel free to drop those suggestions as well. One idea I had, that isn't ideal, is to recalibrate the pH probe to meet my needs.

    Thank you all in advance for any help. I appreciate it!


  • #2
    Instead of trying to skew your values from input to output, you could instead write some ladder code that says:

    copy "DF1" to "DF3" (assuming you are using default memory locations)
    if input memory location is equal to or less than 9 pH, then do a second copy of "0" to the "DF3"

    That will always copy the values directly until you hit whatever digital count/pH you want, then will override the copying of the analog signal and instead just write a 0 to the output which will turn your pump off. The whole thing would be done in only 2 lines of code.


    Your sensor says it has a 4-20ma output that is equal to 0-14pH. So your input scaling on the Click setup should be 0-14 as well. Then the value you are comparing against in memory location DF1 would just be whatever pH you want your pump to shut off at.





    Click image for larger version

Name:	ClickPLC.png
Views:	80
Size:	76.8 KB
ID:	126751
    Last edited by MikeN; 11-25-2019, 05:55 PM.

    Comment



    • #3
      Originally posted by MikeN View Post
      Instead of trying to skew your values from input to output, you could instead write some ladder code that says:

      copy "DF1" to "DF3" (assuming you are using default memory locations)
      if input memory location is equal to or less than 9 pH, then do a second copy of "0" to the "DF3"

      That will always copy the values directly until you hit whatever digital count/pH you want, then will override the copying of the analog signal and instead just write a 0 to the output which will turn your pump off. The whole thing would be done in only 2 lines of code.


      Your sensor says it has a 4-20ma output that is equal to 0-14pH. So your input scaling on the Click setup should be 0-14 as well. Then the value you are comparing against in memory location DF1 would just be whatever pH you want your pump to shut off at.





      Click image for larger version

Name:	ClickPLC.png
Views:	80
Size:	76.8 KB
ID:	126751
      This is perfect! Thank you so much for your help, Mike!

      Comment



      • #4
        Originally posted by jwarner View Post

        This is perfect! Thank you so much for your help, Mike!
        If your pump flutters on and off near the low point, you can also write up some logic with a timer that says once the pump turns off, stay off for a minimum time before allowing the pump to turn back on. This can be something like 5-10 seconds maybe, depends on your application, but it would help keep the pump from bouncing around trying to start and stop a bunch if your machine is staying really close to that "off point".


        Click image for larger version

Name:	ClickTimer.png
Views:	26
Size:	19.6 KB
ID:	126818

        Last edited by MikeN; 11-27-2019, 04:41 PM.

        Comment

        Working...
        X