Neilh (Customer) asked a question.

Micro 850 Program to Click Program Issues

I have a micro 850 PLC program that i wrote that takes a 4-20mA signal and captures the value. If it see's a change of more that .25 mA it starts a 10 second timer that then runs and if the .25 or more value has stayed for 10 seconds or longer it than puts the new value in a field and sends the output signal to operate a relay. The current Click program i have sends my signal after the .25 is meet and TON stays on. I need the program in click to work the same way my Allen Bradly one is working. I have attached screen shots of my current programs.


  • OkiePC (Customer)

    Your description of the requirements of the program are not clear enough. And the program screenshots don't appear to match the description. When you say if it "see's a change of more that .25 mA", do you mean on subsequent PLC scans? or within a period of time? Can you paint a bigger picture of what you are trying to do?

  • Neilh (Customer)

    I have a laser sensor that is reading a product height. When the product has a high level the PLC needs to send a signal to the device on the output after the high is there for 10 seconds. Then reset to the new value. The .25mA is saying when it detects a 6mm or more change in product height it will insure the value of .25mA or more holds for 10 seconds before activating the output. Once the output is activated then the output needs to de energize and start reading the new value. And again, if the laser detects a .25mA or more change in height at new value after 10 seconds it will send an output signal. This can work at a .25mA + or .25mA minus. .25mA equals around 1/4 inch of product that causes issues on our ovens when a defect high or low goes into it. This program just opens the oven to keep it from getting damaged.

    Expand Post
  • OkiePC (Customer)

    Why are we using mm, inches and mA for units of measure for the same process variable?

    I'd suggest using engineering units of your choice for all of it. Scale your sensor value at the card as mA (my preference, the choice is yours) then scale it again into engineering units (mm or meters?) in a ladder logic Math block. Then make all the other logic and setpoints in the same engineering units. This will make it easier to follow.

     

    Your click program is copying the sensor value into the compare location unconditionally. I think you only want to do that at certain points in your process. I am not clear on when initially you want to set that threshhold value, but leaving that aside, I will assume you will preset it to a starting point.

     

    Then you only (I think) will want to let the PLC modify that threshhold after your ten seconds delay after the sustained change in height. You don't explain very well the conditions for when to turn off the Y1 output, so is there a minimum time? Your description says "Once the output is activated then the output needs to de energize and start reading the new value", but if you immediately adjust your threshold, the compare will go false and the timer will reset, then your output will only be on for a very brief (1 scan) period of time.

     

    Then, your last few words starts to paint the bigger picture for me, but not quite enough to fill in more blanks.

     

    I am going to assume that output needs to stay on for a minimum time period. My attached example using a millisecond timebase set to a literal value 1000 so the output will be on for one second.

     

    So your logic would look more like the attached example. The example is incomplete, I am sure, but hopefully helpful to you.

    Expand Post
    • Neilh (Customer)

      Thanks it works as intended but I'm having an issue with my laser which is 4-20mA Wengler opt2011 the signal is jumping in the program so much its enabled when the actual distance of the laser has not moved. it is jumping from 50 on DF1 to 64 on DF1. Is this a known issue with the CLICK plc? The laser holds a 4-20 on my Allen Bradley fine so I have eliminated the laser being the issue. I have attached pictures. This is an issue cause I'm needing the oven to open at 6mm height different and the "noise" is seeing that without any high item.

      Expand Post
      • Capture
  • OkiePC (Customer)

    50 t o 64 what? I am going to assume you meant it is jumping 14mm, How is it wired? How is the sensor cable routed? Is it shielded? If so, how is the shield drained?

     

    I have used a lot of Click analog modules, but haven't seen performance issues with them. All of my uses have been in low noise environments though.

  • Neilh (Customer)

    50mm to 64mm. The cable I am using is off of automation direct. CD12L-0B-020-A0. This is being tested on a computer desk with no noise around the devices. I have hooked a 4-20mA generator into the PLC AD2I and it is still doing the same thing the mA signal is jumping around in CLICK software even though my generator is putting out a solid 5mA signal.

  • OkiePC (Customer)

    In that scenario, I would be inclined to look closely at the 24vdc power supply being used, check for AC ripple, ensure that the PLC power is grounded, and if the DC power supply has a ground terminal, that it is also grounded well.

  • Neilh (Customer)

    Thanks, I tried all this DC I switched out DC power supplies but still same thing. I will try to put a 1- 100 uF capacitor on the input signal to see. If this does not fix I guess it back to Allen Bradly Micro Series.

  • OkiePC (Customer)

    You could try a software first order filter. It's easier to adjust than a physical capacitor to get the fastest response. I use them a lot with my water/wastewater controls. I omitted that detail from my example so as not to create a distraction. Here's a screenshot from one of my uses. I also have a Data View with all the related values where I will adjust the filter constant to get the optimal noise suppression versus response time:

    first order filter 

    Expand Post