- Interactive Q & A - Interactive Q & A (
-   LIVE PLC Questions And Answers (
-   -   4-20mA Output scaling (

Willlly February 9th, 2018 02:18 PM

4-20mA Output scaling
Hey guys, I have been having a bit of trouble with analog output scaling.
Iím programming out of a compactlogix, Iím trying to output 4-20mA to a valve only using a set point, would an SCP or PID be better for this test station?
It has been while since I actually programmed, trying to get back into it. Any info will help, thanks

rupej February 9th, 2018 02:30 PM

You are just wanting to send a constant signal to the valve to hold it in a set position, or do you want to control the valve based on an input, such as flow rate?

If you just want to set the valve, you can use an SCP function (would be an add-on-instruction for RSLogix 5000) to scale the output from 0-100 to 4000-20000, or whatever units your output card is set up for. PID would be for controlling the output based on an input.

If you just want to get some signal to the valve, you don't need an SCP at all. Just write a value in the the Local:1.O.Data (Or whatever yours may be) register.

Willlly February 9th, 2018 02:51 PM

Yes, I wasn't sure if I needed a SCP. All I am trying to do is create a tag to simply put a set point to control the 4-20 from my PanelView. Lets say I put in a setpoint of 50 only to open half way. would that work? If my scaling is correct?

janner_10 February 9th, 2018 03:08 PM

Yes as above. Just scale 0% to 100% to 4mA to 20mA.

Willlly February 9th, 2018 03:22 PM

Ok thanks, I will try that and see what else I can come up with.

Willlly February 9th, 2018 04:53 PM

ok I have my SCP scaled but my valve is only staying open half way, could this be a module config or something? I have not dealt with analog output cards a lot.

rupej February 9th, 2018 06:35 PM

Yes it could. What's the part number for your output card, and how is it configured? Post a screenshot of the setup screen and your SCP

Willlly February 10th, 2018 08:31 AM

Input min=0

Input max=100

Scaled min=4000

Scaled max=20000

I have my module configured to raw/proportional data with low limit at -29822 and high and +29085. I have also tried engineering units with a high low of 4000 and 20000. but still get the same outcome. 1769-OF8C is my analog output card

Willlly February 10th, 2018 11:12 AM

3 Attachment(s)
Here is my SCP and Configuration.

Aardwizz February 10th, 2018 12:28 PM

1 Attachment(s)
According to the Help file, the scaling for 4-20 mA "Raw/Proportional" is -29,822 to 29,085.

Because your SCP block never sets a value lower than 4000, you're always sending out at least 12.something mA, keeping your valve at at least 50%, and never more than roughly 80% open.

Either change the scaled min / max on your SCP block to -29,822 & 29,085, or change your Configuration to "Engineering Units" and see what happens.

Willlly February 10th, 2018 05:08 PM

I know I am missing something simple that I have not checked or done. I tried both ways with the same outcome. Ill keep digging into it, but what else could it be?

dogleg43 February 10th, 2018 05:13 PM


Originally Posted by Willlly (Post 768268)
I know I am missing something simple that I have not checked or done. I tried both ways with the same outcome. Ill keep digging into it, but what else could it be?

Could it be the valve or wiring?

Try using a4-20mA signal generator and see if the valve responds correctly.

Aardwizz February 11th, 2018 12:00 AM

1 Attachment(s)
In the controller tags, open up the Input file for the module / channel. There is diagnostic information there that may tell you what's going on.

Willlly February 12th, 2018 10:19 AM

ok thanks guys I think I have figured it out, the valve may be the issue. Thanks for the help!

All times are GMT -5. The time now is 09:55 AM.