Scale analog input to analog output

jfls45

Member
Join Date
Mar 2012
Location
Pennsylvania
Posts
76
I'm going to be using a Micrologix 1200 to scale an 4-20mA analog input from a weighing scale and want to output this to an 4-20mA analog signal which will control a pinch valve. Can anyone help me with some pointers etc... I believe the Micro 1200 uses the SCP and SCL instructions. The analog input will start out with a gross weight of .4 lbs up to about 40lbs. As the gross weight is nearing the amount needed, the analog output should be closing the pinch valve. This is used in a hopper.

Does anyone have and sample code I could look at?

I'm going to start reading Ron Beauforts pdf on scaling as well as pick up one of the fancy smancy calculators he mentions. I have the T-30 now.

Jeff
 
You could use a PID and sat the control mode to PV - SP. This will make it a reverse acting. Use a SCP's to scale your analog in and your analog out. I don't have any examples with me but I will check tomorrow when I get back to work.
 
Sampe PID

Here is a quick example of using a PID with some SCP's. You will have scale it according to your needs and add in any other interlocks.
 
Thanks Mark,

What I am trying to do is fill hoppers through pinch valves and need an accurate measurement in lbs down to the 10th of a pound. ie. "45.5" lbs. The hoppers are weighed with strain gauge scales and accuracy for reporting purposes is the goal here.
I will be using a Micrologix 1200 with the add-on analog 1762-I/O cards. Won't this accuracy depend on me using floating point math? The weigh scales use two 16-bit isolated analog output channels with 4-20mA.

I've downloaded your sample and looking at it now. Tell me, what range raw data will I get with 4-20mA inputs? 0-32767 or -32768 to 32767? How do you determine this until your actually hooked up and looking at it.

Jeff
 
Last edited:
Jeff,

16-bit resolution provides a -32,767 to +32767 full range.

Mark

Yes, and he will select 0-32767 for his case (no weight to full weight)
 
Let me make this correction. The Micrologix I plan on using is a 1200R which supports floating point. The help information for the SCP instruction states: Entering Parameters: Input - Enter a value to be scaled. This can be a word address or an address of floating-point data elements.

When I input the floating point element, I get this message: Rung 9, Instruction 1, SCP Floating Point operands are only valid for Micrologix 1500LRP/LSP Series C FRN7 or Micrologix 1200 Series C FRN 6 or higher processors.

The 1200R supports the floating point but just not input to the SCP instruction. So with that said, whats the next best way to proceed keeping in mind I need to maintain .10ths of a pound accuracy?

Here is the RSLogix500 file I have been working on. Lad 4 rungs 5,9 are where I used MOV and tried COP to stuff the analog input into the floating and rung 9 I was not able to use in the input.

Ladder 3 is where I am trying to setup the weigh scale analog input so it outputs a 4-20mA to the pinch valve. I am running this on desktop using RS500 Emulator.

Jeff
 
Hi
Simply use ints but multiply by 100 so 100 lbs becomes 10000 and then divide result by 100 for HMI display etc
 
Jeff,

The message you are getting up is not an error, just a warning.

If you are using a Micrologix 1200 Series C which is what is set up in your project then you should be OK.

Give it a try.

Mark
 
Ok, I was able to download to the emulator. Now to work on the analog out to the pinch valves. Need to stop exactly on the correct weight. They use a potentiometer to get it exact now. (this product is being used to make the coating on welding rods)
 
PID Settings Help

Here is a quick example of using a PID with some SCP's. You will have scale it according to your needs and add in any other interlocks.

I've used your sample logic in my ladder but I'm struggling trying to understand enough about the PID settings to make it work right. First question that comes to mind, why did you choose "6242" and "31208" for your scaled min and max? Shouldn't I be using 3277 and 16383 instead (4-20mA)

I've included my current project file if you want to look at the PID Settings.

Thanks for any and all assistance

Jeff
 
Last edited:
The example I gave was from a SLC504 using NI4 and and NO4I modules. Analog 4-20 inputs have a resolution of 3277 to 16383. Outputs modules are from 6242 to 31208 for a 4-20 ma signal. Yours may be different, I did not look up the exact range for a 1200 processor.
 

Similar Topics

Hi, I'm using a Micrologix1500 and it doesnt have the SCP (Scale with parameters) block. I have a 1769-IF8 analog module and need read the inputs...
Replies
10
Views
3,751
Please help me... Is there any possible way to use AB IR4-1762 module for analog input scaling....?
Replies
1
Views
1,175
Hello I m using Unity Pro XL. I want to scale my analog inputs. I configured the Analog Input Module as 0-4 mA and 0-10 V . What is the way...
Replies
2
Views
2,988
Hello, I am using an IF2OF2 analog IO module in conjunction with a Micrologix 1100. I have both analog inputs set up for voltage mode with raw...
Replies
11
Views
5,054
I need some help on a program I inherited. I don't usually fool around with analog inputs so I am very confused. I have a SLC 5/04 with a pressure...
Replies
11
Views
16,586
Back
Top Bottom